]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the performance regression in issue #2256 : Import BREP is 400 times longer...
authormpv <mpv@opencascade.com>
Thu, 12 Mar 2020 07:26:54 +0000 (10:26 +0300)
committermpv <mpv@opencascade.com>
Thu, 12 Mar 2020 07:27:08 +0000 (10:27 +0300)
src/FeaturesPlugin/Test/TestCopyMoveResult.py
src/Model/Model_BodyBuilder.cpp

index cebb307ac48c9f98fa1f98114b6fa33cb498bc30..6662ad6ffa236295ddb5adfa4bf03a8f9681c090 100644 (file)
@@ -48,7 +48,7 @@ Extrusion_1.result().setName("Origin")
 Group_1 = model.addGroup(Part_1_doc, "Solids", [model.selection("SOLID", "Extrusion_1_1_1")])
 Copy_1 = model.addCopy(Part_1_doc, [model.selection("COMPSOLID", "Origin")], 1)
 Copy_1.result().setName("Origin_1")
-Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Origin_1_1/Copy_3][Origin_1_1/Copy_7]"), model.selection("EDGE", "[Origin_1_1/Copy_12][Origin_1_1/Copy_14]")], 2)
+Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "[Origin_1_1/Copy_2][Origin_1_1/Copy_6]"), model.selection("EDGE", "[Origin_1_2/Copy_4][Origin_1_2/Copy_6]")], 2)
 Fillet_1.result().setName("CopyCompound")
 model.do()
 # move the group feature to the end - through copy and fillet on this copy (to distinguish the origin and the copy)
index fd85d452a0a894c34f87483d931c78823968ce60..9aa0b983b5eeeb65724304e0f06a86701a8ee4c5 100644 (file)
@@ -936,8 +936,12 @@ int findAmbiguities(const TopoDS_Shape&           theShapeIn,
 //=======================================================================
 void Model_BodyBuilder::loadFirstLevel(GeomShapePtr theShape, const std::string& theName)
 {
-  if(theShape->isNull()) return;
-  TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
+  GeomShapePtr aShapePtr = shape();
+  if (theShape->isNull() || !aShapePtr.get())
+    return;
+  TopoDS_Shape aShape = shape()->impl<TopoDS_Shape>();
+  if (aShape.IsNull())
+    return;
   std::string aName;
   if (aShape.ShapeType() == TopAbs_COMPOUND || aShape.ShapeType() == TopAbs_COMPSOLID) {
     TopoDS_Iterator itr(aShape);