]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Sketch constraints help pages (distance, vertical and horizontal distance).
authormzn <mzn@opencascade.com>
Wed, 12 Sep 2018 16:17:11 +0000 (19:17 +0300)
committermzn <mzn@opencascade.com>
Wed, 12 Sep 2018 16:17:11 +0000 (19:17 +0300)
29 files changed:
src/SketchPlugin/doc/SketchPlugin.rst
src/SketchPlugin/doc/TUI_distance.rst [new file with mode: 0644]
src/SketchPlugin/doc/TUI_hdistance.rst [new file with mode: 0644]
src/SketchPlugin/doc/TUI_vdistance.rst [new file with mode: 0644]
src/SketchPlugin/doc/distanceFeature.rst
src/SketchPlugin/doc/examples/distance.py [new file with mode: 0644]
src/SketchPlugin/doc/examples/hdistance.py [new file with mode: 0644]
src/SketchPlugin/doc/examples/vdistance.py [new file with mode: 0644]
src/SketchPlugin/doc/horizontalDistFeature.rst
src/SketchPlugin/doc/images/Distance.png
src/SketchPlugin/doc/images/Distance_field_view.png [new file with mode: 0644]
src/SketchPlugin/doc/images/Distance_panel.png [new file with mode: 0644]
src/SketchPlugin/doc/images/Distance_res.png [new file with mode: 0644]
src/SketchPlugin/doc/images/HorizontalDist.png [deleted file]
src/SketchPlugin/doc/images/HorizontalDistance_field_view.png [new file with mode: 0644]
src/SketchPlugin/doc/images/HorizontalDistance_panel.png [new file with mode: 0644]
src/SketchPlugin/doc/images/HorizontalDistance_res.png [new file with mode: 0644]
src/SketchPlugin/doc/images/Sketch_fixed.png [new file with mode: 0644]
src/SketchPlugin/doc/images/Sketch_underconstrained - Copy.png [new file with mode: 0644]
src/SketchPlugin/doc/images/Sketch_underconstrained.png [new file with mode: 0644]
src/SketchPlugin/doc/images/VerticalDistance_field_view.png [new file with mode: 0644]
src/SketchPlugin/doc/images/VerticalDistance_panel.png [new file with mode: 0644]
src/SketchPlugin/doc/images/VerticalDistance_res.png [new file with mode: 0644]
src/SketchPlugin/doc/images/distance_h.png [new file with mode: 0644]
src/SketchPlugin/doc/images/distance_v.png [new file with mode: 0644]
src/SketchPlugin/doc/images/location_automatic.png [new file with mode: 0644]
src/SketchPlugin/doc/images/location_left.png [new file with mode: 0644]
src/SketchPlugin/doc/images/location_right.png [new file with mode: 0644]
src/SketchPlugin/doc/verticalDistFeature.rst

index 823667866b20442f32be420dbfb484d6901b1c5a..b0970fad3a8f9f46c75f2bb41aa3f8e37c191572 100644 (file)
@@ -78,7 +78,7 @@ Name is assigned automatically: **Sketch_1**, **Sketch_2**, ... both for Feature
 Sketch objects
 --------------
 
-The plug-in includes following features for creation of 2D objects:
+The plug-in includes the following features for creation of 2D objects:
 
 .. toctree::
    :maxdepth: 1
@@ -94,13 +94,34 @@ The plug-in includes following features for creation of 2D objects:
 Constraints
 -----------
 
+Constraints are available and viewable during sketch creation or editing.
 
+The goal of constrains creation is to fix a sketch geometry, i.e. set degrees of freedom to zero.
+
+If all degrees of freedom are eliminated, the sketch is fixed and displayed with green color.
+
+.. image:: images/Sketch_fixed.png
+   :align: center
+
+.. centered::
+  Fixed Sketch
+
+If any degrees of freedom remain unsolved, the sketch is under-constrained and displayed with red color.
+
+.. image:: images/Sketch_underconstrained.png
+   :align: center
+
+.. centered::
+  Underconstrained Sketch
+
+The plug-in includes the following constraints:
 
 .. toctree::
    :maxdepth: 1
 
    distanceFeature.rst
    horizontalDistFeature.rst
