]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Task 3.10. BuildEdge from two points
authorazv <azv@opencascade.com>
Wed, 29 May 2019 07:28:46 +0000 (10:28 +0300)
committerazv <azv@opencascade.com>
Wed, 29 May 2019 11:03:34 +0000 (14:03 +0300)
Update documentation of Edge feature.

src/BuildPlugin/doc/TUI_edgeSegmentFeature.rst [new file with mode: 0644]
src/BuildPlugin/doc/edgeFeature.rst
src/BuildPlugin/doc/examples/segment.py [new file with mode: 0644]
src/BuildPlugin/doc/images/CreateEdgeByPoints.png [new file with mode: 0644]
src/BuildPlugin/doc/images/Edge.png
src/BuildPlugin/doc/images/EdgeByTwoPoints.png [new file with mode: 0644]
src/BuildPlugin/doc/images/edge_by_points_32x32.png [new file with mode: 0644]
src/BuildPlugin/doc/images/edge_by_segments_32x32.png [new file with mode: 0644]

diff --git a/src/BuildPlugin/doc/TUI_edgeSegmentFeature.rst b/src/BuildPlugin/doc/TUI_edgeSegmentFeature.rst
new file mode 100644 (file)
index 0000000..897a80f
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_segment:
+
+Create Edge by Points
+=====================
+
+.. literalinclude:: examples/segment.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/segment.py>` 
+   
index 0ef720d65b9f4b0f198246e5c92736487b0b32c4..468d2e639b956a004fb65cb3d1e48164d37bb4da 100644 (file)
@@ -14,14 +14,26 @@ To create edges in the active part:
 
 .. centered::
   **Edge** button
-  
-The following property panel will be opened:
+
+The options to create edges:
+
+.. image:: images/edge_by_segments_32x32.png
+   :align: left
+**By edges** creates edges using already existing edges in other shapes.
+
+.. image:: images/edge_by_points_32x32.png
+   :align: left
+**By points** creates segment between two points.
+
+
+By edges
+--------
 
 .. image:: images/Edge.png
   :align: center
 
 .. centered::
-  Create edges
+  Create by edges
 
 Select one or several edges in the viewer.
 
@@ -45,3 +57,36 @@ The result of the operation will be a set of edges created from the selected sha
   Result of the operation.
 
 **See Also** a sample TUI Script of :ref:`tui_create_edge` operation.
+
+
+By two points
+-------------
+
+.. image:: images/EdgeByTwoPoints.png
+  :align: center
+
+.. centered::
+  Create by points
+
+Select two points in the viewer.
+
+**Apply** button creates a segment.
+
+**Cancel** button cancels the operation. 
+
+**TUI Command**:  *model.addEdge(Part_doc, Point_1, Point_2)*
+
+**Arguments**:   Part document + two points/vertices.
+
+Result
+""""""
+
+The result of the operation will be a segment bounded by selected points:
+
+.. image:: images/CreateEdgeByPoints.png
+  :align: center
+
+.. centered::
+  Result of the operation.
+
+**See Also** a sample TUI Script of :ref:`tui_create_segment` operation.
diff --git a/src/BuildPlugin/doc/examples/segment.py b/src/BuildPlugin/doc/examples/segment.py
new file mode 100644 (file)
index 0000000..6ccf085
--- /dev/null
@@ -0,0 +1,11 @@
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Edge_1 = model.addEdge(Part_1_doc, model.selection("VERTEX", "[Box_1_1/Back][Box_1_1/Right][Box_1_1/Top]"),
+                                   model.selection("VERTEX", "[Box_1_1/Front][Box_1_1/Right][Box_1_1/Bottom]"))
+model.do()
+model.end()
diff --git a/src/BuildPlugin/doc/images/CreateEdgeByPoints.png b/src/BuildPlugin/doc/images/CreateEdgeByPoints.png
new file mode 100644 (file)
index 0000000..d60a680
Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateEdgeByPoints.png differ
index f9e297d00e56badd298b9b9fb93eec7210410206..4eaf230b39b01c4c6c147321e7f946c1619d2446 100644 (file)
Binary files a/src/BuildPlugin/doc/images/Edge.png and b/src/BuildPlugin/doc/images/Edge.png differ
diff --git a/src/BuildPlugin/doc/images/EdgeByTwoPoints.png b/src/BuildPlugin/doc/images/EdgeByTwoPoints.png
new file mode 100644 (file)
index 0000000..d0ac6f0
Binary files /dev/null and b/src/BuildPlugin/doc/images/EdgeByTwoPoints.png differ
diff --git a/src/BuildPlugin/doc/images/edge_by_points_32x32.png b/src/BuildPlugin/doc/images/edge_by_points_32x32.png
new file mode 100644 (file)
index 0000000..469f9d8
Binary files /dev/null and b/src/BuildPlugin/doc/images/edge_by_points_32x32.png differ
diff --git a/src/BuildPlugin/doc/images/edge_by_segments_32x32.png b/src/BuildPlugin/doc/images/edge_by_segments_32x32.png
new file mode 100644 (file)
index 0000000..abdccd7
Binary files /dev/null and b/src/BuildPlugin/doc/images/edge_by_segments_32x32.png differ