]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Create Construction plugin help pages
authorvsv <vsv@opencascade.com>
Wed, 15 Aug 2018 14:20:38 +0000 (17:20 +0300)
committervsv <vsv@opencascade.com>
Wed, 15 Aug 2018 14:20:38 +0000 (17:20 +0300)
30 files changed:
src/ConstructionPlugin/doc/TUI_axisFeature.rst [new file with mode: 0644]
src/ConstructionPlugin/doc/TUI_planeFeature.rst [new file with mode: 0644]
src/ConstructionPlugin/doc/TUI_pointFeature.rst [new file with mode: 0644]
src/ConstructionPlugin/doc/axisFeature.rst
src/ConstructionPlugin/doc/examples/axis.py [new file with mode: 0644]
src/ConstructionPlugin/doc/examples/plane.py [new file with mode: 0644]
src/ConstructionPlugin/doc/examples/point.py [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Axis1.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Axis2.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Axis3.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Axis4.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Axis5.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Axis6.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/CreatePoint.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/CreatedAxis.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/CreatedPlane.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Plane1.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Plane2.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Plane3.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Plane4.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Point1.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Point2.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Point3.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Point4.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/Point5.png [new file with mode: 0644]
src/ConstructionPlugin/doc/images/axis_button.png [new file with mode: 0755]
src/ConstructionPlugin/doc/images/plane_button.png [new file with mode: 0755]
src/ConstructionPlugin/doc/images/point_button.png [new file with mode: 0755]
src/ConstructionPlugin/doc/planeFeature.rst
src/ConstructionPlugin/doc/pointFeature.rst

diff --git a/src/ConstructionPlugin/doc/TUI_axisFeature.rst b/src/ConstructionPlugin/doc/TUI_axisFeature.rst
new file mode 100644 (file)
index 0000000..01587e8
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_axis:
+
+Create Axis
+===========
+
+.. literalinclude:: examples/axis.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/axis.py>` 
+   
diff --git a/src/ConstructionPlugin/doc/TUI_planeFeature.rst b/src/ConstructionPlugin/doc/TUI_planeFeature.rst
new file mode 100644 (file)
index 0000000..e3e8684
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_plane:
+
+Create Plane
+============
+
+.. literalinclude:: examples/plane.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/plane.py>` 
+   
diff --git a/src/ConstructionPlugin/doc/TUI_pointFeature.rst b/src/ConstructionPlugin/doc/TUI_pointFeature.rst
new file mode 100644 (file)
index 0000000..4aec387
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_point:
+
+Create Point
+============
+
+.. literalinclude:: examples/point.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/point.py>` 
+   
index bb372bbca1fae423425f3e5c2452ff5bb241bcd7..d630af72cf7f6233c626503ffb246529551fc8e9 100644 (file)
@@ -1,3 +1,83 @@
 
 Axis
 ====
+
+Axis is a construction object and it can be created as in a part as in part set. To create an axis:
+
+#. select in the Main Menu *Construction - > Axis* item  or
+#. click **Axis** button in the toolbar
+
+.. image:: images/axis_button.png
+  :align: center
+
+.. centered::
+  **Axis** button
+
+There are 6 algorithms for creation of an Axis:
+
+.. image:: images/Axis1.png
+   :align: center
+       
+.. centered::
+   **By dX, dY, dZ values**
+
+In this case user has to define dX, dY, dZ values of a vector.
+
+.. image:: images/Axis2.png
+   :align: center
+       
+.. centered::
+   **By two points**
+
+In this case user has to select two points or vertices.
+
+.. image:: images/Axis3.png
+   :align: center
+       
+.. centered::
+   **By a line**
+
+In this case user has to select a linear edge.
+
+.. image:: images/Axis4.png
+   :align: center
+       
+.. centered::
+   **By a cylinder**
+
+In this case user has to select a cylindrical face. Axis of the cylinder will define an axis object.
+
+.. image:: images/Axis5.png
+   :align: center
+       
+.. centered::
+   **By a plane and point**
+
+In this case user has to select a point or vertex and plane (or planar face). Axis will be defined as a normal from the point to the plane.
+
+.. image:: images/Axis6.png
+   :align: center
+       
+.. centered::
+   **By two planes**
+
+In this case user has to select two planes. Intersection of that planes defines an axis. User can define offset for axis definition from both planes.
+
+**TUI Commands**:
+
+#. *model.addAxis(Part_doc, 10, 10, 10)*  **Arguments**: Part + 3 values (dX, dY, dZ values).
+#. *model.addAxis(Part_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"))*  **Arguments**: Part + 2 vertices.
+#. *model.addAxis(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"))*  **Arguments**: Part + edge.
+#. *model.addAxis(Part_doc, model.selection("FACE", "Cylinder_1_1/Face_1"))*  **Arguments**: Part + cylindrical face.
+#. *model.addAxis(Part_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top"))*   **Arguments**: Part + plane + point.
+#. *model.addAxis(Part_doc, model.selection("FACE", "Box_1_1/Top"), 5, False, model.selection("FACE", "Box_1_1/Front"), 3, False)*  **Arguments**: Part + plane + offcet value + is reversed flag + plane + offcet value + is reversed flag.
+
+The Result of the operation will be an axis:
+
+.. image:: images/CreatedAxis.png
+          :align: center
+
+.. centered::
+   Axis created  
+
+**See Also** a sample TUI Script of a :ref:`tui_create_axis` operation.
diff --git a/src/ConstructionPlugin/doc/examples/axis.py b/src/ConstructionPlugin/doc/examples/axis.py
new file mode 100644 (file)
index 0000000..7072fc2
--- /dev/null
@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+
+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)
+Axis_4 = model.addAxis(Part_1_doc, 10, 10, 10)
+Axis_5 = model.addAxis(Part_1_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"))
+Axis_6 = model.addAxis(Part_1_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"))
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Axis_7 = model.addAxis(Part_1_doc, model.selection("FACE", "Cylinder_1_1/Face_1"))
+Axis_8 = model.addAxis(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top"))
+Axis_9 = model.addAxis(Part_1_doc, model.selection("FACE", "Box_1_1/Top"), 5, False, model.selection("FACE", "Box_1_1/Front"), 3, False)
+model.do()
+model.end()
diff --git a/src/ConstructionPlugin/doc/examples/plane.py b/src/ConstructionPlugin/doc/examples/plane.py
new file mode 100644 (file)
index 0000000..31580ae
--- /dev/null
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+
+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)
+Plane_4 = model.addPlane(Part_1_doc,
+                         model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"),
+                         model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top"),
+                         model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Bottom"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"),
+                         model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"), False)
+Plane_6 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), 10, False)
+Plane_7 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"),
+                         model.selection("FACE", "Box_1_1/Right"))
+model.do()
+model.end()
diff --git a/src/ConstructionPlugin/doc/examples/point.py b/src/ConstructionPlugin/doc/examples/point.py
new file mode 100644 (file)
index 0000000..51465bd
--- /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()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Point_2 = model.addPoint(Part_1_doc, 50, 50, 50)
+Point_3 = model.addPoint(Part_1_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), 0.5, True, False)
+Point_4 = model.addPoint(Part_1_doc, model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"), model.selection("EDGE", "Box_1_1/Right&Box_1_1/Top"))
+Point_5 = model.addPoint(Part_1_doc, model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"), model.selection("FACE", "Box_1_1/Left"), 10, False)
+Point_6 = model.addPoint(Part_1_doc, model.selection("SOLID", "Box_1_1"))
+model.do()
+model.end()
diff --git a/src/ConstructionPlugin/doc/images/Axis1.png b/src/ConstructionPlugin/doc/images/Axis1.png
new file mode 100644 (file)
index 0000000..b0d5a1a
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis1.png differ
diff --git a/src/ConstructionPlugin/doc/images/Axis2.png b/src/ConstructionPlugin/doc/images/Axis2.png
new file mode 100644 (file)
index 0000000..f9f5343
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis2.png differ
diff --git a/src/ConstructionPlugin/doc/images/Axis3.png b/src/ConstructionPlugin/doc/images/Axis3.png
new file mode 100644 (file)
index 0000000..ca6dd92
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis3.png differ
diff --git a/src/ConstructionPlugin/doc/images/Axis4.png b/src/ConstructionPlugin/doc/images/Axis4.png
new file mode 100644 (file)
index 0000000..10cf6c4
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis4.png differ
diff --git a/src/ConstructionPlugin/doc/images/Axis5.png b/src/ConstructionPlugin/doc/images/Axis5.png
new file mode 100644 (file)
index 0000000..46cab45
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis5.png differ
diff --git a/src/ConstructionPlugin/doc/images/Axis6.png b/src/ConstructionPlugin/doc/images/Axis6.png
new file mode 100644 (file)
index 0000000..8d6baa5
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis6.png differ
diff --git a/src/ConstructionPlugin/doc/images/CreatePoint.png b/src/ConstructionPlugin/doc/images/CreatePoint.png
new file mode 100644 (file)
index 0000000..07cc04f
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/CreatePoint.png differ
diff --git a/src/ConstructionPlugin/doc/images/CreatedAxis.png b/src/ConstructionPlugin/doc/images/CreatedAxis.png
new file mode 100644 (file)
index 0000000..8ec0084
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/CreatedAxis.png differ
diff --git a/src/ConstructionPlugin/doc/images/CreatedPlane.png b/src/ConstructionPlugin/doc/images/CreatedPlane.png
new file mode 100644 (file)
index 0000000..1558ae3
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/CreatedPlane.png differ
diff --git a/src/ConstructionPlugin/doc/images/Plane1.png b/src/ConstructionPlugin/doc/images/Plane1.png
new file mode 100644 (file)
index 0000000..6adfafb
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Plane1.png differ
diff --git a/src/ConstructionPlugin/doc/images/Plane2.png b/src/ConstructionPlugin/doc/images/Plane2.png
new file mode 100644 (file)
index 0000000..23b4c7e
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Plane2.png differ
diff --git a/src/ConstructionPlugin/doc/images/Plane3.png b/src/ConstructionPlugin/doc/images/Plane3.png
new file mode 100644 (file)
index 0000000..3351395
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Plane3.png differ
diff --git a/src/ConstructionPlugin/doc/images/Plane4.png b/src/ConstructionPlugin/doc/images/Plane4.png
new file mode 100644 (file)
index 0000000..2c53d7a
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Plane4.png differ
diff --git a/src/ConstructionPlugin/doc/images/Point1.png b/src/ConstructionPlugin/doc/images/Point1.png
new file mode 100644 (file)
index 0000000..f917286
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point1.png differ
diff --git a/src/ConstructionPlugin/doc/images/Point2.png b/src/ConstructionPlugin/doc/images/Point2.png
new file mode 100644 (file)
index 0000000..e272ee7
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point2.png differ
diff --git a/src/ConstructionPlugin/doc/images/Point3.png b/src/ConstructionPlugin/doc/images/Point3.png
new file mode 100644 (file)
index 0000000..fa9d4c9
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point3.png differ
diff --git a/src/ConstructionPlugin/doc/images/Point4.png b/src/ConstructionPlugin/doc/images/Point4.png
new file mode 100644 (file)
index 0000000..8072605
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point4.png differ
diff --git a/src/ConstructionPlugin/doc/images/Point5.png b/src/ConstructionPlugin/doc/images/Point5.png
new file mode 100644 (file)
index 0000000..fe7f84f
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point5.png differ
diff --git a/src/ConstructionPlugin/doc/images/axis_button.png b/src/ConstructionPlugin/doc/images/axis_button.png
new file mode 100755 (executable)
index 0000000..015d270
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/axis_button.png differ
diff --git a/src/ConstructionPlugin/doc/images/plane_button.png b/src/ConstructionPlugin/doc/images/plane_button.png
new file mode 100755 (executable)
index 0000000..1da3282
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/plane_button.png differ
diff --git a/src/ConstructionPlugin/doc/images/point_button.png b/src/ConstructionPlugin/doc/images/point_button.png
new file mode 100755 (executable)
index 0000000..96149eb
Binary files /dev/null and b/src/ConstructionPlugin/doc/images/point_button.png differ
index dbe2ac344ec61763c125ad934d1bee7b375791ef..2822fde09b230a460f23c2de644fb3dd0d637c34 100644 (file)
@@ -1,3 +1,69 @@
 
 Plane
 =====
+
+Plane is a construction object and it can be created as in a part as in part set. To create a plane:
+
+#. select in the Main Menu *Construction - > Plane* item  or
+#. click **Point** button in the toolbar
+
+.. image:: images/plane_button.png
+  :align: center
+
+.. centered::
+  **Plane** button
+
+There are 4 algorithms for creation of a Plane:
+
+.. image:: images/Plane1.png
+   :align: center
+       
+.. centered::
+   **By three points**
+
+In this case user has to select three points in a viewer to define a new plane.
+
+.. image:: images/Plane2.png
+   :align: center
+       
+.. centered::
+   **Line and point**
+
+In this case user has to select a linear edge and point to define a plane. It is possible to make the new plane perpendicular to the selected edge.
+
+.. image:: images/Plane3.png
+   :align: center
+       
+.. centered::
+   **By other plane**
+
+In this case user has to select an already existing plane (planar face). There are following possibilities to define a new plane:
+
+#. By distance from the selected plane.
+#. By coincidence to a point.
+#. By rotation around an edge on a specified angle.
+
+.. image:: images/Plane4.png
+   :align: center
+       
+.. centered::
+   **By two parallel planes**
+
+In this case user has to select two parallel planes. A new plane will be defined between them.
+
+**TUI Commands**:
+
+#. *model.addPlane(Part_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Bottom"))*  **Arguments**: Part + 3 vertices.
+#. *model.addPlane(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"), False)*  **Arguments**: Part + line + point + is perpendicular to line flag.
+#. *model.addPlane(Part_doc, model.selection("FACE", "Box_1_1/Front"), 10, False)*  **Arguments**: Part + a plane + offset + is reverse flag.
+#. *model.addPlane(Part_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))*  **Arguments**: Part + 2 planes.
+
+The Result of the operation will be a plane:
+
+.. image:: images/CreatedPlane.png
+          :align: center
+
+.. centered::
+   Plane created  
+
+**See Also** a sample TUI Script of a :ref:`tui_create_plane` operation.
index 64f21b1673f60c4da77846432d451395d41db088..fcb00f6b2dc4e91d3431e0addb6088e3a3d5ef91 100644 (file)
@@ -1,3 +1,80 @@
 
 Point
 =====
+
+Point is a construction object and it can be created as in a part as in part set. To create a point:
+
+#. select in the Main Menu *Construction - > Point* item  or
+#. click **Point** button in the toolbar
+
+.. image:: images/point_button.png
+  :align: center
+
+.. centered::
+  **Point** button
+
+There are 5 algorithms for creation of a Point:
+
+.. image:: images/Point1.png
+   :align: center
+       
+.. centered::
+   **By X,Y,Z coordinates**
+
+In this case user has to input X, Y, and Z coordinates.
+
+.. image:: images/Point2.png
+   :align: center
+       
+.. centered::
+   **Along an edge**
+
+In this case user has to select an edge in a viewer and to define a distance along the edge where point will be defined. This distance can be defined as by an absolute value as by relative as a ratio to the edge length. The direction of the edge can be reverced by the corresponded check box.
+
+.. image:: images/Point3.png
+   :align: center
+       
+.. centered::
+   **By projection**
+
+In this case user has to select an existing point or vertex and an edge or face. The new point will be created by projection of the selected point on the edge or face.
+
+.. image:: images/Point4.png
+   :align: center
+       
+.. centered::
+   **Intersection of objects**
+
+In this case user has to select:
+
+#. two edges,
+#. edge and plane,
+#. three planes
+
+The new point will be defined by intersection of selected objects.
+
+.. image:: images/Point5.png
+   :align: center
+       
+.. centered::
+   **By geometrical property**
+
+In this case the new point can be defined as a center of gravity of selected object or as a center of a circle. User has to select desirable object.
+
+**TUI Commands**:
+
+#. *model.addPoint(Part_doc, 50, 50, 50)*  **Arguments**: Part + 3 values (X, Y, Z coordinates).
+#. *model.addPoint(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), 0.5, True, False)*  **Arguments**: Part + edge + value + is by ratio flag + to reverce flag.
+#. *model.addPoint(Part_doc, model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"), model.selection("EDGE", "Box_1_1/Right&Box_1_1/Top"))*   **Arguments**: Part + vertex + edge (or plane).
+#. *model.addPoint(Part_doc, model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"), model.selection("FACE", "Box_1_1/Left"), 10, False)*   **Arguments**: Part + edge + plane (planar face) + offset value + is offcet reversed.
+#. *model.addPoint(Part_1_doc, model.selection("SOLID", "Box_1_1"))*   **Arguments**: Part + solid
+
+The Result of the operation will be a construction point:
+
+.. image:: images/CreatePoint.png
+          :align: center
+
+.. centered::
+   Point created  
+
+**See Also** a sample TUI Script of a :ref:`tui_create_point` operation.