]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/shaper
authorvsv <vsv@opencascade.com>
Thu, 27 Sep 2018 14:13:45 +0000 (17:13 +0300)
committervsv <vsv@opencascade.com>
Thu, 27 Sep 2018 14:13:45 +0000 (17:13 +0300)
55 files changed:
src/BuildPlugin/doc/images/CreatePolyline.png
src/BuildPlugin/doc/images/Polyline.png
src/ConnectorAPI/Test/TestExportToGEOM.py
src/ConnectorAPI/Test/TestExportToGEOMAllGroupsAndFields.py
src/ExchangePlugin/ExchangePlugin_Tools.cpp
src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/FeaturesPlugin_BooleanCut.cpp
src/FeaturesPlugin/FeaturesPlugin_BooleanCut.h
src/FeaturesPlugin/FeaturesPlugin_Partition.cpp
src/FeaturesPlugin/Test/Test1816.py [new file with mode: 0644]
src/FeaturesPlugin/Test/Test2631.py [new file with mode: 0644]
src/FeaturesPlugin/doc/angularCopyFeature.rst
src/FeaturesPlugin/doc/images/FilletFixed.png
src/FeaturesPlugin/doc/images/FilletVarious.png
src/FeaturesPlugin/doc/images/LinearCopy.png
src/FeaturesPlugin/doc/images/Pipe1.png
src/FeaturesPlugin/doc/images/Pipe2.png
src/FeaturesPlugin/doc/images/Pipe3.png
src/FeaturesPlugin/doc/images/Rotation1.png
src/FeaturesPlugin/doc/images/Rotation2.png
src/FeaturesPlugin/doc/images/Scale1.png
src/FeaturesPlugin/doc/images/Scale2.png
src/FeaturesPlugin/doc/images/Scale_XYZ.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/Scale_common_factor.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/Translation1.png
src/FeaturesPlugin/doc/images/Translation2.png
src/FeaturesPlugin/doc/images/Translation3.png
src/FeaturesPlugin/doc/images/fillet_fix_rad.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/fillet_var_rad.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/linearcopyres.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/locationPipe.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/rotation_3points.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/rotation_axis.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/simplePipe.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/symmetryAxis.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/symmetryAxisres.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/symmetryPlane.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/symmetryPlaneres.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/symmetryPoint.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/symmetryPointres.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/translation_2points.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/translation_XYZ.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/translation_vector.png [new file with mode: 0644]
src/FeaturesPlugin/doc/linearCopyFeature.rst
src/FeaturesPlugin/doc/pipeFeature.rst
src/FeaturesPlugin/doc/transformationFeature.rst
src/FeaturesPlugin/doc/translationFeature.rst
src/InitializationPlugin/InitializationPlugin_PyInterp.cpp
src/Model/Model_BodyBuilder.cpp
src/Model/Model_BodyBuilder.h
src/ModelAPI/ModelAPI_BodyBuilder.h
src/ModelAPI/ModelAPI_ResultBody.cpp
src/ModelAPI/ModelAPI_ResultBody.h
src/PythonAddons/doc/images/Boxes.png [new file with mode: 0644]
src/PythonAddons/doc/images/box_property_panel.png [new file with mode: 0644]

index 77107b0cc19f5f8ec4540791fded107a4b9f8572..f5e132ca685d66e0a7033e69ff8f9e80f1daab95 100644 (file)
Binary files a/src/BuildPlugin/doc/images/CreatePolyline.png and b/src/BuildPlugin/doc/images/CreatePolyline.png differ
index de6bfd38d96702029e04ecd0584363d22a3cd8ec..bbe43de504ec25a5eb7f42d081720af052cc8463 100644 (file)
Binary files a/src/BuildPlugin/doc/images/Polyline.png and b/src/BuildPlugin/doc/images/Polyline.png differ
index 98d9680b122b704acd611e6c89d04496279dccda..c5e567add8944df4d4ab177ef1482015576a11a4 100644 (file)
@@ -60,6 +60,7 @@ def dumpShaper(fileName):
   dump=model.moduleDocument().addFeature("Dump")
   dump.string("file_path").setValue(fileName)
   dump.string("file_format").setValue("py")
+  dump.string("selection_type").setValue("topological_naming")
   model.do()
   model.end()
   pass
index a93cabaeacf6c0f7a9b13f974e68f629bf643fc5..ca2b9045a3183ea3692be57ab8d3035dfa5b5562 100644 (file)
@@ -64,6 +64,7 @@ def dumpShaper(fileName):
   dump=model.moduleDocument().addFeature("Dump")
   dump.string("file_path").setValue(fileName)
   dump.string("file_format").setValue("py")
+  dump.string("selection_type").setValue("topological_naming")
   model.do()
   model.end()
   pass
index 1d2000236e6a885bdd2f9ddb0122c9651b0538e0..7ef4bdcf9f14134ee973647844ae7e3c74fa8696 100644 (file)
@@ -43,7 +43,7 @@ std::string ExchangePlugin_Tools::selectionType2xaoDimension(const std::string&
   else if (theType == "Solids" || theType == "solid" || theType == "SOLID")
     return "solid";
   else if (theType == "Part" || theType == "part" || theType == "PART")
-    return "part";
+    return "whole";
 
   return std::string();
 }
index 907c7f260a947d2fba05a26064b5329185756c22..07a31f551b0bbb89382f5a252e2cfa1ee4ef1e06 100644 (file)
@@ -365,4 +365,6 @@ ADD_UNIT_TESTS(TestExtrusion.py
                TestBooleanFuse_SolidCompound_SolidCompound.py
                TestBooleanFuse_CompSolid_CompSolid.py
                TestBooleanFuse_CompSolidCompound_CompSolidCompound.py
+               Test1816.py
+               Test2631.py
 )