+   verticalDistFeature.rst
    angleFeature.rst
    coincedenceFeature.rst
    collinearFeature.rst
@@ -113,7 +134,6 @@ Constraints
    radiusFeature.rst
    rigidFeature.rst
    tangentFeature.rst
-   verticalDistFeature.rst
    verticalFeature.rst
 
 .. _sketch_operations:
diff --git a/src/SketchPlugin/doc/TUI_distance.rst b/src/SketchPlugin/doc/TUI_distance.rst
new file mode 100644 (file)
index 0000000..260369b
--- /dev/null
@@ -0,0 +1,11 @@
+
+  .. _tui_create_distance:
+
+Create Distance constraint
+==========================
+
+.. literalinclude:: examples/distance.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/distance.py>`
diff --git a/src/SketchPlugin/doc/TUI_hdistance.rst b/src/SketchPlugin/doc/TUI_hdistance.rst
new file mode 100644 (file)
index 0000000..fc30037
--- /dev/null
@@ -0,0 +1,11 @@
+
+  .. _tui_create_hdistance:
+
+Create Horizontal Distance constraint
+=====================================
+
+.. literalinclude:: examples/hdistance.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/hdistance.py>`
diff --git a/src/SketchPlugin/doc/TUI_vdistance.rst b/src/SketchPlugin/doc/TUI_vdistance.rst
new file mode 100644 (file)
index 0000000..38b38f3
--- /dev/null
@@ -0,0 +1,11 @@
+
+  .. _tui_create_vdistance:
+
+Create Vertical Distance constraint
+=====================================
+
+.. literalinclude:: examples/vdistance.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/vdistance.py>`
index dd52e8f63edced97e5e0200825e9e5858890c1b8..325c61ce2df2c9b8cb9a52f97c50dc32f5918221 100644 (file)
@@ -2,9 +2,69 @@
 Distance constraint
 ===================
 
+Distance can be defined between two objects such as point, line, line or arc end point, center of circle or arc.
 
-.. image:: images/Distance.png
-  :align: center
+To create Distance constraint in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Distance* item  or
+#. click **Distance** button in Sketch toolbar:
+
+.. image:: images/distance.png
+   :align: center
+
+.. centered::
+   **Distance**  button
+
+Property panel:
+
+.. image:: images/Distance_panel.png
+   :align: center
+
+Input fields:
+
+- **First object** - the first object
+- **Second object** - the second object
+- **Value** - distance between the objects, could be modified to set the desirable value
+- **Text location** - position of the distance value label relating to extension line (in the view)
+   .. image:: images/location_left.png
+      :align: left
+   **Left** inserts text at the left of the distance extension line.
+
+   .. image:: images/location_automatic.png
+      :align: left
+   **Automatic** inserts text at the middle of the distance extension line if it has enough length, otherwise - to the left.
+
+   .. image:: images/location_right.png
+      :align: left
+   **Right** inserts text to the right of the distance extension line.
+- **Keep orientation** - fixes the relative position between selected objects
+
+When the both objects are selected distance value is displayed in the property panel and in the view.
+
+When creating the constraint and the both objects are selected the first time:
+
+- drag the distance presentation in the view to the desired position (by move mouse and click once)
+- set desirable distance value in the input field in the view and press **Enter** or just press **Enter** to keep the current distance
+
+.. image:: images/Distance_field_view.png
+   :align: center
 
 .. centered::
-  Create a distance constraint
+   Distance input in the view
+
+**TUI Command**: *Sketch_1.setDistance(FirstObject, SecondObject, Value, KeepOrientation)*
+
+**Arguments**:  2 objects + distance value + keep orientation flag
+
+Result
+""""""
+
+Created Distance appears in the view.
+
+.. image:: images/Distance_res.png
+          :align: center
+
+.. centered::
+   Distance created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_distance` operation.
diff --git a/src/SketchPlugin/doc/examples/distance.py b/src/SketchPlugin/doc/examples/distance.py
new file mode 100644 (file)
index 0000000..b0e79eb
--- /dev/null
@@ -0,0 +1,14 @@
+# -*- 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(24.1, 24.5, 18.2)
+SketchLine_1 = Sketch_1.addLine(54.3, 93.4, 91.2, 56.4)
+SketchConstraintDistance_1 = Sketch_1.setDistance(SketchCircle_1.center(), SketchLine_1.result(), 70.0, True)
+model.do()
+model.end()
\ No newline at end of file
diff --git a/src/SketchPlugin/doc/examples/hdistance.py b/src/SketchPlugin/doc/examples/hdistance.py
new file mode 100644 (file)
index 0000000..dfdf767
--- /dev/null
@@ -0,0 +1,14 @@
+# -*- 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(24.1, 24.5, 18.2)
+SketchLine_1 = Sketch_1.addLine(54.3, 93.4, 91.2, 56.4)
+SketchConstraintDistanceHorizontal_1 = Sketch_1.setHorizontalDistance(SketchCircle_1.center(), SketchLine_1.startPoint(), 30)
+model.do()
+model.end()
\ No newline at end of file
diff --git a/src/SketchPlugin/doc/examples/vdistance.py b/src/SketchPlugin/doc/examples/vdistance.py
new file mode 100644 (file)
index 0000000..51d74e8
--- /dev/null
@@ -0,0 +1,14 @@
+# -*- 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(24.1, 24.5, 18.2)
+SketchLine_1 = Sketch_1.addLine(62.3, 85.1, 91.2, 56.4)
+SketchConstraintDistanceVertical_1 = Sketch_1.setVerticalDistance(SketchCircle_1.center(), SketchLine_1.startPoint(), 75.5)
+model.do()
+model.end()
\ No newline at end of file
index 3150c0f6b8d27d31924b16f7814208d817a66291..74b09541403fd6d913e11da8920dbe23ae39fde8 100644 (file)
@@ -2,9 +2,70 @@
 Horizontal distance constraint
 ==============================
 
