From: mzn Date: Tue, 11 Sep 2018 14:47:45 +0000 (+0300) Subject: Sketch objects help pages (update). X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=da7b9267e669c3ed3d2157d8d0418888f4066699;p=modules%2Fshaper.git Sketch objects help pages (update). --- diff --git a/src/SketchPlugin/doc/SketchPlugin.rst b/src/SketchPlugin/doc/SketchPlugin.rst index 82924f527..823667866 100644 --- a/src/SketchPlugin/doc/SketchPlugin.rst +++ b/src/SketchPlugin/doc/SketchPlugin.rst @@ -8,10 +8,11 @@ Sketch plug-in Sketch plug-in includes features for creation of 2D shapes. The process of sketch creation is comprised of: + - definition of sketch plane - creation of sketch objects from scratch - generation of sketch objects via operations on the existing operations -- definition of constaints +- definition of constraints Sketch could be created both in active part and a part set (if there is no active part). @@ -26,7 +27,7 @@ To create a Sketch: .. centered:: **Sketch** button -At first it is necessary to define a plane on which to create a sketch: +First define a plane on which to create a sketch: .. image:: images/PlaneDefinition.png :align: center @@ -54,8 +55,13 @@ After the plane for sketch is selected the following property panel will be open - **Show dimensional constraints** check box - turns on/off dimensional constraints displaying - **Show existing expressions** check box - turns on/off expressions displaying -Now it is possible to create sketch objects, make sketch operations and constraints. -To apply or cancel sketch creation it is possible to use apply and cancel buttons from the +Now it is possible: + +- create :ref:`sketch objects ` +- create :ref:`constraints ` +- perform :ref:`sketch operations ` + +To apply or cancel sketch creation use apply and cancel buttons from the Sketch panel as well as equivalent buttons from Sketch toolbar. The Result of operation will be a COMPOUND. Result node in the object tree is located in @@ -67,6 +73,8 @@ Name is assigned automatically: **Sketch_1**, **Sketch_2**, ... both for Feature **Arguments**: Part or PartSet + plane. +.. _sketch_objects: + Sketch objects -------------- @@ -81,6 +89,8 @@ The plug-in includes following features for creation of 2D objects: circleFeature.rst arcFeature.rst +.. _sketch_constraints: + Constraints ----------- @@ -106,6 +116,8 @@ Constraints verticalDistFeature.rst verticalFeature.rst +.. _sketch_operations: + Operations ---------- diff --git a/src/SketchPlugin/doc/TUI_arcFeature.rst b/src/SketchPlugin/doc/TUI_arcFeature.rst new file mode 100644 index 000000000..93259c839 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_arcFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_arc: + +Create Skecth Arc +================= + +.. literalinclude:: examples/arc.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/TUI_circleFeature.rst b/src/SketchPlugin/doc/TUI_circleFeature.rst new file mode 100644 index 000000000..c6f4ceff0 --- /dev/null +++ b/src/SketchPlugin/doc/TUI_circleFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_create_circle: + +Create Skecth Circle +==================== + +.. literalinclude:: examples/circle.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/SketchPlugin/doc/arcFeature.rst b/src/SketchPlugin/doc/arcFeature.rst index 5f179c550..9e5c258e0 100644 --- a/src/SketchPlugin/doc/arcFeature.rst +++ b/src/SketchPlugin/doc/arcFeature.rst @@ -27,7 +27,7 @@ There are 3 algorithms for creation of an Arc: .. image:: images/arc_tang_32x32.png :align: left -**By tangent and point** creates an arc segment with the tangent point and the end point. +**By tangent point and end point** creates an arc segment with the tangent point and the end point. By center and two points """""""""""""""""""""""" @@ -35,9 +35,14 @@ By center and two points .. image:: images/Arc_panel_base.png :align: center +Click in the view once to set the center point, then move the mouse and click a second time to set the start point +and finally move the mouse and click a third time to set the last passed point. +- When entering a center or start point by selecting either a point or a segment, a Coincident constraint is created. +- When entering an end point by selecting a segment, a Coincident constraint is created. +- When entering an end point, only segments are selectable. -**TUI Command**: *Sketch_1.addCircle(CenterX, CenterY, StartX, StartY, EndX, EndY, Inversed)* +**TUI Command**: *Sketch_1.addArc(CenterX, CenterY, StartX, StartY, EndX, EndY, Inversed)* **Arguments**: 7 values (coordinates of the center, the start, the end, inversed flag (if true - build arc from end to start)). @@ -47,16 +52,43 @@ By three points .. image:: images/Arc_panel_3pt.png :align: center -**TUI Command**: *Sketch_1.addCircle(StartX, StartY, EndX, EndY, PassedX, PassedY)* +Click in the view once to set the start point, then move the mouse and click a second time to set the end point +and finally move the mouse and click a third time to set the passed point. + +- When entering a start or end point by selecting either a point or a segment, a Coincident constraint is created. +- When entering a passing point by selecting a point, a Coincident constraint is created. +- When entering a passing point by selecting a segment, a Tangent constraint is created. + +**TUI Command**: *Sketch_1.addArc(StartX, StartY, EndX, EndY, PassedX, PassedY)* **Arguments**: 6 values (coordinates of the start, end and passed points). -By tangent and point -"""""""""""""""""""" +By tangent point and point +"""""""""""""""""""""""""" .. image:: images/Arc_panel_tang.png :align: center -**TUI Command**: *Sketch_1.addCircle(TangetPoint, EndX, EndY, Inversed)* +Select point on segement in the view to set the tangent point, then move the mouse and click to set the end point. +Tangent point by itself is a start point. The edge on which it lies will be tangent to the arc. + +- When entering a tangent point by selecting a point on segment, a Tangent constraint is created. +- When entering an end point by selecting a segment, a Coincident constraint is created. +- When entering an end point, only segments are selectable. + +**TUI Command**: *Sketch_1.addArc(TangetPoint, EndX, EndY, Inversed)* + +**Arguments**: 4 values (reference to tangent point, coordinates of end point, inversed flag (if true - build arc from end to start)). + +Result +"""""" + +Created arc appears in the view. + +.. image:: images/Arc_res.png + :align: center + +.. centered:: + Circle created -**Arguments**: 4 values (reference to tangent point, coordinates of end point, inversed flag (if true - build arc from end to start)). \ No newline at end of file +**See Also** a sample TUI Script of a :ref:`tui_create_arc` operation. \ No newline at end of file diff --git a/src/SketchPlugin/doc/circleFeature.rst b/src/SketchPlugin/doc/circleFeature.rst index ef62dc0b5..fa1abb235 100644 --- a/src/SketchPlugin/doc/circleFeature.rst +++ b/src/SketchPlugin/doc/circleFeature.rst @@ -33,6 +33,10 @@ By center and passed point Click in the view once to set the center point, then move the mouse and click a second time to set the passed point. +- When entering a center point by selecting either a point or a segment, a Coincident constraint is created. +- When entering a passing point by selecting a point, a Coincident constraint is also created. +- When entering a passing point by selecting a segment, a Tangent constraint is created. + **TUI Command**: *Sketch_1.addCircle(CenterX, CenterY, PassedX, PassedY)* **Arguments**: 4 values (coordinates of the center and the passed point). @@ -46,6 +50,37 @@ By three points Click in the view once to set the first passed point, then move the mouse and click a second time to set the second passed point and finally move the mouse and click a third time to set the last passed point. +- When entering a passing point by selecting a point, a Coincident constraint is created. +- When entering a passing point by selecting a segment, a Tangent constraint is created. + **TUI Command**: *Sketch_1.addCircle(X1, Y1, X2, Y2, X3, Y3)* **Arguments**: 6 values (coordinates of three points). + +Property panel in edition context +""""""""""""""""""""""""""""""""" + +The following property panel appears when the user selects an existing circle. + +.. image:: images/Circle_panel_edit.png + :align: center + +Note that the edition property panel doesn't show the creation algorithm used. + +The panel shows: + +- center coordinates and radius (read-only). +- auxiliary flag (could be modified). + +Result +"""""" + +Created circle appears in the view. + +.. image:: images/Circle_res.png + :align: center + +.. centered:: + Circle created + +**See Also** a sample TUI Script of a :ref:`tui_create_circle` operation. diff --git a/src/SketchPlugin/doc/examples/arc.py b/src/SketchPlugin/doc/examples/arc.py new file mode 100644 index 000000000..d9ee44a6e --- /dev/null +++ b/src/SketchPlugin/doc/examples/arc.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) +SketchArc_1 = Sketch_1.addArc(6.0, 6.2, 5.2, 34.3, 34.0, 7.7, True) +SketchArc_2 = Sketch_1.addArc(8.1, 56.7, 58.2, 6.6, 44.8, 69.2) +SketchLine_3 = Sketch_1.addLine(25.0, 109.4, 68.1, 153.6) +SketchLine_3.setAuxiliary(True) +SketchArc_3 = Sketch_1.addArc(SketchLine_3.startPoint(), 92.1, 34.0, True) +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/circle.py b/src/SketchPlugin/doc/examples/circle.py new file mode 100644 index 000000000..c51911609 --- /dev/null +++ b/src/SketchPlugin/doc/examples/circle.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchCircle_1 = Sketch_1.addCircle(38.6, 47.5, 31.5) +SketchCircle_2 = Sketch_1.addCircle(0.0, 14.1, 15.0, 0.1, 17.2, 19.9) +model.do() +model.end() diff --git a/src/SketchPlugin/doc/examples/line.py b/src/SketchPlugin/doc/examples/line.py index 2b41c800b..fb92ca217 100644 --- a/src/SketchPlugin/doc/examples/line.py +++ b/src/SketchPlugin/doc/examples/line.py @@ -7,6 +7,6 @@ partSet = model.moduleDocument() Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) -SketchLine_1 = Sketch_1.addLine(64.50309529234383, 87.92795791556755, -33.49721981216553, -42.5840914148601) +SketchLine_1 = Sketch_1.addLine(64.5, 87.9, -33.4, -42.6) model.do() model.end() diff --git a/src/SketchPlugin/doc/examples/point.py b/src/SketchPlugin/doc/examples/point.py index 9903355b4..64389e9d1 100644 --- a/src/SketchPlugin/doc/examples/point.py +++ b/src/SketchPlugin/doc/examples/point.py @@ -7,6 +7,6 @@ partSet = model.moduleDocument() Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) -SketchPoint_1 = Sketch_1.addPoint(42.64092753227449, 19.02972704799864) +SketchPoint_1 = Sketch_1.addPoint(42.6, 19.0) model.do() model.end() \ No newline at end of file diff --git a/src/SketchPlugin/doc/examples/rectangle.py b/src/SketchPlugin/doc/examples/rectangle.py index a126cf041..31055cd1c 100644 --- a/src/SketchPlugin/doc/examples/rectangle.py +++ b/src/SketchPlugin/doc/examples/rectangle.py @@ -7,6 +7,6 @@ partSet = model.moduleDocument() Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) -Rectangle_1 = Sketch_1.addRectangle(5.598878525298213, 8.556502484736781, 31.35634838639225, 78.97905438572354) +Rectangle_1 = Sketch_1.addRectangle(5.5, 8.5, 31.3, 78.9) model.do() model.end() diff --git a/src/SketchPlugin/doc/images/Arc1.png b/src/SketchPlugin/doc/images/Arc1.png deleted file mode 100644 index f05a75e5f..000000000 Binary files a/src/SketchPlugin/doc/images/Arc1.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Arc2.png b/src/SketchPlugin/doc/images/Arc2.png deleted file mode 100644 index 17ece66a9..000000000 Binary files a/src/SketchPlugin/doc/images/Arc2.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Arc3.png b/src/SketchPlugin/doc/images/Arc3.png deleted file mode 100644 index ba8d07c44..000000000 Binary files a/src/SketchPlugin/doc/images/Arc3.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Arc_panel_3pt.png b/src/SketchPlugin/doc/images/Arc_panel_3pt.png index ba9a7e024..089d50730 100644 Binary files a/src/SketchPlugin/doc/images/Arc_panel_3pt.png and b/src/SketchPlugin/doc/images/Arc_panel_3pt.png differ diff --git a/src/SketchPlugin/doc/images/Arc_panel_base.png b/src/SketchPlugin/doc/images/Arc_panel_base.png index b7eced57c..9a5b9ed4a 100644 Binary files a/src/SketchPlugin/doc/images/Arc_panel_base.png and b/src/SketchPlugin/doc/images/Arc_panel_base.png differ diff --git a/src/SketchPlugin/doc/images/Arc_panel_tang.png b/src/SketchPlugin/doc/images/Arc_panel_tang.png index 7236df8f5..ca0205401 100644 Binary files a/src/SketchPlugin/doc/images/Arc_panel_tang.png and b/src/SketchPlugin/doc/images/Arc_panel_tang.png differ diff --git a/src/SketchPlugin/doc/images/Arc_res.png b/src/SketchPlugin/doc/images/Arc_res.png new file mode 100644 index 000000000..b23a9022b Binary files /dev/null and b/src/SketchPlugin/doc/images/Arc_res.png differ diff --git a/src/SketchPlugin/doc/images/Circle1.png b/src/SketchPlugin/doc/images/Circle1.png deleted file mode 100644 index 86c3d9cea..000000000 Binary files a/src/SketchPlugin/doc/images/Circle1.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Circle2.png b/src/SketchPlugin/doc/images/Circle2.png deleted file mode 100644 index 34c206d93..000000000 Binary files a/src/SketchPlugin/doc/images/Circle2.png and /dev/null differ diff --git a/src/SketchPlugin/doc/images/Circle_panel_3pt.png b/src/SketchPlugin/doc/images/Circle_panel_3pt.png index 4a4df051b..c837accbf 100644 Binary files a/src/SketchPlugin/doc/images/Circle_panel_3pt.png and b/src/SketchPlugin/doc/images/Circle_panel_3pt.png differ diff --git a/src/SketchPlugin/doc/images/Circle_panel_edit.png b/src/SketchPlugin/doc/images/Circle_panel_edit.png new file mode 100644 index 000000000..c9983f2ec Binary files /dev/null and b/src/SketchPlugin/doc/images/Circle_panel_edit.png differ diff --git a/src/SketchPlugin/doc/images/Circle_panel_pt_rad.png b/src/SketchPlugin/doc/images/Circle_panel_pt_rad.png index e6d70a158..e171e58fe 100644 Binary files a/src/SketchPlugin/doc/images/Circle_panel_pt_rad.png and b/src/SketchPlugin/doc/images/Circle_panel_pt_rad.png differ diff --git a/src/SketchPlugin/doc/images/Circle_res.png b/src/SketchPlugin/doc/images/Circle_res.png new file mode 100644 index 000000000..deb8280e7 Binary files /dev/null and b/src/SketchPlugin/doc/images/Circle_res.png differ diff --git a/src/SketchPlugin/doc/images/CoordinatePlanes.png b/src/SketchPlugin/doc/images/CoordinatePlanes.png index c36a587fd..c72d5da6e 100644 Binary files a/src/SketchPlugin/doc/images/CoordinatePlanes.png and b/src/SketchPlugin/doc/images/CoordinatePlanes.png differ diff --git a/src/SketchPlugin/doc/lineFeature.rst b/src/SketchPlugin/doc/lineFeature.rst index 020a1c3ee..a832a7e13 100644 --- a/src/SketchPlugin/doc/lineFeature.rst +++ b/src/SketchPlugin/doc/lineFeature.rst @@ -37,8 +37,6 @@ Result Created line appears in the view. -Example is shown below. - .. image:: images/Line_res.png :align: center diff --git a/src/SketchPlugin/doc/pointFeature.rst b/src/SketchPlugin/doc/pointFeature.rst index bceedd1f3..369251fef 100644 --- a/src/SketchPlugin/doc/pointFeature.rst +++ b/src/SketchPlugin/doc/pointFeature.rst @@ -37,8 +37,6 @@ Result Created point appears in the view. -Example is shown below. - .. image:: images/Point_res.png :align: center diff --git a/src/SketchPlugin/doc/rectangleFeature.rst b/src/SketchPlugin/doc/rectangleFeature.rst index f5712b71e..5a27626ee 100644 --- a/src/SketchPlugin/doc/rectangleFeature.rst +++ b/src/SketchPlugin/doc/rectangleFeature.rst @@ -40,8 +40,6 @@ Result Created rectangle appears in the view. -Example is shown below. - .. image:: images/Rectangle_res.png :align: center