index c4c4914e5f4f7f56d311bf3b16cdb5797004b205..79b959e9b0531737345e9344fe49d12dc539ae44 100644 (file)
 #include <GeomAPI_ShapeExplorer.h>
 #include <GeomAPI_ShapeIterator.h>
 
+//==================================================================================================
+const int ModifyVTag = 1;
+const int ModifyETag = 2;
+const int ModifyFTag = 3;
+const int DeletedTag = 4;
+/// sub solids will be placed at labels 5, 6, etc. if result is compound of solids
+const int SubsolidsTag = 5;
+
+
 //==================================================================================================
 FeaturesPlugin_BooleanCut::FeaturesPlugin_BooleanCut()
 : FeaturesPlugin_Boolean(FeaturesPlugin_Boolean::BOOL_CUT)
@@ -99,12 +108,15 @@ void FeaturesPlugin_BooleanCut::execute()
     return;
   }
 
+  std::vector<ResultBaseAlgo> aResultBaseAlgoList;
+  ListOfShape aResultShapesList;
+
   // For solids cut each object with all tools.
   for(ListOfShape::iterator anObjectsIt = anObjects.begin();
       anObjectsIt != anObjects.end();
       ++anObjectsIt) {
     std::shared_ptr<GeomAPI_Shape> anObject = *anObjectsIt;
-    GeomAlgoAPI_MakeShapeList aMakeShapeList;
+    std::shared_ptr<GeomAlgoAPI_MakeShapeList> aMakeShapeList(new GeomAlgoAPI_MakeShapeList());
     std::shared_ptr<GeomAlgoAPI_Boolean> aCutAlgo(
       new GeomAlgoAPI_Boolean(anObject,
                               aTools,
@@ -128,7 +140,7 @@ void FeaturesPlugin_BooleanCut::execute()
       return;
     }
 
-    aMakeShapeList.appendAlgo(aCutAlgo);
+    aMakeShapeList->appendAlgo(aCutAlgo);
 
     GeomAPI_ShapeIterator aShapeIt(aResShape);
     if (aShapeIt.more() || aResShape->shapeType() == GeomAPI_Shape::VERTEX)
@@ -137,10 +149,17 @@ void FeaturesPlugin_BooleanCut::execute()
         document()->createBody(data(), aResultIndex);
 
       loadNamingDS(aResultBody, anObject, aTools, aResShape,
-                   aMakeShapeList, *(aCutAlgo->mapOfSubShapes()),
+                   *aMakeShapeList, *(aCutAlgo->mapOfSubShapes()),
                    false);
       setResult(aResultBody, aResultIndex);
       aResultIndex++;
+
+      ResultBaseAlgo aRBA;
+      aRBA.resultBody = aResultBody;
+      aRBA.baseShape = anObject;
+      aRBA.makeShape = aMakeShapeList;
+      aResultBaseAlgoList.push_back(aRBA);
+      aResultShapesList.push_back(aResShape);
     }
   }
 
@@ -171,7 +190,7 @@ void FeaturesPlugin_BooleanCut::execute()
       }
     }
 
-    GeomAlgoAPI_MakeShapeList aMakeShapeList;
+    std::shared_ptr<GeomAlgoAPI_MakeShapeList> aMakeShapeList(new GeomAlgoAPI_MakeShapeList());
     std::shared_ptr<GeomAlgoAPI_Boolean> aCutAlgo(
       new GeomAlgoAPI_Boolean(aUsedInOperationSolids,
                               aTools,
@@ -194,7 +213,7 @@ void FeaturesPlugin_BooleanCut::execute()
       return;
     }
 
-    aMakeShapeList.appendAlgo(aCutAlgo);
+    aMakeShapeList->appendAlgo(aCutAlgo);
     GeomAPI_DataMapOfShapeShape aMapOfShapes;
     aMapOfShapes.merge(aCutAlgo->mapOfSubShapes());
     GeomShapePtr aResultShape = aCutAlgo->shape();
@@ -211,7 +230,7 @@ void FeaturesPlugin_BooleanCut::execute()
         return;
       }
 
-      aMakeShapeList.appendAlgo(aFillerAlgo);
+      aMakeShapeList->appendAlgo(aFillerAlgo);
       aMapOfShapes.merge(aFillerAlgo->mapOfSubShapes());
       aResultShape = aFillerAlgo->shape();
     }
@@ -226,11 +245,18 @@ void FeaturesPlugin_BooleanCut::execute()
                    aCompSolid,
                    aTools,
                    aResultShape,
-                   aMakeShapeList,
+                   *aMakeShapeList,
                    aMapOfShapes,
                    false);
       setResult(aResultBody, aResultIndex);
       aResultIndex++;
+
+      ResultBaseAlgo aRBA;
+      aRBA.resultBody = aResultBody;
+      aRBA.baseShape = aCompSolid;
+      aRBA.makeShape = aMakeShapeList;
+      aResultBaseAlgoList.push_back(aRBA);
+      aResultShapesList.push_back(aResultShape);
     }
   }
 
@@ -261,7 +287,7 @@ void FeaturesPlugin_BooleanCut::execute()
       }
     }
 
