From: azv Date: Wed, 29 May 2019 07:28:46 +0000 (+0300) Subject: Task 3.10. BuildEdge from two points X-Git-Tag: VEDF2019Lot4~120 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=71f8d322763f7b2de8a2d843060d628fab10d3b6;hp=3966940be459e2771641c2cfd87e6454494d4261;p=modules%2Fshaper.git Task 3.10. BuildEdge from two points Update documentation of Edge feature. --- diff --git a/src/BuildPlugin/doc/TUI_edgeSegmentFeature.rst b/src/BuildPlugin/doc/TUI_edgeSegmentFeature.rst new file mode 100644 index 000000000..897a80f78 --- /dev/null +++ b/src/BuildPlugin/doc/TUI_edgeSegmentFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_segment: + +Create Edge by Points +===================== + +.. literalinclude:: examples/segment.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/BuildPlugin/doc/edgeFeature.rst b/src/BuildPlugin/doc/edgeFeature.rst index 0ef720d65..468d2e639 100644 --- a/src/BuildPlugin/doc/edgeFeature.rst +++ b/src/BuildPlugin/doc/edgeFeature.rst @@ -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 index 000000000..6ccf085e4 --- /dev/null +++ b/src/BuildPlugin/doc/examples/segment.py @@ -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 index 000000000..d60a680af Binary files /dev/null and b/src/BuildPlugin/doc/images/CreateEdgeByPoints.png differ diff --git a/src/BuildPlugin/doc/images/Edge.png b/src/BuildPlugin/doc/images/Edge.png index f9e297d00..4eaf230b3 100644 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 index 000000000..d0ac6f0d2 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 index 000000000..469f9d8e0 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 index 000000000..abdccd7c8 Binary files /dev/null and b/src/BuildPlugin/doc/images/edge_by_segments_32x32.png differ