From: dbv Date: Tue, 3 Nov 2015 15:16:46 +0000 (+0300) Subject: Removed naming for pipe builders as it is not used X-Git-Tag: V_2.0.0_alfa1~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ec97f1d56de8f3975e2952278c536159c8ff3da0;p=modules%2Fshaper.git Removed naming for pipe builders as it is not used --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp index f5e69c52f..e608956c6 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp @@ -20,8 +20,7 @@ GeomAlgoAPI_MakeShape::GeomAlgoAPI_MakeShape(void* theMkShape, const AlgoType th myShape(new GeomAPI_Shape()) { switch (myAlgoType) { - case MakeShape: - case MakePipe: { + case MakeShape: { myShape->setImpl(new TopoDS_Shape(implPtr()->Shape())); break; } @@ -32,19 +31,6 @@ GeomAlgoAPI_MakeShape::GeomAlgoAPI_MakeShape(void* theMkShape, const AlgoType th } } -//================================================================================================= -GeomAlgoAPI_MakeShape::GeomAlgoAPI_MakeShape(void* theMkShape, - const std::shared_ptr theWire, - const std::shared_ptr theBaseShape) -: GeomAPI_Interface(theMkShape), - myAlgoType(MakePipe), - myShape(new GeomAPI_Shape()), - myWire(theWire), - myBaseShape(theBaseShape) -{ - myShape->setImpl(new TopoDS_Shape(implPtr()->Shape())); -} - //================================================================================================= const std::shared_ptr GeomAlgoAPI_MakeShape::shape() const { @@ -55,52 +41,21 @@ const std::shared_ptr GeomAlgoAPI_MakeShape::shape() const void GeomAlgoAPI_MakeShape::generated(const std::shared_ptr theShape, ListOfShape& theHistory) { - if(myAlgoType == MakePipe) { - BRepOffsetAPI_MakePipe* aMakePipe = implPtr(); - TopExp_Explorer aShapeExplorer(myWire->impl(), TopAbs_EDGE); - for (; aShapeExplorer.More(); aShapeExplorer.Next ()) { - const TopoDS_Shape& aSpine = aShapeExplorer.Current(); - const TopoDS_Shape& aProfile = theShape->impl(); - if(aProfile.ShapeType() != TopAbs_EDGE && aProfile.ShapeType() != TopAbs_VERTEX) { - return; - } - const TopoDS_Shape& aBaseShape = myBaseShape->impl(); - TopExp_Explorer anExp(aBaseShape, aProfile.ShapeType()); - Standard_Boolean hasShape = Standard_False; - for(; anExp.More(); anExp.Next()) { - if(anExp.Current().IsSame(aProfile)) { - hasShape = Standard_True; - break; - } - } - if(!hasShape) { - return; - } - const TopoDS_Shape& aGeneratedShape = aMakePipe->Generated(aSpine, aProfile); - if(aGeneratedShape.IsNull()) { - continue; - } - std::shared_ptr aShape(new GeomAPI_Shape()); - aShape->setImpl(new TopoDS_Shape(aGeneratedShape)); - theHistory.push_back(aShape); - } - } else { - TopTools_ListOfShape aList; - if(myAlgoType == MakeShape) { - BRepBuilderAPI_MakeShape* aMakeShape = implPtr(); - aList = aMakeShape->Generated(theShape->impl()); - } else if(myAlgoType == BOPAlgoBuilder) { - BOPAlgo_Builder* aBOPBuilder = implPtr(); - aList = aBOPBuilder->Generated(theShape->impl()); - } - for(TopTools_ListIteratorOfListOfShape anIt(aList); anIt.More(); anIt.Next()) { - if(anIt.Value().IsNull()) { - continue; - } - std::shared_ptr aShape(new GeomAPI_Shape()); - aShape->setImpl(new TopoDS_Shape(anIt.Value())); - theHistory.push_back(aShape); + TopTools_ListOfShape aList; + if(myAlgoType == MakeShape) { + BRepBuilderAPI_MakeShape* aMakeShape = implPtr(); + aList = aMakeShape->Generated(theShape->impl()); + } else if(myAlgoType == BOPAlgoBuilder) { + BOPAlgo_Builder* aBOPBuilder = implPtr(); + aList = aBOPBuilder->Generated(theShape->impl()); + } + for(TopTools_ListIteratorOfListOfShape anIt(aList); anIt.More(); anIt.Next()) { + if(anIt.Value().IsNull()) { + continue; } + std::shared_ptr aShape(new GeomAPI_Shape()); + aShape->setImpl(new TopoDS_Shape(anIt.Value())); + theHistory.push_back(aShape); } } diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h index b4e46e54a..ea89fe89e 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h @@ -22,7 +22,6 @@ public: /// Algo type enum enum AlgoType { MakeShape, - MakePipe, BOPAlgoBuilder }; @@ -30,11 +29,6 @@ public: /// Constructor by the already stored builder in the interface GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder, const AlgoType theAlgoType = MakeShape); - /// Constructor by the builder and wire. Used for pipe builder. - GEOMALGOAPI_EXPORT GeomAlgoAPI_MakeShape(void* theBuilder, - const std::shared_ptr theWire, - const std::shared_ptr theBaseShape); - /// Returns a shape built by the shape construction algorithm GEOMALGOAPI_EXPORT virtual const std::shared_ptr shape() const;