-    GeomAlgoAPI_MakeShapeList aMakeShapeList;
+    std::shared_ptr<GeomAlgoAPI_MakeShapeList> aMakeShapeList(new GeomAlgoAPI_MakeShapeList());
     std::shared_ptr<GeomAlgoAPI_Boolean> aCutAlgo(
       new GeomAlgoAPI_Boolean(aUsedInOperationShapes,
                               aTools,
@@ -284,7 +310,7 @@ void FeaturesPlugin_BooleanCut::execute()
       return;
     }
 
-    aMakeShapeList.appendAlgo(aCutAlgo);
+    aMakeShapeList->appendAlgo(aCutAlgo);
     GeomAPI_DataMapOfShapeShape aMapOfShapes;
     aMapOfShapes.merge(aCutAlgo->mapOfSubShapes());
     GeomShapePtr aResultShape = aCutAlgo->shape();
@@ -316,14 +342,26 @@ void FeaturesPlugin_BooleanCut::execute()
                    aCompound,
                    aTools,
                    aResultShape,
-                   aMakeShapeList,
+                   *aMakeShapeList,
                    aMapOfShapes,
                    false);
       setResult(aResultBody, aResultIndex);
       aResultIndex++;
+
+      ResultBaseAlgo aRBA;
+      aRBA.resultBody = aResultBody;
+      aRBA.baseShape = aCompound;
+      aRBA.makeShape = aMakeShapeList;
+      aResultBaseAlgoList.push_back(aRBA);
+      aResultShapesList.push_back(aResultShape);
     }
   }
 
+  // Store deleted shapes after all results has been proceeded. This is to avoid issue when in one
+  // result shape has been deleted, but in another it was modified or stayed.
+  GeomShapePtr aResultShapesCompound = GeomAlgoAPI_CompoundBuilder::compound(aResultShapesList);
+  storeDeletedShapes(aResultBaseAlgoList, aTools, aResultShapesCompound);
+
   // remove the rest results if there were produced in the previous pass
   removeResults(aResultIndex);
 }
@@ -341,53 +379,83 @@ void FeaturesPlugin_BooleanCut::loadNamingDS(ResultBodyPtr theResultBody,
   if(theBaseShape->isEqual(theResultShape)) {
     theResultBody->store(theResultShape, false);
   } else {
-    const int aModifyVTag = 1;
-    const int aModifyETag = 2;
-    const int aModifyFTag = 3;
-    const int aDeletedTag = 4;
-    /// sub solids will be placed at labels 5, 6, etc. if result is compound of solids
-    const int aSubsolidsTag = 5;
-
-    theResultBody->storeModified(theBaseShape, theResultShape, aSubsolidsTag);
+    theResultBody->storeModified(theBaseShape, theResultShape, SubsolidsTag);
 
     const std::string aModVName = "Modified_Vertex";
     const std::string aModEName = "Modified_Edge";
     const std::string aModFName = "Modified_Face";
 
     theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::VERTEX,
-                                               aModifyVTag, aModVName, theMapOfShapes, false,
+                                               ModifyVTag, aModVName, theMapOfShapes, false,
                                                theIsStoreAsGenerated, true);
     theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::EDGE,
-                                               aModifyETag, aModEName, theMapOfShapes, false,
+                                               ModifyETag, aModEName, theMapOfShapes, false,
                                                theIsStoreAsGenerated, true);
     theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::FACE,
-                                               aModifyFTag, aModFName, theMapOfShapes, false,
+                                               ModifyFTag, aModFName, theMapOfShapes, false,
                                                theIsStoreAsGenerated, true);
 
-    theResultBody->loadDeletedShapes(&theMakeShape, theBaseShape,
-                                     GeomAPI_Shape::VERTEX, aDeletedTag);
-    theResultBody->loadDeletedShapes(&theMakeShape, theBaseShape,
-                                     GeomAPI_Shape::EDGE, aDeletedTag);
-    theResultBody->loadDeletedShapes(&theMakeShape, theBaseShape,
-                                     GeomAPI_Shape::FACE, aDeletedTag);
-
     for (ListOfShape::const_iterator anIter = theTools.begin(); anIter != theTools.end(); anIter++)
     {
       theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::VERTEX,
-                                                 aModifyVTag, aModVName, theMapOfShapes, false,
+                                                 ModifyVTag, aModVName, theMapOfShapes, false,
                                                  theIsStoreAsGenerated, true);
 
       theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::EDGE,
-                                                 aModifyETag, aModEName, theMapOfShapes, false,
+                                                 ModifyETag, aModEName, theMapOfShapes, false,
                                                  theIsStoreAsGenerated, true);
 
       theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::FACE,
-                                                 aModifyFTag, aModFName, theMapOfShapes, false,
+                                                 ModifyFTag, aModFName, theMapOfShapes, false,
                                                  theIsStoreAsGenerated, true);
