Update user documentation.
fieldFeature.rst
groupFeature.rst
+ groupAdditionFeature.rst
+ groupIntersectionFeature.rst
+ groupSubstractionFeature.rst
--- /dev/null
+
+ .. _tui_create_group_addition:
+
+Create Group Addition
+=====================
+
+.. literalinclude:: examples/group_addition.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/group_addition.py>`
--- /dev/null
+
+ .. _tui_create_group_intersection:
+
+Create Group Intersection
+=========================
+
+.. literalinclude:: examples/group_intersection.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/group_intersection.py>`
--- /dev/null
+
+ .. _tui_create_group_substraction:
+
+Create Group Substraction
+=========================
+
+.. literalinclude:: examples/group_substraction.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/group_substraction.py>`
--- /dev/null
+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)
+Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "Box_1_1/Top"),
+ model.selection("FACE", "Box_1_1/Left")])
+Group_2 = model.addGroup(Part_1_doc, [model.selection("FACE", "Box_1_1/Front"),
+ model.selection("FACE", "Box_1_1/Top")])
+GroupAddition_1 = model.addGroupAddition(Part_1_doc, [model.selection("COMPOUND", "Group_1"),
+ model.selection("COMPOUND", "Group_2")])
+model.end()
--- /dev/null
+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)
+Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "Box_1_1/Top"),
+ model.selection("FACE", "Box_1_1/Left")])
+Group_2 = model.addGroup(Part_1_doc, [model.selection("FACE", "Box_1_1/Front"),
+ model.selection("FACE", "Box_1_1/Top")])
+Group_3 = model.addGroup(Part_1_doc, [model.selection("FACE", "Box_1_1/Front"),
+ model.selection("FACE", "Box_1_1/Right"),
+ model.selection("FACE", "Box_1_1/Top")])
+GroupIntersection_1_objects = [model.selection("COMPOUND", "Group_1"),
+ model.selection("COMPOUND", "Group_2"),
+ model.selection("COMPOUND", "Group_3")]
+GroupIntersection_1 = model.addGroupIntersection(Part_1_doc, GroupIntersection_1_objects)
+model.end()
--- /dev/null
+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)
+Group_1_objects = [model.selection("EDGE", "[Box_1_1/Left][Box_1_1/Bottom]"),
+ model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Left]"),
+ model.selection("EDGE", "[Box_1_1/Left][Box_1_1/Top]"),
+ model.selection("EDGE", "[Box_1_1/Back][Box_1_1/Left]")]
+Group_1 = model.addGroup(Part_1_doc, Group_1_objects)
+Group_2_objects = [model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Left]"),
+ model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Bottom]"),
+ model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Right]"),
+ model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Top]")]
+Group_2 = model.addGroup(Part_1_doc, Group_2_objects)
+Group_3_objects = [model.selection("EDGE", "[Box_1_1/Left][Box_1_1/Top]"),
+ model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Top]"),
+ model.selection("EDGE", "[Box_1_1/Right][Box_1_1/Top]"),
+ model.selection("EDGE", "[Box_1_1/Back][Box_1_1/Top]")]
+Group_3 = model.addGroup(Part_1_doc, Group_3_objects)
+Group_4_objects = [model.selection("EDGE", "[Box_1_1/Back][Box_1_1/Bottom]"),
+ model.selection("EDGE", "[Box_1_1/Right][Box_1_1/Bottom]"),
+ model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Bottom]"),
+ model.selection("EDGE", "[Box_1_1/Left][Box_1_1/Bottom]")]
+Group_4 = model.addGroup(Part_1_doc, Group_4_objects)
+GroupSubstraction_1 = model.addGroupSubstraction(Part_1_doc,
+ [model.selection("COMPOUND", "Group_1"),
+ model.selection("COMPOUND", "Group_2")],
+ [model.selection("COMPOUND", "Group_3"),
+ model.selection("COMPOUND", "Group_4")])
+model.end()
--- /dev/null
+.. |group_addition.icon| image:: images/group_addition.png
+
+Group Addition
+==============
+
+Group addition produces a union of all the elements of the selected groups.
+To create a Group Addition in the active part:
+
+#. select in the Main Menu *Features - > Group Addition* item or
+#. click |group_addition.icon| **Group Addition** button in the toolbar:
+
+The following property panel appears.
+
+.. image:: images/group_addition_property_panel.png
+ :align: center
+
+.. centered::
+ Create a group addition operation
+
+Input fields:
+
+- **Name** defines the name of the group, by default, it is **GroupAddition_n**.
+- The list of selected groups of the same type. Multiple selection can be done manually in OCC 3D Viewer by mouse click with Shift button pressed or by rectangle selection. To delete entities from the list, select them and call pop-up menu *Delete* item.
+
+Note, that operation is valid only for the groups of the same type.
+
+**TUI Command**:
+
+.. py:function:: model.addGroupAddition(Part_1_doc,
+ [model.selection("COMPOUND", "Group_1"), model.selection("COMPOUND", "Group_2")])
+
+ :param part: The current part object
+ :param list: A list of selected groups
+ :return: Created object.
+
+
+**See Also** a sample TUI Script of :ref:`tui_create_group_addition` operation.
--- /dev/null
+.. |group_intersection.icon| image:: images/group_intersection.png
+
+Group Intersection
+==================
+
+Group intersection produces a group of elements present in all the selected groups.
+To create a Group Intersection in the active part:
+
+#. select in the Main Menu *Features - > Group Intersection* item or
+#. click |group_intersection.icon| **Group Intersection** button in the toolbar:
+
+The following property panel appears.
+
+.. image:: images/group_intersection_property_panel.png
+ :align: center
+
+.. centered::
+ Create a group intersection operation
+
+Input fields:
+
+- **Name** defines the name of the group, by default, it is **GroupIntersection_n**.
+- The list of selected groups of the same type. Multiple selection can be done manually in OCC 3D Viewer by mouse click with Shift button pressed or by rectangle selection. To delete entities from the list, select them and call pop-up menu *Delete* item.
+
+Note, that operation is valid only for the groups of the same type.
+
+**TUI Command**:
+
+.. py:function:: model.addGroupIntersection(Part_1_doc,
+ [model.selection("COMPOUND", "Group_1"), model.selection("COMPOUND", "Group_2")])
+
+ :param part: The current part object
+ :param list: A list of selected groups
+ :return: Created object.
+
+
+**See Also** a sample TUI Script of :ref:`tui_create_group_intersection` operation.
--- /dev/null
+.. |group_substraction.icon| image:: images/group_substraction.png
+
+Group Substraction
+==================
+
+Group substraction produces a group containing all elements of the main groups but not present in the tool groups.
+To create a Group Substraction in the active part:
+
+#. select in the Main Menu *Features - > Group Substraction* item or
+#. click |group_substraction.icon| **Group Substraction** button in the toolbar:
+
+The following property panel appears.
+
+.. image:: images/group_substraction_property_panel.png
+ :align: center
+
+.. centered::
+ Create a group substraction operation
+
+Input fields:
+
+- **Name** defines the name of the group, by default, it is **GroupSubstraction_n**.
+- The list of main groups. Multiple selection can be done manually in OCC 3D Viewer by mouse click with Shift button pressed or by rectangle selection. To delete entities from the list, select them and call pop-up menu *Delete* item.
+- The list of tool groups. Selection approaches are the same as for the main groups.
+
+Note, that operation is valid only if all the main groups and all the tool groups have the same type.
+
+**TUI Command**:
+
+.. py:function:: model.addGroupSubstraction(Part_1_doc,
+ [model.selection("COMPOUND", "Group_1"), model.selection("COMPOUND", "Group_2")],
+ [model.selection("COMPOUND", "Group_3"), model.selection("COMPOUND", "Group_4")])
+
+ :param part: The current part object
+ :param list: A list of main groups
+ :param list: A list of tool groups
+ :return: Created object.
+
+
+**See Also** a sample TUI Script of :ref:`tui_create_group_substraction` operation.