]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Sketch objects help pages (update).
authormzn <mzn@opencascade.com>
Tue, 11 Sep 2018 14:47:45 +0000 (17:47 +0300)
committermzn <mzn@opencascade.com>
Tue, 11 Sep 2018 14:47:45 +0000 (17:47 +0300)
27 files changed:
src/SketchPlugin/doc/SketchPlugin.rst
src/SketchPlugin/doc/TUI_arcFeature.rst [new file with mode: 0644]
src/SketchPlugin/doc/TUI_circleFeature.rst [new file with mode: 0644]
src/SketchPlugin/doc/arcFeature.rst
src/SketchPlugin/doc/circleFeature.rst
src/SketchPlugin/doc/examples/arc.py [new file with mode: 0644]
src/SketchPlugin/doc/examples/circle.py [new file with mode: 0644]
src/SketchPlugin/doc/examples/line.py
src/SketchPlugin/doc/examples/point.py
src/SketchPlugin/doc/examples/rectangle.py
src/SketchPlugin/doc/images/Arc1.png [deleted file]
src/SketchPlugin/doc/images/Arc2.png [deleted file]
src/SketchPlugin/doc/images/Arc3.png [deleted file]
src/SketchPlugin/doc/images/Arc_panel_3pt.png
src/SketchPlugin/doc/images/Arc_panel_base.png
src/SketchPlugin/doc/images/Arc_panel_tang.png
src/SketchPlugin/doc/images/Arc_res.png [new file with mode: 0644]
src/SketchPlugin/doc/images/Circle1.png [deleted file]
src/SketchPlugin/doc/images/Circle2.png [deleted file]
src/SketchPlugin/doc/images/Circle_panel_3pt.png
src/SketchPlugin/doc/images/Circle_panel_edit.png [new file with mode: 0644]
src/SketchPlugin/doc/images/Circle_panel_pt_rad.png
src/SketchPlugin/doc/images/Circle_res.png [new file with mode: 0644]
src/SketchPlugin/doc/images/CoordinatePlanes.png
src/SketchPlugin/doc/lineFeature.rst
src/SketchPlugin/doc/pointFeature.rst
src/SketchPlugin/doc/rectangleFeature.rst

index 82924f527f8986ddb076908205803eb0a041c2d2..823667866b20442f32be420dbfb484d6901b1c5a 100644 (file)
@@ -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 <sketch_objects>`
+- create :ref:`constraints <sketch_constraints>`
+- perform :ref:`sketch operations <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 (file)
index 0000000..93259c8
--- /dev/null
@@ -0,0 +1,11 @@
+
+  .. _tui_create_arc:
+
+Create Skecth Arc
+=================
+
+.. literalinclude:: examples/arc.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/arc.py>`
diff --git a/src/SketchPlugin/doc/TUI_circleFeature.rst b/src/SketchPlugin/doc/TUI_circleFeature.rst
new file mode 100644 (file)
index 0000000..c6f4cef
--- /dev/null
@@ -0,0 +1,11 @@
+
+  .. _tui_create_circle:
+
+Create Skecth Circle
+====================
+
+.. literalinclude:: examples/circle.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/circle.py>`
index 5f179c5503a071b45153175821e31e69a2325cfa..9e5c258e07d1eb9d6961dffce7eba82c282f2cd8 100644 (file)
@@ -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
index ef62dc0b532e7f73c66992853e5304e7fdc3b26c..fa1abb235517347f61816d6a901d7aed83e1fa47 100644 (file)
@@ -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 (file)
index 0000000..d9ee44a
--- /dev/null
@@ -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 (file)
index 0000000..c519116
--- /dev/null
@@ -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()
index 2b41c800bb9919cadc42522d16a60cb49a1d2a62..fb92ca21707c53651bf8f6a3d1e4467a568ee08b 100644 (file)
@@ -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()
index 9903355b47c7ef2a591a6cbbcc94cc08558b2cb1..64389e9d1b51beb332df7ee13f969f153f925183 100644 (file)
@@ -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
index a126cf04124c53ccb0fcf2afa1645ea577420088..31055cd1c4ce2c0fc6f982213914e7d7232baf7c 100644 (file)
@@ -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 (file)
index f05a75e..0000000
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 (file)
index 17ece66..0000000
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 (file)
index ba8d07c..0000000
Binary files a/src/SketchPlugin/doc/images/Arc3.png and /dev/null differ
index ba9a7e0240153d0a22d096771d0049d62834a188..089d50730b22e133d05303bec7a93f95039ff42e 100644 (file)
Binary files a/src/SketchPlugin/doc/images/Arc_panel_3pt.png and b/src/SketchPlugin/doc/images/Arc_panel_3pt.png differ
index b7eced57c8f1286296ac498ad7da4f1c9c3d09d3..9a5b9ed4a95cb5807180d49b6668a17cf2a36b7b 100644 (file)
Binary files a/src/SketchPlugin/doc/images/Arc_panel_base.png and b/src/SketchPlugin/doc/images/Arc_panel_base.png differ
index 7236df8f58a1ef45aaf84f6781c64caa6c9adb33..ca02054011cb4b73ec2d6e950eda6e196622d55f 100644 (file)
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 (file)
index 0000000..b23a902
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 (file)
index 86c3d9c..0000000
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 (file)
index 34c206d..0000000
Binary files a/src/SketchPlugin/doc/images/Circle2.png and /dev/null differ
index 4a4df051b5e00b02f0986e9eca55cb6f8e40ab57..c837accbf164d852ace07cf9f9ddec1359b363b0 100644 (file)
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 (file)
index 0000000..c9983f2
Binary files /dev/null and b/src/SketchPlugin/doc/images/Circle_panel_edit.png differ
index e6d70a158276dc37138486d073cfcd1dc53bdf32..e171e58fe265334a7917eda6885efdf9b97acc58 100644 (file)
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 (file)
index 0000000..deb8280
Binary files /dev/null and b/src/SketchPlugin/doc/images/Circle_res.png differ
index c36a587fda26ee8d1d61ab02ca441a9b7ae6799e..c72d5da6ed477c5740b3b5cbfbf9831366ba9448 100644 (file)
Binary files a/src/SketchPlugin/doc/images/CoordinatePlanes.png and b/src/SketchPlugin/doc/images/CoordinatePlanes.png differ
index 020a1c3eeb25715664275da69d1433acf88f033c..a832a7e132beda8ae179f7a4f95c5179aec571e0 100644 (file)
@@ -37,8 +37,6 @@ Result
 
 Created line appears in the view.
 
-Example is shown below.
-
 .. image:: images/Line_res.png
           :align: center
 
index bceedd1f3ca166c4fb629698b6f4ef0fedee1138..369251fefbd446e8cf35af2d640fc7a6eae60a7e 100644 (file)
@@ -37,8 +37,6 @@ Result
 
 Created point appears in the view.
 
-Example is shown below.
-
 .. image:: images/Point_res.png
           :align: center
 
index f5712b71e82a312375fc1901b3bb0a58b8660db1..5a27626eefaa0dfc08bc1db44c7f4d70f47ab97a 100644 (file)
@@ -40,8 +40,6 @@ Result
 
 Created rectangle appears in the view.
 
-Example is shown below.
-
 .. image:: images/Rectangle_res.png
           :align: center