+    }
+  }
+}
+
+//==================================================================================================
+void FeaturesPlugin_BooleanCut::storeDeletedShapes(
+  std::vector<ResultBaseAlgo>& theResultBaseAlgoList,
+  const ListOfShape& theTools,
+  const GeomShapePtr theResultShapesCompound)
+{
+  for (std::vector<ResultBaseAlgo>::iterator anIt = theResultBaseAlgoList.begin();
+       anIt != theResultBaseAlgoList.end();
+       ++anIt)
+  {
+    ResultBaseAlgo& aRCA = *anIt;
+    aRCA.resultBody->loadDeletedShapes(aRCA.makeShape.get(),
+                                       aRCA.baseShape,
+                                       GeomAPI_Shape::VERTEX,
+                                       DeletedTag,
+                                       theResultShapesCompound);
+    aRCA.resultBody->loadDeletedShapes(aRCA.makeShape.get(),
+                                       aRCA.baseShape,
+                                       GeomAPI_Shape::EDGE,
+                                       DeletedTag,
+                                       theResultShapesCompound);
+    aRCA.resultBody->loadDeletedShapes(aRCA.makeShape.get(),
+                                       aRCA.baseShape,
+                                       GeomAPI_Shape::FACE,
+                                       DeletedTag,
+                                       theResultShapesCompound);
 
-      theResultBody->loadDeletedShapes(&theMakeShape, *anIter, GeomAPI_Shape::VERTEX, aDeletedTag);
-      theResultBody->loadDeletedShapes(&theMakeShape, *anIter, GeomAPI_Shape::EDGE, aDeletedTag);
-      theResultBody->loadDeletedShapes(&theMakeShape, *anIter, GeomAPI_Shape::FACE, aDeletedTag);
+    for (ListOfShape::const_iterator anIter = theTools.begin(); anIter != theTools.end(); anIter++)
+    {
+      aRCA.resultBody->loadDeletedShapes(aRCA.makeShape.get(),
+                                         *anIter,
+                                         GeomAPI_Shape::VERTEX,
+                                         DeletedTag,
+                                         theResultShapesCompound);
+      aRCA.resultBody->loadDeletedShapes(aRCA.makeShape.get(),
+                                         *anIter,
+                                         GeomAPI_Shape::EDGE,
+                                         DeletedTag,
+                                         theResultShapesCompound);
+      aRCA.resultBody->loadDeletedShapes(aRCA.makeShape.get(),
+                                         *anIter,
+                                         GeomAPI_Shape::FACE,
+                                         DeletedTag,
+                                         theResultShapesCompound);
     }
   }
 }
index 4ae4463eb0609e124e97abfaf71877de09f3bd25..11c154ced95cca7479ef5b131460c7da9e071ece 100644 (file)
@@ -55,6 +55,14 @@ public:
   /// Use plugin manager for features creation.
   FeaturesPlugin_BooleanCut();
 
+private:
+
+  struct ResultBaseAlgo {
+    ResultBodyPtr resultBody;
+    GeomShapePtr baseShape;
+    std::shared_ptr<GeomAlgoAPI_MakeShape> makeShape;
+  };
+
 private:
 
   /// Load Naming data structure of the feature to the document
@@ -66,6 +74,11 @@ private:
                     GeomAPI_DataMapOfShapeShape& theMapOfShapes,
                     const bool theIsStoreAsGenerated = false);
 
+  /// Stores deleted shapes.
+  void storeDeletedShapes(std::vector<ResultBaseAlgo>& theResultBaseAlgoList,
+                          const ListOfShape& theTools,
+                          const GeomShapePtr theResultShapesCompound);
+
 };
 
 #endif
