]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
User's documentation for Fuse Faces feature
authormpv <mpv@opencascade.com>
Fri, 28 Sep 2018 06:29:28 +0000 (09:29 +0300)
committermpv <mpv@opencascade.com>
Fri, 28 Sep 2018 06:29:28 +0000 (09:29 +0300)
src/FeaturesPlugin/doc/TUI_fusefacesFeature.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/fuse_faces.py [new file with mode: 0644]
src/FeaturesPlugin/doc/fuseFeatureFaces.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/images/CreatedFuseFaces.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/FuseFaces.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/fusion_faces.png [new file with mode: 0644]

diff --git a/src/FeaturesPlugin/doc/TUI_fusefacesFeature.rst b/src/FeaturesPlugin/doc/TUI_fusefacesFeature.rst
new file mode 100644 (file)
index 0000000..00b1a9f
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_fuse_faces:
+
+Fuse Faces
+==========
+
+.. literalinclude:: examples/fuse_faces.py 
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/fuse_faces.py >` 
+   
diff --git a/src/FeaturesPlugin/doc/examples/fuse_faces.py b/src/FeaturesPlugin/doc/examples/fuse_faces.py
new file mode 100644 (file)
index 0000000..8884809
--- /dev/null
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+
+from SketchAPI import *
+
+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("XOZ"))
+SketchLine_1 = Sketch_1.addLine(0, 75.67806267806267, 34.24216524216526, 75.67806267806267)
+SketchProjection_1 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OZ"), False)
+SketchLine_2 = SketchProjection_1.createdFeature()
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_2.result())
+SketchLine_3 = Sketch_1.addLine(34.24216524216526, 75.67806267806267, 34.24216524216526, 46.03988603988604)
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_3.startPoint())
+SketchLine_4 = Sketch_1.addLine(34.24216524216526, 46.03988603988604, 63.30484330484332, 46.03988603988604)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchLine_5 = Sketch_1.addLine(63.30484330484332, 46.03988603988604, 63.30484330484332, -2.775557561562891e-17)
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
+SketchProjection_2 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OX"), False)
+SketchLine_6 = SketchProjection_2.createdFeature()
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.result())
+SketchLine_7 = Sketch_1.addLine(63.30484330484332, -2.775557561562891e-17, 0, 0)
+SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_7.startPoint())
+SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchAPI_Line(SketchLine_2).startPoint(), SketchLine_7.endPoint())
+SketchLine_8 = Sketch_1.addLine(0, 75.67806267806267, 0, 0)
+SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_8.startPoint())
+SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchAPI_Line(SketchLine_2).startPoint(), SketchLine_8.endPoint())
+SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_3.result())
+SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_5.result())
+SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
+SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_4.result())
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), 50, 0)
+Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_3r-SketchLine_4r-SketchLine_5r-SketchLine_7r-SketchLine_8f")], model.selection(), 0, 50)
+Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1")], [model.selection("SOLID", "Extrusion_2_1")])
+FusionFaces_1 = model.addFusionFaces(Part_1_doc, model.selection("SOLID", "Fuse_1_1"))
+Export_1 = model.exportToXAO(Part_1_doc, '/tmp/shaper_gjzkis0q.xao', 'automatic_shaper_export_to_XAO')
+model.do()
+model.end()
diff --git a/src/FeaturesPlugin/doc/fuseFeatureFaces.rst b/src/FeaturesPlugin/doc/fuseFeatureFaces.rst
new file mode 100644 (file)
index 0000000..10be04e
--- /dev/null
@@ -0,0 +1,45 @@
+
+Fuse Faces
+==========
+
+The feature **Fuse Faces** eliminates the edges between adjacent same-domain faces lying on the same geometrical surface. This feature is useful for processing the results of **Fuse**, **Union** or **Partition** operations.
+
+To perform operation **Fuse Faces** in the active part:
+
+#. select in the Main Menu *Features - > Fuse Faces* item  or
+#. click **Fuse Faces** button in the toolbar
+
+.. image:: images/fusion_faces.png 
+   :align: center
+
+.. centered::
+   **Fuse Faces**  button 
+
+The following property panel appears:
+
+.. image:: images/FuseFaces.png 
+  :align: center
+
+.. centered::
+  **Fuse Faces**  property panel
+
+Input fields:  
+
+- **Shape** contains object selected in the Object Browser or in the Viewer, on which faces will be fused.
+
+**TUI Command**:  *model.addFusionFaces(Part_doc, shape)*
+
+**Arguments**:   Part +  shape in format *model.selection(TYPE, shape)*.
+
+Result
+""""""
+
+The Result of the operation will be a shape with eliminated edges:
+
+.. image:: images/CreatedFuseFaces.png
+          :align: center
+
+.. centered::
+   Shape before and after operation **Fuse Faces**
+
+**See Also** a sample TUI Script of a :ref:`tui_create_fuse_faces` operation.
diff --git a/src/FeaturesPlugin/doc/images/CreatedFuseFaces.png b/src/FeaturesPlugin/doc/images/CreatedFuseFaces.png
new file mode 100644 (file)
index 0000000..e76e32d
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/CreatedFuseFaces.png differ
diff --git a/src/FeaturesPlugin/doc/images/FuseFaces.png b/src/FeaturesPlugin/doc/images/FuseFaces.png
new file mode 100644 (file)
index 0000000..0c84d28
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/FuseFaces.png differ
diff --git a/src/FeaturesPlugin/doc/images/fusion_faces.png b/src/FeaturesPlugin/doc/images/fusion_faces.png
new file mode 100644 (file)
index 0000000..b5cb25f
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/fusion_faces.png differ