// File: NMTTools_PCurveMaker.cxx // Created: // Author: Peter KURNEV // #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //======================================================================= // function: NMTTools_PCurveMaker // purpose: //======================================================================= NMTTools_PCurveMaker::NMTTools_PCurveMaker(NMTTools_PDSFiller& pDSFiller) : myIsDone(Standard_False) { myDSFiller=pDSFiller; } //======================================================================= // function: IsDone // purpose: //======================================================================= Standard_Boolean NMTTools_PCurveMaker::IsDone() const { return myIsDone; } //======================================================================= // function: Do // purpose: //======================================================================= void NMTTools_PCurveMaker::Do() { Standard_Integer i, aNb, nF1, nF2, nE; BOPTools_ListIteratorOfListOfPaveBlock anIt; TopoDS_Face aF1FWD, aF2FWD; // NMTTools_PaveFiller *pFiller=(NMTTools_PaveFiller*) &(myDSFiller->PaveFiller()); NMTDS_ShapesDataStructure *pDS=pFiller->DS(); // BOPTools_CArray1OfSSInterference& aFFs=(pFiller->InterfPool())->SSInterferences(); // aNb=aFFs.Extent(); for (i=1; i<=aNb; ++i) { BOPTools_SSInterference& aFF=aFFs(i); // Faces aFF.Indices(nF1, nF2); const TopoDS_Face& aF1=TopoDS::Face(pDS->Shape(nF1)); const TopoDS_Face& aF2=TopoDS::Face(pDS->Shape(nF2)); // // 1.Forwarding the Faces aF1FWD=aF1; aF1FWD.Orientation(TopAbs_FORWARD); aF2FWD=aF2; aF2FWD.Orientation(TopAbs_FORWARD); // // 2. In, On parts processing const BOPTools_ListOfPaveBlock& aLPBInOn=aFF.PaveBlocks(); anIt.Initialize(aLPBInOn); for (; anIt.More(); anIt.Next()) { const BOPTools_PaveBlock& aPB=anIt.Value(); const BOPTools_PaveBlock& aPBInOn=pFiller->RealPaveBlock(aPB); // nE=aPBInOn.Edge(); const TopoDS_Edge& aE=TopoDS::Edge(pDS->Shape(nE)); BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF1FWD); BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF2FWD); } } // for (i=1; i<=aNb; i++) myIsDone=Standard_True; }