index 92658389ca0f9ce4696b6cc839a4ddf6c54226de..3ef472216f53143c2598369fd6724ab0dc04e991 100755 (executable)
@@ -343,6 +343,11 @@ void unusedSubsOfComposolid(const CompsolidSubs& theObjects, CompsolidSubs& theN
     if (aCSIt->first->shapeType() != GeomAPI_Shape::COMPSOLID)
       continue;
 
+    // check the compsolid is selected
+    if (aCSIt->second.size() == 1 && aCSIt->first->isEqual(aCSIt->second.front()))
+      continue;
+
+    // process all sub-solids of compsolid
     ListOfShape aNotUsedSolids;
     for (GeomAPI_ShapeExplorer anExp(aCSIt->first, GeomAPI_Shape::SOLID);
          anExp.more(); anExp.next()) {
diff --git a/src/FeaturesPlugin/Test/Test1816.py b/src/FeaturesPlugin/Test/Test1816.py
new file mode 100644 (file)
index 0000000..3fe9e47
--- /dev/null
@@ -0,0 +1,101 @@
+## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
+# The test for correct selection of a whole feautre as argument of other feature: select all extrusions
+# produced from the scetch, then change the number of sketch contours, so, anytway all extrusions must
+# still be selected in the Cut Boolean oepration
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+model.addParameter(Part_1_doc, "Ray", "12.5")
+model.addParameter(Part_1_doc, "Lgx", "50")
+model.addParameter(Part_1_doc, "Lgy", "60")
+model.addParameter(Part_1_doc, "Lgz", "75")
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
+SketchLine_1 = Sketch_1.addLine(0, 0, 0, 75)
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchPoint_1.result())
+SketchProjection_2 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OZ"), False)
+SketchLine_2 = SketchProjection_2.createdFeature()
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.result())
+SketchLine_3 = Sketch_1.addLine(0, 75, 37.5, 75)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_3.startPoint())
+SketchArc_1 = Sketch_1.addArc(37.5, 62.5, 37.5, 75, 50, 62.5, True)
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchArc_1.startPoint())
+SketchLine_4 = Sketch_1.addLine(50, 62.5, 50, 0)
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_4.startPoint())
+SketchProjection_3 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OX"), False)
+SketchLine_5 = SketchProjection_3.createdFeature()
+SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.result())
+SketchLine_6 = Sketch_1.addLine(50, 0, 0, 0)
+SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_6.startPoint())
+SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_6.endPoint())
+SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_4.result())
+SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_3.result())
+SketchConstraintTangent_1 = Sketch_1.setTangent(SketchLine_3.result(), SketchArc_1.results()[1])
+SketchConstraintTangent_2 = Sketch_1.setTangent(SketchLine_4.result(), SketchArc_1.results()[1])
+SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), "Lgz")
+SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_6.result(), "Lgx")
+SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], "Ray")
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_3r-SketchArc_1_2f-SketchLine_4r-SketchLine_6r")], model.selection(), 0, "Lgy")
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_1"))
+SketchLine_7 = Sketch_2.addLine(0, -75, 0, 0)
+SketchProjection_4 = Sketch_2.addProjection(model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_3s-SketchLine_1e"), False)
+SketchPoint_2 = SketchProjection_4.createdFeature()
+SketchConstraintCoincidence_9 = Sketch_2.setCoincident(SketchLine_7.startPoint(), SketchPoint_2.result())
+SketchProjection_5 = Sketch_2.addProjection(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"), False)
+SketchPoint_3 = SketchProjection_5.createdFeature()
+SketchConstraintCoincidence_10 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchPoint_3.result())
+SketchLine_8 = Sketch_2.addLine(0, 0, 60, 0)
+SketchConstraintCoincidence_11 = Sketch_2.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint())
+SketchProjection_6 = Sketch_2.addProjection(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_1&Extrusion_1_1/From_Face_1"), False)
+SketchPoint_4 = SketchProjection_6.createdFeature()
+SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchPoint_4.result())
+SketchLine_9 = Sketch_2.addLine(60, 0, 59.99999999999999, -62.5)
+SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint())
+SketchProjection_7 = Sketch_2.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_1&Extrusion_1_1/From_Face_1"), False)
+SketchLine_10 = SketchProjection_7.createdFeature()
+SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchLine_10.result())
+SketchLine_11 = Sketch_2.addLine(0, -75, 47.49999999999999, -75)
+SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_7.startPoint(), SketchLine_11.startPoint())
+SketchProjection_8 = Sketch_2.addProjection(model.selection("EDGE", "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_1"), False)
+SketchLine_12 = SketchProjection_8.createdFeature()
+SketchConstraintCoincidence_16 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_12.result())
+SketchArc_2 = Sketch_2.addArc(47.49999999999999, -62.5, 59.99999999999999, -62.5, 47.49999999999999, -75, True)
+SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchLine_9.endPoint(), SketchArc_2.startPoint())
+SketchConstraintRadius_2 = Sketch_2.setRadius(SketchArc_2.results()[1], "Ray")
+SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchArc_2.endPoint(), SketchLine_11.endPoint())
+SketchConstraintTangent_3 = Sketch_2.setTangent(SketchArc_2.results()[1], SketchLine_11.result())
+SketchConstraintTangent_4 = Sketch_2.setTangent(SketchLine_9.result(), SketchArc_2.results()[1])
+model.do()
+Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_7r-SketchLine_8r-SketchLine_9r-SketchLine_11f-SketchArc_2_2f")], model.selection(), 0, "Lgx")
+Common_1 = model.addCommon(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_2_1")])
+model.end()
+
+assert(len(Common_1.results()) == 1)
+model.testResultsVolumes(Common_1, [221498.777690970688126981258392334])
+
+assert(model.checkPythonDump())
diff --git a/src/FeaturesPlugin/Test/Test2631.py b/src/FeaturesPlugin/Test/Test2631.py
new file mode 100644 (file)
index 0000000..a254a07
--- /dev/null
@@ -0,0 +1,62 @@
+## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
+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("XOY"))
+SketchLine_1 = Sketch_1.addLine(-53.93497380447579, 58.11303515552675, 60.01215395145899, 58.11303515552675)
+SketchLine_2 = Sketch_1.addLine(60.01215395145899, 58.11303515552675, 60.01215395145899, 11.01488901640705)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+model.do()
+Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_3 = Sketch_2.addLine(31.90519577166173, 58.11303515552675, 60.012153951459, 58.11303515552675)
+SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), False)
+SketchLine_4 = SketchProjection_1.createdFeature()
+SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchLine_3.startPoint(), SketchLine_4.result())
+SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_4).endPoint(), SketchLine_3.endPoint())
+SketchLine_5 = Sketch_2.addLine(60.012153951459, 58.11303515552675, 60.012153951459, 33.0446670492211)
+SketchConstraintCoincidence_4 = Sketch_2.setCoincident(SketchLine_3.endPoint(), SketchLine_5.startPoint())
+SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), False)
+SketchLine_6 = SketchProjection_2.createdFeature()
+SketchConstraintCoincidence_5 = Sketch_2.setCoincident(SketchLine_5.endPoint(), SketchLine_6.result())
+model.do()
+Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2")])
+Edge_2 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-SketchLine_3"), model.selection("EDGE", "Sketch_2/Edge-SketchLine_5")])
+Cut_1 = model.addCut(Part_1_doc, [model.selection("EDGE", "Edge_1_1"), model.selection("EDGE", "Edge_1_2")], [model.selection("EDGE", "Edge_2_1"), model.selection("EDGE", "Edge_2_2")])
+model.testHaveNamingSubshapes(Cut_1, model, Part_1_doc)
+model.do()
+model.end()
+
+from GeomAPI import  GeomAPI_Shape
+
+model.testNbResults(Cut_1, 2)
+model.testNbSubResults(Cut_1, [0, 0])
+model.testNbSubShapes(Cut_1, GeomAPI_Shape.SOLID, [0, 0])
+model.testNbSubShapes(Cut_1, GeomAPI_Shape.FACE, [0, 0])
+model.testNbSubShapes(Cut_1, GeomAPI_Shape.EDGE, [1, 1])
+model.testNbSubShapes(Cut_1, GeomAPI_Shape.VERTEX, [2, 2])
+
+assert(model.checkPythonDump())
index c17e3acf2a62198ddc6806efc12471bfc1c3cf55..4371726b783dc8586da36d312870933a2f067eb2 100644 (file)
@@ -17,7 +17,7 @@ To create Angular copy in the active part:
 
 The following property panel appears.
 
