]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
linear copy, angular copy, fillet, sub-shapes help
authorgzy <gzy@opencascade.com>
Fri, 21 Sep 2018 08:42:31 +0000 (11:42 +0300)
committergzy <gzy@opencascade.com>
Fri, 21 Sep 2018 08:42:31 +0000 (11:42 +0300)
25 files changed:
src/BuildPlugin/doc/TUI_subshapeFeature.rst [new file with mode: 0644]
src/BuildPlugin/doc/examples/subshapes.py [new file with mode: 0644]
src/BuildPlugin/doc/images/feature_subshapes.png [new file with mode: 0644]
src/BuildPlugin/doc/polylineFeature.rst
src/BuildPlugin/doc/subShapesFeature.rst
src/FeaturesPlugin/doc/TUI_angularcopyFeature.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/TUI_filletfixedFeature.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/TUI_filletvariableFeature.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/TUI_linearcopyFeature.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/angularCopyFeature.rst
src/FeaturesPlugin/doc/examples/angularcopy.py [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/fillet1.py [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/fillet2.py [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/linearcopy.py [new file with mode: 0644]
src/FeaturesPlugin/doc/filletFeature.rst
src/FeaturesPlugin/doc/images/Fillet.png
src/FeaturesPlugin/doc/images/Fillet2.png [deleted file]
src/FeaturesPlugin/doc/images/FilletFixed.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/FilletVarious.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/fillet.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/fillet_fixed_radius.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/fillet_var_radius.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/multirotation.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/multitranslation.png [new file with mode: 0644]
src/FeaturesPlugin/doc/linearCopyFeature.rst

diff --git a/src/BuildPlugin/doc/TUI_subshapeFeature.rst b/src/BuildPlugin/doc/TUI_subshapeFeature.rst
new file mode 100644 (file)
index 0000000..10d0f8f
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_subshape:
+
+Create Sub-shapes
+=================
+
+.. literalinclude:: examples/subshapes.py 
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/subshapes.py >` 
+   
diff --git a/src/BuildPlugin/doc/examples/subshapes.py b/src/BuildPlugin/doc/examples/subshapes.py
new file mode 100644 (file)
index 0000000..4f0519f
--- /dev/null
@@ -0,0 +1,29 @@
+# -*- 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"))
+SketchLine_1 = Sketch_1.addLine(-56.65008576329333, 13.33962264150944, 9.528301886792452, 66.69811320754719)
+SketchLine_1.result().setColor(225, 0, 0)
+SketchLine_2 = Sketch_1.addLine(9.528301886792452, 66.69811320754719, 78.47855917667239, -27.54545454545455)
+SketchLine_2.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchLine_3 = Sketch_1.addLine(78.47855917667239, -27.54545454545455, 7.795883361921087, -89.2195540308748)
+SketchLine_3.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchLine_4 = Sketch_1.addLine(7.795883361921087, -89.2195540308748, 12.64665523156088, -20.9622641509434)
+SketchLine_4.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchLine_5 = Sketch_1.addLine(12.64665523156088, -20.9622641509434, -56.65008576329333, 13.33962264150944)
+SketchLine_5.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_1.startPoint())
+model.do()
+Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r-SketchLine_5r")])
+SubShapes_1 = model.addSubShapes(Part_1_doc, model.selection("FACE", "Face_1_1"), [model.selection("EDGE", "Sketch_1/Edge-SketchLine_5"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_4")])
+model.do()
+model.end()
diff --git a/src/BuildPlugin/doc/images/feature_subshapes.png b/src/BuildPlugin/doc/images/feature_subshapes.png
new file mode 100644 (file)
index 0000000..d0e0888
Binary files /dev/null and b/src/BuildPlugin/doc/images/feature_subshapes.png differ
index f6f19416d01f7505e370a40b85c9ea29993ef8aa..566e1f4ac0ba52d5fb94c57187441c5d058566aa 100644 (file)
@@ -21,12 +21,12 @@ The following property panel appears.
   :align: center
 
 .. centered::
-  Create a polyline
+  Polyline property panel
 
 Input fields:
 
 - **Points and vertices** panel contains list of points and vertices selected in 3D OCC viewer. Polyline consequently connects points;
-- **Closed** check-box turns on/off connection of the start and end points to make polyline closed.
+- **Closed** check-box turns on/off connection of the start and end points to make polyline closed/opened.
 
 **TUI Commands**:  *model.addPolyline3D(Part_1_doc, Polyline_objects, Key)*
 
index 174361718c4e22907bb00c5be168e1a7f884344e..97506145341f73194e7dab08d9414b47762f8abd 100644 (file)
@@ -2,9 +2,48 @@
 Sub-shapes
 ==========
 
+The feature **Sub-shapes** creates sub-shapes of selected entity.
+
+To create Sub-shapes in the active part:
+
+#. select in the Main Menu *Build - > Sub-shapes* item  or
+#. click **Sub-shapes** button in the toolbar
+
+.. image:: images/feature_subshapes.png 
+   :align: center
+
+.. centered::
+   **Sub-shapes** button 
+
+The following property panel appears.
 
 .. image:: images/SubShapes.png
   :align: center
 
 .. centered::
-  Create sub-shapes
+  Sub-shapes property panel
+
+Input fields:
+
+- **Shape** panel contains shape to be modified. Shape is selected in 3D OCC viewer or object browser;
+- **Sub-shapes** panel contains list of sub-shapes of given shape to be included into result. Sub-shapes are selected in 3D OCC viewer.
+
+**TUI Command**:  *model.addSubShapes(Part_doc, shape, sub-shapes)*
+
+**Arguments**: 1 part + shape in format *model.selection(TYPE, shape)* + list of sub-shapes in format *model.selection(TYPE, subshape)*.
+
+Result
+""""""
+Result of operation is shown below.
+
+.. image:: images/SubShapes.png
+   :align: center
+
+.. centered::
+   Sub-shapes
+
+**See Also** a sample TUI Script of a :ref:`tui_create_subshape` operation.
+
+
+  
+
diff --git a/src/FeaturesPlugin/doc/TUI_angularcopyFeature.rst b/src/FeaturesPlugin/doc/TUI_angularcopyFeature.rst
new file mode 100644 (file)
index 0000000..11df5f0
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_angularcopy:
+
+Create Angular copy
+===================
+
+.. literalinclude:: examples/angularcopy.py 
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/angularcopy.py >` 
+   
diff --git a/src/FeaturesPlugin/doc/TUI_filletfixedFeature.rst b/src/FeaturesPlugin/doc/TUI_filletfixedFeature.rst
new file mode 100644 (file)
index 0000000..e573efe
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_fillet1:
+
+Create Fillet by fixed radius
+=============================
+
+.. literalinclude:: examples/fillet1.py 
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/fillet1.py >` 
+   
diff --git a/src/FeaturesPlugin/doc/TUI_filletvariableFeature.rst b/src/FeaturesPlugin/doc/TUI_filletvariableFeature.rst
new file mode 100644 (file)
index 0000000..ddcee3c
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_fillet2:
+
+Create Fillet by variable radius
+================================
+
+.. literalinclude:: examples/fillet2.py 
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/fillet2.py >` 
+   
diff --git a/src/FeaturesPlugin/doc/TUI_linearcopyFeature.rst b/src/FeaturesPlugin/doc/TUI_linearcopyFeature.rst
new file mode 100644 (file)
index 0000000..8b52750
--- /dev/null
@@ -0,0 +1,11 @@
+
+  .. _tui_create_linearcopy:
+
+Create Linear copy
+==================
+
+.. literalinclude:: examples/linearcopy.py  
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/linearcopy.py  >`  
index 3d3fec12cc63bce0506b0874427d487fdf66a821..3c5c989b883d6a1ccee48f9f2e1da3c348e9f49e 100644 (file)
@@ -2,9 +2,46 @@
 Angular copy
 ============
 
+The feature **Angular copy** makes a compound of several rotated shapes basing on the initial shape. 
+
+To create Angular copy in the active part:
+
+#. select in the Main Menu *Part - > Angular copy* item  or
+#. click **Angular copy** button in the toolbar
+
+.. image:: images/multirotation.png  
+   :align: center
+
+.. centered::
+   **Angular copy** button 
+
+The following property panel appears.
 
 .. image:: images/AngularCopy.png
   :align: center
 
 .. centered::
-  Angular copy definition
+  Angular copy property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser;
+- **Vector of rotation**  defines the axis of rotation. Vector is edge, axis selected in 3D OCC viewer or object browser;
+- **Angular Step** check-box turns on/off definition of the angle by which the object is rotated. By default (if the checkbox is not checked), **Angular Step** = 2 * PI / NbTimes;
+- **Nb. Copies** defines the number of rotated shape copies in the resulting compound. If **Nb. Copies** = 1, the result contains only the initial shape.
+
+**TUI Command**:  *model.addMultiRotation(Part_doc, [shape], axis, step, Nb)*
+
+**Arguments**: 1 part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (step value) + integer (Nb. Copies).
+
+Result
+""""""
+Result of cylinder rotation is compound.
+
+.. image:: images/angularcopy.png
+   :align: center
+
+.. centered::
+   Angular copy
+
+**See Also** a sample TUI Script of a :ref:`tui_create_angularcopy` operation.  
diff --git a/src/FeaturesPlugin/doc/examples/angularcopy.py b/src/FeaturesPlugin/doc/examples/angularcopy.py
new file mode 100644 (file)
index 0000000..02483c1
--- /dev/null
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+AngularCopy_1 = model.addMultiRotation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OY"), 90, 3)
+model.do()
+model.end()
diff --git a/src/FeaturesPlugin/doc/examples/fillet1.py b/src/FeaturesPlugin/doc/examples/fillet1.py
new file mode 100644 (file)
index 0000000..67299d8
--- /dev/null
@@ -0,0 +1,12 @@
+# -*- 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)
+Fillet_1 = model.addFillet(Part_1_doc, [model.selection("FACE", "Box_1_1/Front"), model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top")], 2)
+model.do()
+model.end()
diff --git a/src/FeaturesPlugin/doc/examples/fillet2.py b/src/FeaturesPlugin/doc/examples/fillet2.py
new file mode 100644 (file)
index 0000000..a72a7ec
--- /dev/null
@@ -0,0 +1,12 @@
+# -*- 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)
+Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top")], 1, 3)
+model.do()
+model.end()
diff --git a/src/FeaturesPlugin/doc/examples/linearcopy.py b/src/FeaturesPlugin/doc/examples/linearcopy.py
new file mode 100644 (file)
index 0000000..5126b88
--- /dev/null
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sphere_1 = model.addSphere(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), 10)
+LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Sphere_1_1")], model.selection("EDGE", "PartSet/OX"), 30, 3, model.selection("EDGE", "PartSet/OY"), 30, 2)
+model.do()
+model.end()
index 08343f728656c1c1f66cc3bb791776460945036c..8e9c329c50594c2a75bcf0a2fdb0c49bc9a48167 100644 (file)
@@ -2,16 +2,92 @@
 Fillet
 ======
 
+The feature **Fillet** creates fillets on the edges of a shape. 
 
-.. image:: images/Fillet.png
+To create Fillet in the active part:
+
+#. select in the Main Menu *Feature - > Fillet* item  or
+#. click **Fillet** button in the toolbar
+
+.. image:: images/fillet.png  
+   :align: center
+
+.. centered::
+   **Fillet** button 
+
+There are 2 types of fillet:
+
+  .. image:: images/fillet_fixed_radius.png   
+    :align: left
+  fillet by fixed radius
+
+  .. image:: images/fillet_var_radius.png   
+    :align: left
+  fillet by variable radius
+
+Fillet by fixed radius
+----------------------
+
+The  property panel is shown below.
+
+.. image:: images/FilletFixed.png
   :align: center
 
 .. centered::
-  Fillet by fixed radius
+  Fillet by fixed radius property panel
+
+Input fields:
+
+- **Faces or/and edges** panel contains faces and edges on which fillet is done. All edges of face are subjected to fillet operation. Faces and edges are selected in 3D OCC viewer;
+- **Radius** defines fillet radius.
+
+**TUI Command**:  *model.addFillet(Part_doc, [face,edge], radius)*
+
+**Arguments**: 1 part + list of faces and edges subjected to fillet operation in format *model.selection(TYPE, shape)* + real (radius value).
+
+Result
+""""""
+
+Result of **Fillet by fixed radius** is shown below.
 
+.. image:: images/fillet_fix_rad.png
+   :align: center
 
-.. image:: images/Fillet2.png
+.. centered::
+   Fillet by fixed radius
+
+**See Also** a sample TUI Script of a :ref:`tui_create_fillet1` operation.
+
+Fillet by variable radius
+-------------------------
+
+Alternatively, there is a possibility to create a fillet with a variable radius.
+
+.. image:: images/FilletVarious.png
   :align: center
 
 .. centered::
-  Fillet by varyable radius
+  Fillet by variable radius
+
+Input fields:
+
+- **Faces or/and edges** panel contains faces and edges on which fillet is done. All edges of face are subjected to fillet operation. Faces and edges are selected in 3D OCC viewer;
+- **Start radius** defines  the  fillet radius at the start of the selected edge(s);  
+- **End radius** defines  the  fillet radius at the end of the selected edge(s).
+
+**TUI Command**:  *model.addFillet(Part_doc, [face,edge], R1, R2)*
+
+**Arguments**: 1 part + list of faces and edges subjected to fillet operation in format *model.selection(TYPE, shape)* + 2 reals (start and end radius values).
+
+Result
+""""""
+
+Result of **Fillet by variable radius** is shown below.
+
+.. image:: images/fillet_var_rad.png
+   :align: center
+
+.. centered::
+   Fillet by variable radius
+
+**See Also** a sample TUI Script of a :ref:`tui_create_fillet2` operation.
index 7f804075fcb44f8b2ad504d6f3767b1a824e0c37..3b5a98289beb35c659debbc7cecde2e9f7a62c56 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/Fillet.png and b/src/FeaturesPlugin/doc/images/Fillet.png differ
diff --git a/src/FeaturesPlugin/doc/images/Fillet2.png b/src/FeaturesPlugin/doc/images/Fillet2.png
deleted file mode 100644 (file)
index bc9708e..0000000
Binary files a/src/FeaturesPlugin/doc/images/Fillet2.png and /dev/null differ
diff --git a/src/FeaturesPlugin/doc/images/FilletFixed.png b/src/FeaturesPlugin/doc/images/FilletFixed.png
new file mode 100644 (file)
index 0000000..7f80407
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/FilletFixed.png differ
diff --git a/src/FeaturesPlugin/doc/images/FilletVarious.png b/src/FeaturesPlugin/doc/images/FilletVarious.png
new file mode 100644 (file)
index 0000000..bc9708e
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/FilletVarious.png differ
diff --git a/src/FeaturesPlugin/doc/images/fillet.png b/src/FeaturesPlugin/doc/images/fillet.png
new file mode 100644 (file)
index 0000000..3b5a982
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/fillet.png differ
diff --git a/src/FeaturesPlugin/doc/images/fillet_fixed_radius.png b/src/FeaturesPlugin/doc/images/fillet_fixed_radius.png
new file mode 100644 (file)
index 0000000..0897bde
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/fillet_fixed_radius.png differ
diff --git a/src/FeaturesPlugin/doc/images/fillet_var_radius.png b/src/FeaturesPlugin/doc/images/fillet_var_radius.png
new file mode 100644 (file)
index 0000000..56e4a78
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/fillet_var_radius.png differ
diff --git a/src/FeaturesPlugin/doc/images/multirotation.png b/src/FeaturesPlugin/doc/images/multirotation.png
new file mode 100644 (file)
index 0000000..fb82a1e
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/multirotation.png differ
diff --git a/src/FeaturesPlugin/doc/images/multitranslation.png b/src/FeaturesPlugin/doc/images/multitranslation.png
new file mode 100644 (file)
index 0000000..d0d9c15
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/multitranslation.png differ
index 38509c3b97e35a5f05cc709388bac04b85278ad2..8f7e92dd8397a13dc5d4249513b8c399366df163 100644 (file)
@@ -2,9 +2,54 @@
 Linear copy
 ===========
 
+The feature **Linear copy** makes several translations of a selected shape in one or two directions.
+
+To create Linear copy in the active part:
+
+#. select in the Main Menu *Part - > Linear copy* item  or
+#. click **Linear copy** button in the toolbar
+
+.. image:: images/multitranslation.png  
+   :align: center
+
+.. centered::
+   **Linear copy** button 
+
+The following property panel appears.
 
 .. image:: images/LinearCopy.png
   :align: center
 
 .. centered::
-  Linear copy
+  Linear copy property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
+- **First direction** defines translation in the first direction:
+
+  - **Vector of translation**  defines vector along which the object will be translated. Vector is edge, axis selected in 3D OCC viewer or object browser;
+  - **Step** defines the distance between the shape copies;
+  - **Nb. Copies** is the number of shape copies;
+- **Second direction** check-box turns on/off translation in the second direction:
+
+  - **Vector of translation**  defines vector along which the object will be translated. Vector is edge, axis selected in 3D OCC viewer or object browser;
+  - **Step** defines the distance between the shape copies;
+  - **Nb. Copies** defines the number of shape copies.
+
+**TUI Command**:  *model.addMultiTranslation(Part_doc, [shape], axis1, step1, Nb1, axis2, step2, Nb2)*
+
+**Arguments**: 1 part + list of shapes in format *model.selection(TYPE, shape)* + 2 axis in format *model.selection(TYPE, shape)*+ 2 real (step values) + 2 integers (Nb. Copies).
+
+Result
+""""""
+Result of operation is compound.
+
+.. image:: images/linearcopy.png
+   :align: center
+
+.. centered::
+   Sub-shapes
+
+**See Also** a sample TUI Script of a :ref:`tui_create_linearcopy` operation.
\ No newline at end of file