]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'master' into cgt/split
authorClarisse GENRAULT - DEN/DANS/DM2S/STMF/LGLS - 2012/10/01 <cg246364@is231796.intra.cea.fr>
Thu, 14 Mar 2019 06:42:20 +0000 (07:42 +0100)
committerClarisse GENRAULT - DEN/DANS/DM2S/STMF/LGLS - 2012/10/01 <cg246364@is231796.intra.cea.fr>
Thu, 14 Mar 2019 06:42:20 +0000 (07:42 +0100)
23 files changed:
src/FeaturesAPI/FeaturesAPI_BooleanFill.cpp
src/FeaturesAPI/FeaturesAPI_BooleanFill.h
src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/FeaturesPlugin_BooleanFill.h
src/FeaturesPlugin/boolean_fill_widget.xml [deleted file]
src/FeaturesPlugin/boolean_split_widget.xml [new file with mode: 0644]
src/FeaturesPlugin/doc/FeaturesPlugin.rst
src/FeaturesPlugin/doc/TUI_fillFeature.rst [deleted file]
src/FeaturesPlugin/doc/TUI_splitFeature.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/bool_split.py [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/fill.py [deleted file]
src/FeaturesPlugin/doc/fillFeature.rst [deleted file]
src/FeaturesPlugin/doc/images/CreatedFill.png [deleted file]
src/FeaturesPlugin/doc/images/CreatedSplit.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/Fill.png [deleted file]
src/FeaturesPlugin/doc/images/Split.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/bool_fill.png [deleted file]
src/FeaturesPlugin/doc/images/bool_split.png [new file with mode: 0644]
src/FeaturesPlugin/doc/splitFeature.rst [new file with mode: 0644]
src/FeaturesPlugin/icons/bool_fill.png [deleted file]
src/FeaturesPlugin/icons/bool_split.png [new file with mode: 0644]
src/FeaturesPlugin/plugin-Features.xml
src/PythonAPI/model/features/__init__.py

index 1d4b4d7e07c3a0c55a45026f3524419d83301942..2a832ec6fd7dda38942b1cb41fc8ecc9ee308154 100644 (file)
@@ -75,7 +75,7 @@ void FeaturesAPI_BooleanFill::dump(ModelHighAPI_Dumper& theDumper) const
 {
   FeaturePtr aBase = feature();
 
-  theDumper << aBase << " = model.addFill";
+  theDumper << aBase << " = model.addSplit";
 
   const std::string& aDocName = theDumper.name(aBase->document());
   AttributeSelectionListPtr anObjects =
@@ -87,9 +87,9 @@ void FeaturesAPI_BooleanFill::dump(ModelHighAPI_Dumper& theDumper) const
 }
 
 //==================================================================================================
-BooleanFillPtr addFill(const std::shared_ptr<ModelAPI_Document>& thePart,
-                       const std::list<ModelHighAPI_Selection>& theMainObjects,
-                       const std::list<ModelHighAPI_Selection>& theToolObjects)
+BooleanFillPtr addSplit(const std::shared_ptr<ModelAPI_Document>& thePart,
+                        const std::list<ModelHighAPI_Selection>& theMainObjects,
+                        const std::list<ModelHighAPI_Selection>& theToolObjects)
 {
   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_BooleanFill::ID());
   return BooleanFillPtr(new FeaturesAPI_BooleanFill(aFeature,
index 14055dc258bfade13801a680050738aa9c48ffaa..75f075a2e3a637c73b591e12e41dceae121a2258 100644 (file)
@@ -75,8 +75,8 @@ typedef std::shared_ptr<FeaturesAPI_BooleanFill> BooleanFillPtr;
 /// \ingroup CPPHighAPI
 /// \brief Create Boolean Fill feature.
 FEATURESAPI_EXPORT
-BooleanFillPtr addFill(const std::shared_ptr<ModelAPI_Document>& thePart,
-                       const std::list<ModelHighAPI_Selection>& theMainObjects,
-                       const std::list<ModelHighAPI_Selection>& theToolObjects);
+BooleanFillPtr addSplit(const std::shared_ptr<ModelAPI_Document>& thePart,
+                        const std::list<ModelHighAPI_Selection>& theMainObjects,
+                        const std::list<ModelHighAPI_Selection>& theToolObjects);
 
 #endif // FeaturesAPI_BooleanFill_H_
index d1b4bfbeadba11bb08d17041aad1814fa9d2aaf7..27115310a4dbfe0d8582e1c00c4fa265761309de 100644 (file)
@@ -112,7 +112,7 @@ SET(XML_RESOURCES
   boolean_widget.xml
   boolean_fuse_widget.xml
   boolean_common_widget.xml
-  boolean_fill_widget.xml
+  boolean_split_widget.xml
   boolean_smash_widget.xml
   recover_widget.xml
   partition_widget.xml
index 2eb1c02d3eb5b60f484ab206ad1df309e40ef6ca..8e26cfa984e026d9befa78949c7d4dbe2dc5b527 100644 (file)
@@ -32,7 +32,7 @@ public:
   /// Feature kind.
   inline static const std::string& ID()
   {
-    static const std::string MY_ID("Fill");
+    static const std::string MY_ID("Split");
     return MY_ID;
   }
 
diff --git a/src/FeaturesPlugin/boolean_fill_widget.xml b/src/FeaturesPlugin/boolean_fill_widget.xml
deleted file mode 100644 (file)
index 0b02810..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<source>
-  <multi_selector id="main_objects"
-    label="Main objects"
-    icon=""
-    tooltip="Select objects"
-    type_choice="vertices edges wires faces shells solids compsolids compounds"
-    use_choice="false"
-    concealment="true">
-    <validator id="PartSet_DifferentObjects"/>
-    <validator id="FeaturesPlugin_ValidatorBooleanSelection"/>
-  </multi_selector>
-  <multi_selector id="tool_objects"
-    label="Tool objects"
-    icon=""
-    tooltip="Select tools"
-    type_choice="vertices edges wires faces shells solids compsolids compounds"
-    use_choice="false"
-    concealment="true" >
-    <validator id="PartSet_DifferentObjects"/>
-    <validator id="FeaturesPlugin_ValidatorBooleanSelection"/>
-  </multi_selector>
-  <validator id="FeaturesPlugin_ValidatorBooleanArguments" parameters="main_objects,tool_objects"/>
-</source>
diff --git a/src/FeaturesPlugin/boolean_split_widget.xml b/src/FeaturesPlugin/boolean_split_widget.xml
new file mode 100644 (file)
index 0000000..0b02810
--- /dev/null
@@ -0,0 +1,23 @@
+<source>
+  <multi_selector id="main_objects"
+    label="Main objects"
+    icon=""
+    tooltip="Select objects"
+    type_choice="vertices edges wires faces shells solids compsolids compounds"
+    use_choice="false"
+    concealment="true">
+    <validator id="PartSet_DifferentObjects"/>
+    <validator id="FeaturesPlugin_ValidatorBooleanSelection"/>
+  </multi_selector>
+  <multi_selector id="tool_objects"
+    label="Tool objects"
+    icon=""
+    tooltip="Select tools"
+    type_choice="vertices edges wires faces shells solids compsolids compounds"
+    use_choice="false"
+    concealment="true" >
+    <validator id="PartSet_DifferentObjects"/>
+    <validator id="FeaturesPlugin_ValidatorBooleanSelection"/>
+  </multi_selector>
+  <validator id="FeaturesPlugin_ValidatorBooleanArguments" parameters="main_objects,tool_objects"/>
+</source>
index a9abbcd287898e52aaa585171a079f4fe8969666..4200c3f2a816b478282e25ea0d2122e63544975f 100644 (file)
@@ -15,8 +15,7 @@ Features plug-in provides a set of common topological operations. It implements
    cutFeature.rst
    extrusionCutFeature.rst
    extrusionFeature.rst
-   extrusionFuseFeature.rst
-   fillFeature.rst
+   extrusionFuseFeature.
    filletFeature.rst
    fuseFeature.rst
    fuseFeatureFaces.rst
@@ -32,7 +31,8 @@ Features plug-in provides a set of common topological operations. It implements
    revolutionFeature.rst
    revolutionFuseFeature.rst
    rotationFeature.rst
-   smashFeature.rst
+   smashFeature.rstrst
+   splitFeature.rst
    symmetryFeature.rst
    transformationFeature.rst
    translationFeature.rst
diff --git a/src/FeaturesPlugin/doc/TUI_fillFeature.rst b/src/FeaturesPlugin/doc/TUI_fillFeature.rst
deleted file mode 100644 (file)
index becb9ee..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-  .. _tui_create_fill:
-
-Create Fill
-===========
-
-.. literalinclude:: examples/fill.py
-    :linenos:
-    :language: python
-
-:download:`Download this script <examples/fill.py>` 
-   
diff --git a/src/FeaturesPlugin/doc/TUI_splitFeature.rst b/src/FeaturesPlugin/doc/TUI_splitFeature.rst
new file mode 100644 (file)
index 0000000..8ed72fc
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_bool_split:
+
+Create Split
+============
+
+.. literalinclude:: examples/bool_split.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/bool_split.py>` 
+   
diff --git a/src/FeaturesPlugin/doc/examples/bool_split.py b/src/FeaturesPlugin/doc/examples/bool_split.py
new file mode 100644 (file)
index 0000000..1ea06fd
--- /dev/null
@@ -0,0 +1,17 @@
+# -*- 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)
+Cylinder_1 = model.addCylinder(Part_1_doc,
+                               model.selection("VERTEX", "PartSet/Origin"),
+                               model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Split_1 = model.addSplit(Part_1_doc,
+                         [model.selection("SOLID", "Cylinder_1_1")],
+                         [model.selection("SOLID", "Box_1_1")])
+model.do()
+model.end()
diff --git a/src/FeaturesPlugin/doc/examples/fill.py b/src/FeaturesPlugin/doc/examples/fill.py
deleted file mode 100644 (file)
index 866345f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- 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)
-Cylinder_1 = model.addCylinder(Part_1_doc,
-                               model.selection("VERTEX", "PartSet/Origin"),
-                               model.selection("EDGE", "PartSet/OZ"), 5, 10)
-Fill_1 = model.addFill(Part_1_doc,
-                       [model.selection("SOLID", "Cylinder_1_1")],
-                       [model.selection("SOLID", "Box_1_1")])
-model.do()
-model.end()
diff --git a/src/FeaturesPlugin/doc/fillFeature.rst b/src/FeaturesPlugin/doc/fillFeature.rst
deleted file mode 100644 (file)
index 19db3d8..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-
-Fill
-====
-
-Fill feature implements a Boolean operation filling of main objects by parts of tool objects.
-
-To perform Fill in the active part:
-
-#. select in the Main Menu *Features - > Fill* item  or
-#. click **Fill** button in the toolbar
-
-.. image:: images/bool_fill.png
-   :align: center
-
-.. centered::
-   **Fill**  button 
-
-The following property panel will be opened:
-
-.. image:: images/Fill.png
-  :align: center
-
-.. centered::
-   **Fill operation**
-
-- **Main Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be cut and filled by tool objects.
--  **Tool Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will cut and fill the main objects.
-- **See preview** button shows a result of the operation.
-
-**TUI Command**:  *model.addFill(Part_doc, mainObjects, toolObjects)*
-
-**Arguments**:   Part + list of main objects + list of tool objects.
-
-Result
-""""""
-
-The Result of the operation will be a shape, which is a fill of tool objects with main objects:
-
-.. image:: images/CreatedFill.png
-          :align: center
-
-.. centered::
-   **Fill created**
-
-**See Also** a sample TUI Script of :ref:`tui_create_fill` operation.
diff --git a/src/FeaturesPlugin/doc/images/CreatedFill.png b/src/FeaturesPlugin/doc/images/CreatedFill.png
deleted file mode 100644 (file)
index 7d8b28f..0000000
Binary files a/src/FeaturesPlugin/doc/images/CreatedFill.png and /dev/null differ
diff --git a/src/FeaturesPlugin/doc/images/CreatedSplit.png b/src/FeaturesPlugin/doc/images/CreatedSplit.png
new file mode 100644 (file)
index 0000000..7d8b28f
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/CreatedSplit.png differ
diff --git a/src/FeaturesPlugin/doc/images/Fill.png b/src/FeaturesPlugin/doc/images/Fill.png
deleted file mode 100644 (file)
index e5c4cd4..0000000
Binary files a/src/FeaturesPlugin/doc/images/Fill.png and /dev/null differ
diff --git a/src/FeaturesPlugin/doc/images/Split.png b/src/FeaturesPlugin/doc/images/Split.png
new file mode 100644 (file)
index 0000000..7673ef4
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/Split.png differ
diff --git a/src/FeaturesPlugin/doc/images/bool_fill.png b/src/FeaturesPlugin/doc/images/bool_fill.png
deleted file mode 100644 (file)
index 5e03aa2..0000000
Binary files a/src/FeaturesPlugin/doc/images/bool_fill.png and /dev/null differ
diff --git a/src/FeaturesPlugin/doc/images/bool_split.png b/src/FeaturesPlugin/doc/images/bool_split.png
new file mode 100644 (file)
index 0000000..5e03aa2
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/bool_split.png differ
diff --git a/src/FeaturesPlugin/doc/splitFeature.rst b/src/FeaturesPlugin/doc/splitFeature.rst
new file mode 100644 (file)
index 0000000..fe04581
--- /dev/null
@@ -0,0 +1,45 @@
+
+Split
+=====
+
+Split feature implements a Boolean operation splitting of main objects by parts of tool objects.
+
+To perform Split in the active part:
+
+#. select in the Main Menu *Features - > Split* item  or
+#. click **Split** button in the toolbar
+
+.. image:: images/bool_split.png
+   :align: center
+
+.. centered::
+   **Split**  button 
+
+The following property panel will be opened:
+
+.. image:: images/Split.png
+  :align: center
+
+.. centered::
+   **Split operation**
+
+- **Main Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be cut and splitted by tool objects.
+- **Tool Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will cut and split the main objects.
+- **See preview** button shows a result of the operation.
+
+**TUI Command**:  *model.addSplit(Part_doc, mainObjects, toolObjects)*
+
+**Arguments**:   Part + list of main objects + list of tool objects.
+
+Result
+""""""
+
+The Result of the operation will be a shape, which is a split of tool objects with main objects:
+
+.. image:: images/CreatedSplit.png
+          :align: center
+
+.. centered::
+   **Split created**
+
+**See Also** a sample TUI Script of :ref:`tui_create_bool_split` operation.
diff --git a/src/FeaturesPlugin/icons/bool_fill.png b/src/FeaturesPlugin/icons/bool_fill.png
deleted file mode 100644 (file)
index 5d5bf04..0000000
Binary files a/src/FeaturesPlugin/icons/bool_fill.png and /dev/null differ
diff --git a/src/FeaturesPlugin/icons/bool_split.png b/src/FeaturesPlugin/icons/bool_split.png
new file mode 100644 (file)
index 0000000..5d5bf04
Binary files /dev/null and b/src/FeaturesPlugin/icons/bool_split.png differ
index e5c1574856de1c8c7214f9c0db6d9ee94350e8b1..c31b2795b70a179eb83fa900e276b7a363bcd5f1 100644 (file)
                auto_preview="false">
           <source path="partition_widget.xml"/>
       </feature>
-      <feature id="Fill" title="Fill" tooltip="Perform boolean fill operation with objects"
-               icon="icons/Features/bool_fill.png" helpfile="fillFeature.html"
+      <feature id="Split" title="Split" tooltip="Perform boolean split operation with objects"
+               icon="icons/Features/bool_split.png" helpfile="splitFeature.html"
                auto_preview="false">
-          <source path="boolean_fill_widget.xml"/>
+          <source path="boolean_split_widget.xml"/>
       </feature>
       <feature id="Union" title="Union" tooltip="Perform union operations with shapes"
                icon="icons/Features/union.png" helpfile="unionFeature.html">
index 5eea8ffc2bd312c03984d7d521718114b680f3b9..3e1e6bdc65b25016c4418e7b5a83e7313bd4c041 100644 (file)
@@ -24,7 +24,7 @@ from FeaturesAPI import addMultiTranslation, addMultiRotation
 from FeaturesAPI import addExtrusion, addExtrusionCut, addExtrusionFuse
 from FeaturesAPI import addRevolution, addRevolutionCut, addRevolutionFuse
 from FeaturesAPI import addPipe
-from FeaturesAPI import addCut, addFuse, addCommon, addSmash, addFill
+from FeaturesAPI import addCut, addFuse, addCommon, addSmash, addSplit
 from FeaturesAPI import addIntersection, addPartition, addUnion, addRemoveSubShapes
 from FeaturesAPI import addRecover
 from FeaturesAPI import addFillet