X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_SketchBuilder.cpp;h=4e894827d7f63d037da9748132f9784a6107f721;hb=9e869ede4d8c56262bb20534543c2bf56cd6a91b;hp=ddd6d397712e5bcf3aa29e2ae2b38616ad4a71e3;hpb=294640ac53df9e1fc697b007aca1e00259b5049a;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp index ddd6d3977..4e894827d 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp @@ -80,11 +80,11 @@ static void removeWasteEdges(std::list::iterator& theStartVertex, void GeomAlgoAPI_SketchBuilder::createFaces( - const boost::shared_ptr& theOrigin, const boost::shared_ptr& theDirX, - const boost::shared_ptr& theDirY, const boost::shared_ptr& theNorm, - const std::list >& theFeatures, - std::list >& theResultFaces, - std::list >& theResultWires) + const std::shared_ptr& theOrigin, const std::shared_ptr& theDirX, + const std::shared_ptr& theDirY, const std::shared_ptr& theNorm, + const std::list >& theFeatures, + std::list >& theResultFaces, + std::list >& theResultWires) { if (theFeatures.empty()) return; @@ -95,10 +95,10 @@ void GeomAlgoAPI_SketchBuilder::createFaces( TopoDS_Shape aFeaturesCompound; // Obtain only edges from the features list - std::list > anEdges; - std::list >::const_iterator aFeatIt = theFeatures.begin(); + std::list > anEdges; + std::list >::const_iterator aFeatIt = theFeatures.begin(); for (; aFeatIt != theFeatures.end(); aFeatIt++) { - boost::shared_ptr aShape(*aFeatIt); + std::shared_ptr aShape(*aFeatIt); const TopoDS_Edge& anEdge = aShape->impl(); if (anEdge.ShapeType() == TopAbs_EDGE) anEdges.push_back(aShape); @@ -107,9 +107,9 @@ void GeomAlgoAPI_SketchBuilder::createFaces( if (anEdges.size() == 1) { // If there is only one feature, BOPAlgo_Builder will decline to work. Need to process it anyway aFeaturesCompound = anEdges.front()->impl(); } else { - std::list >::const_iterator anIt = anEdges.begin(); + std::list >::const_iterator anIt = anEdges.begin(); for (; anIt != anEdges.end(); anIt++) { - boost::shared_ptr aPreview(*anIt); + std::shared_ptr aPreview(*anIt); aBuilder.AddArgument(aPreview->impl()); } aPF.SetArguments(aBuilder.Arguments()); @@ -219,7 +219,7 @@ void GeomAlgoAPI_SketchBuilder::createFaces( TopoDS_Face aPatch; createFace(*aVertIter, anEdgeIter, aProcEdges.end(), aPlane, aPatch); if (!aPatch.IsNull()) { - boost::shared_ptr aFace(new GeomAPI_Shape); + std::shared_ptr aFace(new GeomAPI_Shape); aFace->setImpl(new TopoDS_Face(aPatch)); theResultFaces.push_back(aFace); } @@ -323,7 +323,7 @@ void GeomAlgoAPI_SketchBuilder::createFaces( std::list::const_iterator aTailIter = aTail.begin(); for (; aTailIter != aTail.end(); aTailIter++) if (!aTailIter->IsNull()) { - boost::shared_ptr aWire(new GeomAPI_Shape); + std::shared_ptr aWire(new GeomAPI_Shape); aWire->setImpl(new TopoDS_Shape(*aTailIter)); theResultWires.push_back(aWire); } @@ -371,30 +371,30 @@ void GeomAlgoAPI_SketchBuilder::createFaces( fixIntersections(theResultFaces); } -void GeomAlgoAPI_SketchBuilder::createFaces(const boost::shared_ptr& theOrigin, - const boost::shared_ptr& theDirX, - const boost::shared_ptr& theDirY, - const boost::shared_ptr& theNorm, - const boost::shared_ptr& theWire, - std::list >& theResultFaces) +void GeomAlgoAPI_SketchBuilder::createFaces(const std::shared_ptr& theOrigin, + const std::shared_ptr& theDirX, + const std::shared_ptr& theDirY, + const std::shared_ptr& theNorm, + const std::shared_ptr& theWire, + std::list >& theResultFaces) { - boost::shared_ptr aWire = boost::dynamic_pointer_cast(theWire); + std::shared_ptr aWire = std::dynamic_pointer_cast(theWire); if(!aWire) return; // Filter wires, return only faces. - std::list > aFilteredWires; + std::list > aFilteredWires; createFaces(theOrigin, theDirX, theDirY, theNorm, aWire->getEdges(), theResultFaces, aFilteredWires); } void GeomAlgoAPI_SketchBuilder::fixIntersections( - std::list >& theFaces) + std::list >& theFaces) { BRepClass_FaceClassifier aClassifier; - std::list >::iterator anIter1 = theFaces.begin(); - std::list >::iterator anIter2; + std::list >::iterator anIter1 = theFaces.begin(); + std::list >::iterator anIter2; for (; anIter1 != theFaces.end(); anIter1++) { anIter2 = anIter1; for (++anIter2; anIter2 != theFaces.end(); anIter2++) { @@ -430,7 +430,7 @@ void GeomAlgoAPI_SketchBuilder::fixIntersections( (*anIter2)->setImpl(new TopoDS_Shape(anExp.Current())); isFirstFace = false; } else { - boost::shared_ptr aShape(new GeomAPI_Shape); + std::shared_ptr aShape(new GeomAPI_Shape); aShape->setImpl(new TopoDS_Shape(anExp.Current())); theFaces.push_back(aShape); } @@ -447,7 +447,7 @@ void GeomAlgoAPI_SketchBuilder::fixIntersections( (*anIter1)->setImpl(new TopoDS_Shape(anExp.Current())); isFirstFace = false; } else { - boost::shared_ptr aShape(new GeomAPI_Shape); + std::shared_ptr aShape(new GeomAPI_Shape); aShape->setImpl(new TopoDS_Shape(anExp.Current())); theFaces.push_back(aShape); }