// Created by: Peter KURNEV // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and / or modify it // under the terms of the GNU Lesser General Public version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #include #include //======================================================================= //function : BOPAlgo_EdgeInfo //purpose : //======================================================================= class BOPAlgo_EdgeInfo { public: // BOPAlgo_EdgeInfo() : myPassed(Standard_False), myInFlag(Standard_False), myAngle (-1.) { }; // void SetEdge(const TopoDS_Edge& theE) { myEdge=theE; }; // const TopoDS_Edge& Edge() const{ return myEdge; }; // void SetPassed(const Standard_Boolean theFlag) { myPassed=theFlag; }; // Standard_Boolean Passed()const { return myPassed; }; // void SetInFlag(const Standard_Boolean theFlag) { myInFlag=theFlag; }; // Standard_Boolean IsIn()const { return myInFlag; }; // void SetAngle(const Standard_Real theAngle) { myAngle=theAngle; }; // Standard_Real Angle()const { return myAngle; }; // protected: TopoDS_Edge myEdge; Standard_Boolean myPassed; Standard_Boolean myInFlag; Standard_Real myAngle; }; #include typedef NCollection_List BOPAlgo_ListOfEdgeInfo; typedef BOPAlgo_ListOfEdgeInfo::Iterator BOPAlgo_ListIteratorOfListOfEdgeInfo; #define _NCollection_MapHasher #include #include typedef NCollection_IndexedDataMap BOPAlgo_IndexedDataMapOfShapeListOfEdgeInfo; #undef _NCollection_MapHasher //======================================================================= //function : MakeWire //purpose : //======================================================================= inline void BOPAlgo_WireSplitter::MakeWire(BOPCol_ListOfShape& aLE, TopoDS_Wire& aWire) { BRep_Builder aBB; aBB.MakeWire(aWire); // BOPCol_ListIteratorOfListOfShape aIt(aLE); for (; aIt.More(); aIt.Next()){ aBB.Add(aWire, aIt.Value()); } }