Salome HOME
Issue #1774: Can't select edge for tangent constraint creation
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Partition.cpp
index 7034f9d4c853e4c52170b13c6a191e4c27545a5e..06849b9f17eb42f2debdbb3f7297a674e339b9a8 100644 (file)
@@ -65,25 +65,16 @@ void GeomAlgoAPI_Partition::build(const ListOfShape& theObjects,
   }
   TopoDS_Shape aResult = anOperation->Shape();
 
-  if(aResult.ShapeType() == TopAbs_COMPOUND) {
-    aResult = GeomAlgoAPI_DFLoader::refineResult(aResult);
-  }
   if(aResult.ShapeType() == TopAbs_COMPOUND) {
     std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
     aGeomShape->setImpl(new TopoDS_Shape(aResult));
-    ListOfShape aCompSolids, aFreeSolids;
-    aGeomShape = GeomAlgoAPI_ShapeTools::combineShapes(aGeomShape,
-                                                       GeomAPI_Shape::COMPSOLID,
-                                                       aCompSolids,
-                                                       aFreeSolids);
-    aResult = aGeomShape->impl<TopoDS_Shape>();
+    aResult = GeomAlgoAPI_ShapeTools::groupSharedTopology(aGeomShape)->impl<TopoDS_Shape>();
   }
 
   // Setting result.
   if(aResult.IsNull()) {
     return;
   }
-  aResult = GeomAlgoAPI_DFLoader::refineResult(aResult);
   std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
   aShape->setImpl(new TopoDS_Shape(aResult));
   this->setShape(aShape);