+Horizontal Distance constraint fixes distance between two objects along the horizontal axis.
 
-.. image:: images/HorizontalDist.png
-  :align: center
+The constraint can be defined between two points such as point object, line or arc end point, center of circle or arc.
+
+To create Horizontal Distance constraint in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Horizontal Distance* item  or
+#. click **Horizontal Distance** button in Sketch toolbar:
+
+.. image:: images/distance_h.png
+   :align: center
 
 .. centered::
-  Create horizontal distance constraint
+   **Horizontal Distance**  button
+
+Property panel:
+
+.. image:: images/HorizontalDistance_panel.png
+   :align: center
+
+Input fields:
+
+- **First object** - the first object
+- **Second object** - the second object
+- **Value** - distance between the objects, could be modified to set the desirable value
+- **Text location** - position of the distance value label relating to extension line (in the view)
+   .. image:: images/location_left.png
+      :align: left
+   **Left** inserts text at the left of the distance extension line.
+
+   .. image:: images/location_automatic.png
+      :align: left
+   **Automatic** inserts text at the middle of the distance extension line if it has enough length, otherwise - to the left.
+
+   .. image:: images/location_right.png
+      :align: left
+   **Right** inserts text to the right of the distance extension line.
+
+When the both objects are selected horizontal distance value is displayed in the property panel and in the view.
+
+When creating the constraint and the both objects are selected the first time:
+
+- drag the horizontal distance presentation in the view to the desired position (by move mouse and click once)
+- set desirable horizontal distance value in the input field in the view and press **Enter** or just press **Enter** to keep the current distance
+
+.. image:: images/HorizontalDistance_field_view.png
+   :align: center
+
+.. centered::
+   Horizontal Distance input in the view
+
+**TUI Command**: *Sketch_1.setHorizontalDistance(FirstObject, SecondObject, Value)*
+
+**Arguments**:  2 objects + horizontal distance value
+
+Result
+""""""
+
+Created Horizontal Distance appears in the view.
+
+.. image:: images/HorizontalDistance_res.png
+          :align: center
+
+.. centered::
+   Horizontal Distance created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_hdistance` operation.
\ No newline at end of file
index 2ef362b395595609a272739cbb1bc901da312362..7676548daa6aec2bafa8be6bd7bdd9cdb4272405 100644 (file)
Binary files a/src/SketchPlugin/doc/images/Distance.png and b/src/SketchPlugin/doc/images/Distance.png differ
diff --git a/src/SketchPlugin/doc/images/Distance_field_view.png b/src/SketchPlugin/doc/images/Distance_field_view.png
new file mode 100644 (file)
index 0000000..6290be9
Binary files /dev/null and b/src/SketchPlugin/doc/images/Distance_field_view.png differ
diff --git a/src/SketchPlugin/doc/images/Distance_panel.png b/src/SketchPlugin/doc/images/Distance_panel.png
new file mode 100644 (file)
index 0000000..27d66ef
Binary files /dev/null and b/src/SketchPlugin/doc/images/Distance_panel.png differ
diff --git a/src/SketchPlugin/doc/images/Distance_res.png b/src/SketchPlugin/doc/images/Distance_res.png
new file mode 100644 (file)
index 0000000..e727371
Binary files /dev/null and b/src/SketchPlugin/doc/images/Distance_res.png differ
diff --git a/src/SketchPlugin/doc/images/HorizontalDist.png b/src/SketchPlugin/doc/images/HorizontalDist.png
deleted file mode 100644 (file)
index 2978923..0000000
Binary files a/src/SketchPlugin/doc/images/HorizontalDist.png and /dev/null differ
diff --git a/src/SketchPlugin/doc/images/HorizontalDistance_field_view.png b/src/SketchPlugin/doc/images/HorizontalDistance_field_view.png
new file mode 100644 (file)
index 0000000..b9bdc9a
Binary files /dev/null and b/src/SketchPlugin/doc/images/HorizontalDistance_field_view.png differ
diff --git a/src/SketchPlugin/doc/images/HorizontalDistance_panel.png b/src/SketchPlugin/doc/images/HorizontalDistance_panel.png
new file mode 100644 (file)
index 0000000..c204cdc
Binary files /dev/null and b/src/SketchPlugin/doc/images/HorizontalDistance_panel.png differ
diff --git a/src/SketchPlugin/doc/images/HorizontalDistance_res.png b/src/SketchPlugin/doc/images/HorizontalDistance_res.png
new file mode 100644 (file)
index 0000000..f50453a
Binary files /dev/null and b/src/SketchPlugin/doc/images/HorizontalDistance_res.png differ
diff --git a/src/SketchPlugin/doc/images/Sketch_fixed.png b/src/SketchPlugin/doc/images/Sketch_fixed.png
new file mode 100644 (file)
index 0000000..ce5577c
Binary files /dev/null and b/src/SketchPlugin/doc/images/Sketch_fixed.png differ
diff --git a/src/SketchPlugin/doc/images/Sketch_underconstrained - Copy.png b/src/SketchPlugin/doc/images/Sketch_underconstrained - Copy.png
new file mode 100644 (file)
index 0000000..852396f
Binary files /dev/null and b/src/SketchPlugin/doc/images/Sketch_underconstrained - Copy.png differ
diff --git a/src/SketchPlugin/doc/images/Sketch_underconstrained.png b/src/SketchPlugin/doc/images/Sketch_underconstrained.png
new file mode 100644 (file)
index 0000000..852396f
Binary files /dev/null and b/src/SketchPlugin/doc/images/Sketch_underconstrained.png differ
diff --git a/src/SketchPlugin/doc/images/VerticalDistance_field_view.png b/src/SketchPlugin/doc/images/VerticalDistance_field_view.png
new file mode 100644 (file)
index 0000000..1c72a71
Binary files /dev/null and b/src/SketchPlugin/doc/images/VerticalDistance_field_view.png differ
diff --git a/src/SketchPlugin/doc/images/VerticalDistance_panel.png b/src/SketchPlugin/doc/images/VerticalDistance_panel.png
new file mode 100644 (file)
index 0000000..9397c7e
Binary files /dev/null and b/src/SketchPlugin/doc/images/VerticalDistance_panel.png differ
diff --git a/src/SketchPlugin/doc/images/VerticalDistance_res.png b/src/SketchPlugin/doc/images/VerticalDistance_res.png
new file mode 100644 (file)
index 0000000..e911a08
Binary files /dev/null and b/src/SketchPlugin/doc/images/VerticalDistance_res.png differ
diff --git a/src/SketchPlugin/doc/images/distance_h.png b/src/SketchPlugin/doc/images/distance_h.png
new file mode 100644 (file)
index 0000000..b88db21
Binary files /dev/null and b/src/SketchPlugin/doc/images/distance_h.png differ
diff --git a/src/SketchPlugin/doc/images/distance_v.png b/src/SketchPlugin/doc/images/distance_v.png
new file mode 100644 (file)
index 0000000..027a384
Binary files /dev/null and b/src/SketchPlugin/doc/images/distance_v.png differ
diff --git a/src/SketchPlugin/doc/images/location_automatic.png b/src/SketchPlugin/doc/images/location_automatic.png
new file mode 100644 (file)
index 0000000..88730b3
Binary files /dev/null and b/src/SketchPlugin/doc/images/location_automatic.png differ
diff --git a/src/SketchPlugin/doc/images/location_left.png b/src/SketchPlugin/doc/images/location_left.png
new file mode 100644 (file)
index 0000000..e963b8d
Binary files /dev/null and b/src/SketchPlugin/doc/images/location_left.png differ
diff --git a/src/SketchPlugin/doc/images/location_right.png b/src/SketchPlugin/doc/images/location_right.png
new file mode 100644 (file)
index 0000000..cdb8551
Binary files /dev/null and b/src/SketchPlugin/doc/images/location_right.png differ
index 9fb6991b9f17e2866a5ea089beb2a9acbc4f4761..47e718a99401cc5aad6b0843c303dba9f4bfb855 100644 (file)
@@ -2,9 +2,70 @@
 Vertical distance constraint
 ============================
 
+Vertical Distance constraint fixes distance between two objects along the vertical axis.
 
-.. image:: images/VerticalDist.png
-  :align: center
+The constraint can be defined between two points such as point object, line or arc end point, center of circle or arc.
+
+To create Vertical Distance constraint in the active Sketch:
+
+#. select in the Main Menu *Sketch - > Vertical Distance* item  or
+#. click **Vertical Distance** button in Sketch toolbar:
+
+.. image:: images/distance_v.png
+   :align: center
 
 .. centered::
-  Create a vertical distance constraint
+   **Vertical Distance**  button
+
+Property panel:
+
+.. image:: images/VerticalDistance_panel.png
+   :align: center
+
+Input fields:
+
+- **First object** - the first object
+- **Second object** - the second object
+- **Value** - distance between the objects, could be modified to set the desirable value
+- **Text location** - position of the distance value label relating to extension line (in the view)
+   .. image:: images/location_left.png
+      :align: left
+   **Left** inserts text at the left of the distance extension line.
+
+   .. image:: images/location_automatic.png
+      :align: left
+   **Automatic** inserts text at the middle of the distance extension line if it has enough length, otherwise - to the left.
+
+   .. image:: images/location_right.png
+      :align: left
+   **Right** inserts text to the right of the distance extension line.
+
+When the both objects are selected vertical distance value is displayed in the property panel and in the view.
+
+When creating the constraint and the both objects are selected the first time:
+
+- drag the Vertical distance presentation in the view to the desired position (by move mouse and click once)
+- set desirable vertical distance value in the input field in the view and press **Enter** or just press **Enter** to keep the current distance
+
+.. image:: images/VerticalDistance_field_view.png
+   :align: center
+
+.. centered::
+   Vertical Distance input in the view
+
+**TUI Command**: *Sketch_1.setVerticalDistance(FirstObject, SecondObject, Value)*
+
+**Arguments**:  2 objects + vertical distance value
+
+Result
+""""""
+
+Created Vertical Distance appears in the view.
+
+.. image:: images/VerticalDistance_res.png
+          :align: center
+
+.. centered::
+   Vertical Distance created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_vdistance` operation.