]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Tasks #3016 and #3015: 'through all' mode. Added documentation and translations.
authorjfa <jfa@opencascade.com>
Thu, 7 Nov 2019 11:30:46 +0000 (14:30 +0300)
committerjfa <jfa@opencascade.com>
Thu, 7 Nov 2019 11:30:46 +0000 (14:30 +0300)
22 files changed:
src/FeaturesPlugin/FeaturesPlugin_msg_fr.ts
src/FeaturesPlugin/doc/TUI_extrusionCutThroughAll.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/TUI_extrusionFuseThroughAll.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/extrusion_cut_through_all.py [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/extrusion_fuse_through_all.py [new file with mode: 0644]
src/FeaturesPlugin/doc/extrusionCutFeature.rst
src/FeaturesPlugin/doc/images/ExtrusionCut1.png
src/FeaturesPlugin/doc/images/ExtrusionCut2.png
src/FeaturesPlugin/doc/images/ExtrusionCut3.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/ExtrusionFuse1.png
src/FeaturesPlugin/doc/images/ExtrusionFuse2.png
src/FeaturesPlugin/doc/images/ExtrusionFuse3.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/RevolutionCut1.png
src/FeaturesPlugin/doc/images/RevolutionCut2.png
src/FeaturesPlugin/doc/images/RevolutionCut3.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/RevolutionFuse1.png
src/FeaturesPlugin/doc/images/RevolutionFuse2.png
src/FeaturesPlugin/doc/images/RevolutionFuse3.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/extrusion_cut_through_all_result.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/extrusion_through_all.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/revolution_fuse_through_all_result.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/revolution_through_all.png

index 3bbe138edcb47304c748ecf276c46a37f34ed936..95b2e83e2bd3bc8f2e193af7c251c02fc1efbc64 100644 (file)
       <source>By sizes</source>
       <translation>Par tailles</translation>
     </message>
+    <message>
+      <source>Through all</source>
+      <translation>À travers tous</translation>
+    </message>
   </context>
   <context>
     <name>ExtrusionCut:base</name>
       <source>By sizes</source>
       <translation>Par tailles</translation>
     </message>
+    <message>
+      <source>Through all</source>
+      <translation>À travers tous</translation>
+    </message>
   </context>
   <context>
     <name>ExtrusionFuse:base</name>
       <source>By bounding planes and angles</source>
       <translation>En délimitant des plans et des angles</translation>
     </message>
+    <message>
+      <source>Through all</source>
+      <translation>À travers tous</translation>
+    </message>
   </context>
   <context>
     <name>RevolutionCut:axis_object</name>
       <source>By bounding planes and angles</source>
       <translation>En délimitant des plans et des angles</translation>
     </message>
+    <message>
+      <source>Through all</source>
+      <translation>À travers tous</translation>
+    </message>
   </context>
   <context>
     <name>RevolutionFuse:axis_object</name>
       <source>Select an edge for axis</source>
       <translation>Sélectionnez une arête pour l&apos;axe</translation>
     </message>
+    <message>
+      <source>Attribute "%1" is not initialized.</source>
+      <translation>L&apos;axe de translation n&apos;est pas sélectionné.</translation>
+    </message>
   </context>
   <context>
     <name>Translation:distance</name>
diff --git a/src/FeaturesPlugin/doc/TUI_extrusionCutThroughAll.rst b/src/FeaturesPlugin/doc/TUI_extrusionCutThroughAll.rst
new file mode 100644 (file)
index 0000000..c5ff730
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_extrusion_cut_through_all:
+
+Create Extrusion Cut through all objects
+========================================
+
+.. literalinclude:: examples/extrusion_cut_through_all.py 
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/extrusion_cut_through_all.py>`
+   
diff --git a/src/FeaturesPlugin/doc/TUI_extrusionFuseThroughAll.rst b/src/FeaturesPlugin/doc/TUI_extrusionFuseThroughAll.rst
new file mode 100644 (file)
index 0000000..a65ce34
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_extrusion_fuse_through_all:
+
+Create Extrusion Fuse through all objects
+========================================
+
+.. literalinclude:: examples/extrusion_fuse_through_all.py 
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/extrusion_fuse_through_all.py>`
+   
diff --git a/src/FeaturesPlugin/doc/examples/extrusion_cut_through_all.py b/src/FeaturesPlugin/doc/examples/extrusion_cut_through_all.py
new file mode 100644 (file)
index 0000000..d9f380b
--- /dev/null
@@ -0,0 +1,17 @@
+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)
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc,
+                                       [],
+                                       model.selection(),
+                                       [model.selection("SOLID", "Box_1_1")])
+Sketch_1 = model.addSketch(Part_1_doc,
+                           model.selection("FACE", "Box_1_1/Top"))
+SketchCircle_1 = Sketch_1.addCircle(5, 0, 2)
+ExtrusionCut_1.setNestedSketch(Sketch_1)
+model.do()
+model.end()
diff --git a/src/FeaturesPlugin/doc/examples/extrusion_fuse_through_all.py b/src/FeaturesPlugin/doc/examples/extrusion_fuse_through_all.py
new file mode 100644 (file)
index 0000000..f64d433
--- /dev/null
@@ -0,0 +1,36 @@
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+
+# Objects to be cut
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Box_2 = model.addBox(Part_1_doc, 10, 10, 10)
+Box_3 = model.addBox(Part_1_doc, 20, 20, 20)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_2_1")], 20, 10, 0)
+Translation_2 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_3_1")], 40, 20, 0)
+ExtrusionFuse_1_objects_2 = [model.selection("SOLID", "Box_1_1"),
+                             model.selection("SOLID", "Translation_1_1"),
+                             model.selection("SOLID", "Translation_2_1")]
+
+# Extrusion direction
+Point_1 = model.addPoint(Part_1_doc, 0, 0, 0)
+Point_2 = model.addPoint(Part_1_doc, 60, 40, 20)
+Edge_1 = model.addEdge(Part_1_doc, model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2"))
+
+# Base object for extrusion
+Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Box_1_1/Back"))
+SketchCircle_1 = Sketch_1.addCircle(2.13, -2.43, 1.6)
+model.do()
+Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r")])
+
+# Extrusion fuse through all
+ExtrusionFuse_1 = model.addExtrusionFuse(Part_1_doc,
+                                         [model.selection("FACE", "Face_1_1")],
+                                         model.selection("EDGE", "Edge_1_1"),
+                                         ExtrusionFuse_1_objects_2)
+
+model.do()
+model.end()
index ca3499c2cbb63382f402fb81c647fbd5f0b45817..fb6a4dee4127118616897bb4653b224fb1b61449 100644 (file)
@@ -18,7 +18,7 @@ The following property panel will be opened:
 .. centered::
   Start sketch
 
-There are two variants of the property panel for Extrusion Cut depending on the chosen option:
+There are three variants of the property panel for Extrusion Cut depending on the chosen option:
 
 .. image:: images/extrusion_by_sizes.png
    :align: left
@@ -28,6 +28,10 @@ There are two variants of the property panel for Extrusion Cut depending on the
    :align: left
 **By Bounding Planes** extrudes objects by specifying bounding planes and offsets.
 
+.. image:: images/extrusion_through_all.png
+   :align: left
+**Through All** extrudes base objects through all objects to be cut.
+
 
 By sizes
 --------
@@ -42,7 +46,7 @@ By sizes
 - **Axis** - if selected, it will be the direction of extrusion, otherwise objects normals will be used.
 - **To size**  - size for extrusion in the direction.
 - **From size** - size for extrusion in the opposite direction.
-- **Cut from** - contains a list of objects which will be cut from the result of extrusion.
+- **Cut from** - contains a list of objects to be cut by the result of extrusion.
 
 **TUI Commands**:  
 
@@ -110,7 +114,7 @@ By bounding planes
 - **To offset** - offset for extrusion or for a bounding plane, if selected.
 - **From plane** - a planar face can be selected to bound extrusion from the other side.
 - **From offset** - offset for extrusion or for a bounding plane, if selected.
-- **Cut from** - contains a list of objects which will be cut from the result of extrusion.
+- **Cut from** - contains a list of objects which will be cut by the result of extrusion.
 
 **TUI Commands**:
 
@@ -149,3 +153,46 @@ The Result of the operation will be an extruded shape:
    **Created Extrusion Cut**
 
 **See Also** a sample TUI Script of :ref:`tui_create_extrusion_cut_by_bounding_planes` operation.
+
+Through all
+-----------
+
+.. image:: images/ExtrusionCut3.png
+  :align: center
+
+.. centered::
+  Extrusion Cut: definition through all objects
+
+- **Base objects** - contains a list of objects selected in the Object Browser or in the Viewer, which will be extruded.
+- **Axis** - if selected, it will be the direction of extrusion, otherwise objects normals will be used.
+- **Cut from** - contains a list of objects to be cut by the result of extrusion.
+
+**TUI Commands**:  
+
+.. py:function:: model.addExtrusionCut(part, objectsToExtrude, objectsToCut)
+
+    :param part: The current part object.
+    :param list: A list of objects for extrusion.
+    :param list: A list of objects to cut from.
+    :return: Created object.
+
+.. py:function:: model.addExtrusionCut(part, objects, direction, objectsToCut)
+
+    :param part: The current part object.
+    :param list: A list of objects for extrusion.
+    :param object: A direction of extrusion
+    :param list: A list of objects to cut from.
+    :return: Created object.
+
+Result
+""""""
+
+The Result of the operation will be an extruded shape:
+
+.. image:: images/extrusion_cut_through_all_result.png
+          :align: center
+
+.. centered::
+   **Created Extrusion Cut**
+
+**See Also** a sample TUI Script of :ref:`tui_create_extrusion_cut_through_all` operation.
index bb5d5f05454086fea481ffdf2a9f75d9f077c0e6..0370f02e705e6f9a9f18fe5c1a6832c8201dd7eb 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/ExtrusionCut1.png and b/src/FeaturesPlugin/doc/images/ExtrusionCut1.png differ
index 348f12c0f66a556a0b1f37b814787c2c9bc77c12..cb725f5507e6a125ec0dd211e2f40432b4c00ccc 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/ExtrusionCut2.png and b/src/FeaturesPlugin/doc/images/ExtrusionCut2.png differ
diff --git a/src/FeaturesPlugin/doc/images/ExtrusionCut3.png b/src/FeaturesPlugin/doc/images/ExtrusionCut3.png
new file mode 100644 (file)
index 0000000..8f1388d
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/ExtrusionCut3.png differ
index 33c2445f872f8e284734c7a66d00503ffc884a16..8cb3cd9652570abe47bb406c6a00b5d20d2f203f 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/ExtrusionFuse1.png and b/src/FeaturesPlugin/doc/images/ExtrusionFuse1.png differ
index f38e71c162cf067d0fe41ba0c01aabed64578c37..62e4559ae0167c02472b85daa919ccffbcb220aa 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/ExtrusionFuse2.png and b/src/FeaturesPlugin/doc/images/ExtrusionFuse2.png differ
diff --git a/src/FeaturesPlugin/doc/images/ExtrusionFuse3.png b/src/FeaturesPlugin/doc/images/ExtrusionFuse3.png
new file mode 100644 (file)
index 0000000..a3fdd99
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/ExtrusionFuse3.png differ
index 8c7a2885ab7b1972802567b1ff30b806b77bfc97..e97241e7716210237d9b3dba9a12dab73e1a0b5a 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/RevolutionCut1.png and b/src/FeaturesPlugin/doc/images/RevolutionCut1.png differ
index 5cdf5d832b91c8e67126731af5ba5776a8fd7095..fd8889bfaf841978fb8c833641a5a9fc93379947 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/RevolutionCut2.png and b/src/FeaturesPlugin/doc/images/RevolutionCut2.png differ
diff --git a/src/FeaturesPlugin/doc/images/RevolutionCut3.png b/src/FeaturesPlugin/doc/images/RevolutionCut3.png
new file mode 100644 (file)
index 0000000..d2de5bb
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/RevolutionCut3.png differ
index 600d78e685d8586b752f280ea9e5a13a7ae6639c..bd074071e5f519536956d2bcedbb24271421c50e 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/RevolutionFuse1.png and b/src/FeaturesPlugin/doc/images/RevolutionFuse1.png differ
index 87fc70918afd448e7f03bb82f49f095dbe498801..1316c378d8c57353889885e849678dbed3c201f3 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/RevolutionFuse2.png and b/src/FeaturesPlugin/doc/images/RevolutionFuse2.png differ
diff --git a/src/FeaturesPlugin/doc/images/RevolutionFuse3.png b/src/FeaturesPlugin/doc/images/RevolutionFuse3.png
new file mode 100644 (file)
index 0000000..eef253a
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/RevolutionFuse3.png differ
diff --git a/src/FeaturesPlugin/doc/images/extrusion_cut_through_all_result.png b/src/FeaturesPlugin/doc/images/extrusion_cut_through_all_result.png
new file mode 100644 (file)
index 0000000..99c1b8d
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/extrusion_cut_through_all_result.png differ
diff --git a/src/FeaturesPlugin/doc/images/extrusion_through_all.png b/src/FeaturesPlugin/doc/images/extrusion_through_all.png
new file mode 100644 (file)
index 0000000..6ecb152
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/extrusion_through_all.png differ
diff --git a/src/FeaturesPlugin/doc/images/revolution_fuse_through_all_result.png b/src/FeaturesPlugin/doc/images/revolution_fuse_through_all_result.png
new file mode 100644 (file)
index 0000000..f1f549d
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/revolution_fuse_through_all_result.png differ
index 2c1a4b2b73e37080edabcd9699543ec286f40734..3c75206c57168012b61f8ede873f97a260742ce6 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/revolution_through_all.png and b/src/FeaturesPlugin/doc/images/revolution_through_all.png differ