-.. image:: images/AngularCopy.png
+.. image:: images/angularcopy.png
   :align: center
 
 .. centered::
@@ -38,7 +38,7 @@ Result
 """"""
 Result of cylinder rotation is compound.
 
-.. image:: images/angularcopy.png
+.. image:: images/angularcopycyl.png
    :align: center
 
 .. centered::
index 7f804075fcb44f8b2ad504d6f3767b1a824e0c37..9b2b15d3e9e8a34060c51e0b2030e07233c446c1 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/FilletFixed.png and b/src/FeaturesPlugin/doc/images/FilletFixed.png differ
index bc9708ec900e634c9feed225d99059810b9eab2e..fbcdf4c82779cdda3ba7db2328e0236024cc2697 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/FilletVarious.png and b/src/FeaturesPlugin/doc/images/FilletVarious.png differ
index 1daa1ef9b9db34c8f5d1b0b91b3477d093b8b1f0..d8d3d7bbfbc88cb26393b86e4126d24d81743995 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/LinearCopy.png and b/src/FeaturesPlugin/doc/images/LinearCopy.png differ
index 5db8d2ab7e66a44c70cc0be52d6c5d16bcbb74e4..ea3a034f19456056c300445cca404acd555e3ec6 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/Pipe1.png and b/src/FeaturesPlugin/doc/images/Pipe1.png differ
index b3f4868ac9ea1e0e1669bbb0607b9104e01706ca..0df4f0807f49443a2e7bb4618ddfbe292d0c97b2 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/Pipe2.png and b/src/FeaturesPlugin/doc/images/Pipe2.png differ
index fe84a2b3b2c87d67f8007759d0ee046394b8b4d9..c9c56ba2fd33f9dbfac9a56e872060ec6b6b1cad 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/Pipe3.png and b/src/FeaturesPlugin/doc/images/Pipe3.png differ
index 9549eeabfd001ebae81f534ad7d3c4b6b3039012..58a26f3ec195d189797eb8a01c53c6f3cc21284d 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/Rotation1.png and b/src/FeaturesPlugin/doc/images/Rotation1.png differ
index 4b1224b516f036472130df1a4b70941adbbf6e84..f4c49148c45aa6391e37b3f3f31ba4101dfa6a32 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/Rotation2.png and b/src/FeaturesPlugin/doc/images/Rotation2.png differ
index 6e32bfa87df44398da2189ace876186e74d58c30..37882721562fecc141f32127a3053f6fe942f96e 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/Scale1.png and b/src/FeaturesPlugin/doc/images/Scale1.png differ
index 819af55f925ac12507c2fe9fbc0c130ffab568d2..29f7fe9b00ddb2b7eb0c4a81b0268f64e846b5fe 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/Scale2.png and b/src/FeaturesPlugin/doc/images/Scale2.png differ
diff --git a/src/FeaturesPlugin/doc/images/Scale_XYZ.png b/src/FeaturesPlugin/doc/images/Scale_XYZ.png
new file mode 100644 (file)
index 0000000..3696a38
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/Scale_XYZ.png differ
diff --git a/src/FeaturesPlugin/doc/images/Scale_common_factor.png b/src/FeaturesPlugin/doc/images/Scale_common_factor.png
new file mode 100644 (file)
index 0000000..11c46a0
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/Scale_common_factor.png differ
index 3d172956403f9d0e38f0b88f7a9902abeeb205c9..3cabfab309297618edf5d43d3b698b1de8b14067 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/Translation1.png and b/src/FeaturesPlugin/doc/images/Translation1.png differ
index 8b367d1cbd7d2840b71fa73705deabe87976d2eb..fcf60f3d788bd6fd3047efff07af9fb79a9383db 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/Translation2.png and b/src/FeaturesPlugin/doc/images/Translation2.png differ
index 82cdb8d614034ea2ad592a06df2841d3c67cc7f9..d541666226aa740fb12439d923d7db4651d63a52 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/Translation3.png and b/src/FeaturesPlugin/doc/images/Translation3.png differ
diff --git a/src/FeaturesPlugin/doc/images/fillet_fix_rad.png b/src/FeaturesPlugin/doc/images/fillet_fix_rad.png
new file mode 100644 (file)
index 0000000..51f6576
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/fillet_fix_rad.png differ
diff --git a/src/FeaturesPlugin/doc/images/fillet_var_rad.png b/src/FeaturesPlugin/doc/images/fillet_var_rad.png
new file mode 100644 (file)
index 0000000..fc5ce52
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/fillet_var_rad.png differ
diff --git a/src/FeaturesPlugin/doc/images/linearcopyres.png b/src/FeaturesPlugin/doc/images/linearcopyres.png
new file mode 100644 (file)
index 0000000..bf50eec
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/linearcopyres.png differ
diff --git a/src/FeaturesPlugin/doc/images/locationPipe.png b/src/FeaturesPlugin/doc/images/locationPipe.png
new file mode 100644 (file)
index 0000000..ca660ef
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/locationPipe.png differ
diff --git a/src/FeaturesPlugin/doc/images/rotation_3points.png b/src/FeaturesPlugin/doc/images/rotation_3points.png
new file mode 100644 (file)
index 0000000..5354de6
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/rotation_3points.png differ
diff --git a/src/FeaturesPlugin/doc/images/rotation_axis.png b/src/FeaturesPlugin/doc/images/rotation_axis.png
new file mode 100644 (file)
index 0000000..a4259a7
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/rotation_axis.png differ
diff --git a/src/FeaturesPlugin/doc/images/simplePipe.png b/src/FeaturesPlugin/doc/images/simplePipe.png
new file mode 100644 (file)
index 0000000..689e2b2
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/simplePipe.png differ
diff --git a/src/FeaturesPlugin/doc/images/symmetryAxis.png b/src/FeaturesPlugin/doc/images/symmetryAxis.png
new file mode 100644 (file)
index 0000000..fe3ed09
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/symmetryAxis.png differ
diff --git a/src/FeaturesPlugin/doc/images/symmetryAxisres.png b/src/FeaturesPlugin/doc/images/symmetryAxisres.png
new file mode 100644 (file)
index 0000000..37f3119
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/symmetryAxisres.png differ
diff --git a/src/FeaturesPlugin/doc/images/symmetryPlane.png b/src/FeaturesPlugin/doc/images/symmetryPlane.png
new file mode 100644 (file)
index 0000000..8dce301
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/symmetryPlane.png differ
diff --git a/src/FeaturesPlugin/doc/images/symmetryPlaneres.png b/src/FeaturesPlugin/doc/images/symmetryPlaneres.png
new file mode 100644 (file)
index 0000000..7442862
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/symmetryPlaneres.png differ
diff --git a/src/FeaturesPlugin/doc/images/symmetryPoint.png b/src/FeaturesPlugin/doc/images/symmetryPoint.png
new file mode 100644 (file)
index 0000000..ed0d251
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/symmetryPoint.png differ
diff --git a/src/FeaturesPlugin/doc/images/symmetryPointres.png b/src/FeaturesPlugin/doc/images/symmetryPointres.png
new file mode 100644 (file)
index 0000000..7d2d58a
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/symmetryPointres.png differ
diff --git a/src/FeaturesPlugin/doc/images/translation_2points.png b/src/FeaturesPlugin/doc/images/translation_2points.png
new file mode 100644 (file)
index 0000000..284c106
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/translation_2points.png differ
diff --git a/src/FeaturesPlugin/doc/images/translation_XYZ.png b/src/FeaturesPlugin/doc/images/translation_XYZ.png
new file mode 100644 (file)
index 0000000..085328e
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/translation_XYZ.png differ
diff --git a/src/FeaturesPlugin/doc/images/translation_vector.png b/src/FeaturesPlugin/doc/images/translation_vector.png
new file mode 100644 (file)
index 0000000..2a65728
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/translation_vector.png differ
index 1ff76b982c4db01a4213b3f59fc9ad93a2349460..660e7fef515397ed6f013bd24397cf17f86bde8f 100644 (file)
@@ -46,7 +46,7 @@ Result
 """"""
 Result of operation is compound.
 
-.. image:: images/linearcopy.png
+.. image:: images/linearcopyres.png
    :align: center
 
 .. centered::
index 383eca0bb7778c3366424a07545f60ff3031f524..ed5d6e61f20e5ac5dc8dce431389f014c8de2b2b 100644 (file)
@@ -92,7 +92,7 @@ Result of extrusion of rectangular face along  arc.
    :align: center
 
 .. centered::
-   Pipe by object and path
+   Pipe by object, path and Bi-normal
 
 **See Also** a sample TUI Script of a :ref:`tui_binormal_pipe` operation.
 
index 8ca725554efc0aa774334ff20c152e3986cc142d..91629ac5cdca38cdb7e917bf5532d5ce2c864164 100644 (file)
@@ -49,7 +49,7 @@ Input fields:
 Result
 """"""
 
-Result of operation is transformed initial shape.
+Result of operation is transformed initial shape shown in wireframe mode together  with initial shape in shading mode.
 
 .. image:: images/Scale_common_factor.png
    :align: center
@@ -85,7 +85,7 @@ Result
 
 Result of operation is transformed initial shape.
 
-.. image:: images/Scale_common_factor.png
+.. image:: images/Scale_XYZ.png
    :align: center
 
 .. centered::
index b3bbd5edcd1796ff429e8db7565121ce183c96db..47099261a7ec899c36e100a510134189cd3f7e88 100644 (file)
@@ -32,7 +32,7 @@ The Vector of translation can be defined in three different ways:
 Translation by axis and distance
 --------------------------------
 
-.. image:: images/Translation1.png
+.. image:: images/Translation2.png
   :align: center
 
 .. centered::
@@ -53,7 +53,7 @@ Result
 
 Result of operation is shifted initial shape.
 
-.. image:: images/translation_vector.png
+.. image:: images/translation_XYZ.png
    :align: center
 
 .. centered::
@@ -64,7 +64,7 @@ Result of operation is shifted initial shape.
 Translation by vector
 ---------------------
 
-.. image:: images/Translation2.png
+.. image:: images/Translation1.png
   :align: center
 
 .. centered::
@@ -117,7 +117,7 @@ Result
 
 Result of operation is shifted initial shape.
 
-.. image:: images/translation_vector.png
+.. image:: images/translation_2points.png
    :align: center
 
 .. centered::
index b7d591b29c184ac7dae0caed20b00afbcd46436d..3d9f7e8e75fadd8a54f9746befa442e626363fae 100644 (file)
@@ -63,8 +63,7 @@ InitializationPlugin_PyInterp::positions(const std::string& theExpression,
 
   // prepare a context
   PyObject* aContext = PyDict_New();
-  PyObject* aBuiltinModule = PyImport_AddModule("__builtin__");
-  PyDict_SetItemString(aContext, "__builtins__", aBuiltinModule);
+  PyDict_SetItemString(aContext, "__builtins__", PyEval_GetBuiltins());
 
   std::string anExpression = adjustExpression(theExpression);
   // extend aContext with variables
index 82f33b986f1a95cf388e48f8ad68796e4190272b..365afd72688844c289f8a241460795cef819f0b3 100755 (executable)
@@ -364,7 +364,8 @@ void Model_BodyBuilder::deleted(const std::shared_ptr<GeomAPI_Shape>& theOldShap
 void Model_BodyBuilder::loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
   std::shared_ptr<GeomAPI_Shape>  theShapeIn,
   const int  theKindOfShape,
-  const int  theTag)
+  const int  theTag,
+  const GeomShapePtr theShapes)
 {
   TopoDS_Shape aShapeIn = theShapeIn->impl<TopoDS_Shape>();
   TopTools_MapOfShape aView;
@@ -375,15 +376,17 @@ void Model_BodyBuilder::loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
     if (!aView.Add(aRoot)) continue;
     std::shared_ptr<GeomAPI_Shape> aRShape(new GeomAPI_Shape());
     aRShape->setImpl((new TopoDS_Shape(aRoot)));
-    if (theMS->isDeleted (aRShape)) {
-      if (!aResultShape->isSubShape(aRShape, false)) {
-          ListOfShape aHist;
-          if (BRepTools_History::IsSupportedType(aRoot)) // to avoid crash in #2572
-            theMS->modified(aRShape, aHist);
-          if (aHist.size() == 0 || (aHist.size() == 1 && aHist.front()->isSame(aRShape)))
-            builder(theTag)->Delete(aRoot);
-      }
+    if (!theMS->isDeleted(aRShape)
+        || aResultShape->isSubShape(aRShape, false)
+        || (theShapes.get() && theShapes->isSubShape(aRShape, false))) {
+      continue;
     }
+
+    ListOfShape aHist;
+    if (BRepTools_History::IsSupportedType(aRoot)) // to avoid crash in #2572
+      theMS->modified(aRShape, aHist);
+    if (aHist.size() == 0 || (aHist.size() == 1 && aHist.front()->isSame(aRShape)))
+      builder(theTag)->Delete(aRoot);
   }
 }
 
index 2c8f563218b5d79836565dd06f1e70b6a962e629..d34fb0b173bac339d4a8b6e77ea3789334ff8a3d 100755 (executable)
@@ -92,7 +92,8 @@ public:
   MODEL_EXPORT virtual void loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
                                                std::shared_ptr<GeomAPI_Shape>  theShapeIn,
                                                const int  theKindOfShape,
-                                               const int  theTag);
+                                               const int  theTag,
+                                               const GeomShapePtr theShapes = GeomShapePtr());
   /// load and orient modified shapes
   MODEL_EXPORT virtual void loadAndOrientModifiedShapes (
                                                   GeomAlgoAPI_MakeShape* theMS,
index 8524cc31d83b15576be3791b6fdd0e9f632221b1..8da3d2158fc56eeb50d6d2e65362f293c816f1bd 100755 (executable)
@@ -88,7 +88,8 @@ public:
   virtual void loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
                                                std::shared_ptr<GeomAPI_Shape>  theShapeIn,
                                                const int  theKindOfShape,
-                                               const int  theTag) = 0;
+                                               const int  theTag,
+                                               const GeomShapePtr theShapes = GeomShapePtr()) = 0;
   /// load and orient modified shapes
   virtual void loadAndOrientModifiedShapes (
                                                   GeomAlgoAPI_MakeShape* theMS,
index ba28f8b90cf9c1bbda60e646be1d94b26b9d09b3..0ee6696c2e4d28b6c8e8b79eb1d020d618e449ba 100644 (file)
@@ -128,9 +128,10 @@ void ModelAPI_ResultBody::deleted(
 void ModelAPI_ResultBody::loadDeletedShapes(GeomAlgoAPI_MakeShape* theMS,
   std::shared_ptr<GeomAPI_Shape>  theShapeIn,
   const int  theKindOfShape,
-  const int  theTag)
+  const int  theTag,
+  const GeomShapePtr theShapes)
 {
-  myBuilder->loadDeletedShapes(theMS, theShapeIn, theKindOfShape, theTag);
+  myBuilder->loadDeletedShapes(theMS, theShapeIn, theKindOfShape, theTag, theShapes);
 }
 
 void ModelAPI_ResultBody::loadAndOrientModifiedShapes(GeomAlgoAPI_MakeShape* theMS,
index cb17e6522241d13c3303946089413c22c19f04db..b934744c6a93e15336f28d498dc8c5f912b1012f 100644 (file)
@@ -140,7 +140,8 @@ public:
   MODELAPI_EXPORT virtual void loadDeletedShapes(GeomAlgoAPI_MakeShape* theMS,
     std::shared_ptr<GeomAPI_Shape>  theShapeIn,
     const int  theKindOfShape,
-    const int  theTag);
+    const int  theTag,
+    const GeomShapePtr theShapes = GeomShapePtr());
 
   /// load and orient modified shapes
   MODELAPI_EXPORT virtual void loadAndOrientModifiedShapes(GeomAlgoAPI_MakeShape* theMS,
diff --git a/src/PythonAddons/doc/images/Boxes.png b/src/PythonAddons/doc/images/Boxes.png
new file mode 100644 (file)
index 0000000..01ccf5f
Binary files /dev/null and b/src/PythonAddons/doc/images/Boxes.png differ
diff --git a/src/PythonAddons/doc/images/box_property_panel.png b/src/PythonAddons/doc/images/box_property_panel.png
new file mode 100644 (file)
index 0000000..dfe6774
Binary files /dev/null and b/src/PythonAddons/doc/images/box_property_panel.png differ