1 // File: NMTTools_PaveFiller.cxx
2 // Created: Fri Dec 5 14:58:54 2003
3 // Author: Peter KURNEV
6 #include <NMTTools_PaveFiller.ixx>
8 #include <BOPTColStd_Failure.hxx>
9 #include <NMTDS_ShapesDataStructure.hxx>
10 #include <NMTTools_DEProcessor.hxx>
11 //QQ #include "utilities.h"
13 //=======================================================================
14 // function: NMTTools_PaveFiller::NMTTools_PaveFiller
16 //=======================================================================
17 NMTTools_PaveFiller::NMTTools_PaveFiller()
21 myIsDone=Standard_False;
25 //=======================================================================
26 // function:NMTTools_PaveFiller::NMTTools_PaveFiller
28 //=======================================================================
29 NMTTools_PaveFiller::NMTTools_PaveFiller(const BOPTools_InterferencePool& aIP)
31 SetInterferencePool(aIP);
33 //=======================================================================
36 //=======================================================================
37 void NMTTools_PaveFiller::Destroy()
40 //=======================================================================
41 // function: SetInterferencePool
43 //=======================================================================
44 void NMTTools_PaveFiller::SetInterferencePool(const BOPTools_InterferencePool& aIP)
46 myIsDone=Standard_False;
48 myIntrPool=(BOPTools_InterferencePool*)&aIP;
49 myDS=(NMTDS_ShapesDataStructure*)myIntrPool->DS();
50 myNbSources=myDS->NumberOfShapesOfTheObject()+myDS->NumberOfShapesOfTheTool();
51 myNbEdges=myDS->NbEdges();
53 //=======================================================================
54 // function: InterfPool
56 //=======================================================================
57 BOPTools_PInterferencePool NMTTools_PaveFiller::InterfPool()
61 //=======================================================================
64 //=======================================================================
65 Standard_Boolean NMTTools_PaveFiller::IsDone() const
69 //=======================================================================
72 //=======================================================================
73 NMTDS_PShapesDataStructure NMTTools_PaveFiller::DS()
77 //=======================================================================
80 //=======================================================================
81 const IntTools_Context& NMTTools_PaveFiller::Context() const
85 //=======================================================================
86 // function: ChangeContext
88 //=======================================================================
89 IntTools_Context& NMTTools_PaveFiller::ChangeContext()
93 //=======================================================================
96 //=======================================================================
97 const BOPTools_PavePool& NMTTools_PaveFiller::PavePool() const
101 //=======================================================================
102 // function: ChangePavePool
104 //=======================================================================
105 BOPTools_PavePool& NMTTools_PaveFiller::ChangePavePool()
109 //=======================================================================
110 // function: CommonBlockPool
112 //=======================================================================
113 const NMTTools_CommonBlockPool& NMTTools_PaveFiller::CommonBlockPool() const
115 return myCommonBlockPool;
117 //=======================================================================
118 // function: ChangeCommonBlockPool
120 //=======================================================================
121 NMTTools_CommonBlockPool& NMTTools_PaveFiller::ChangeCommonBlockPool()
123 return myCommonBlockPool;
125 //=======================================================================
126 // function: SplitShapesPool
128 //=======================================================================
129 const BOPTools_SplitShapesPool& NMTTools_PaveFiller::SplitShapesPool() const
131 return mySplitShapesPool;
134 //=======================================================================
135 // function: ChangeSplitShapesPool
137 //=======================================================================
138 BOPTools_SplitShapesPool& NMTTools_PaveFiller::ChangeSplitShapesPool()
140 return mySplitShapesPool;
142 //=======================================================================
145 //=======================================================================
146 void NMTTools_PaveFiller::Init()
150 //=======================================================================
153 //=======================================================================
154 void NMTTools_PaveFiller::Perform()
158 Init();//myDSIt.SetDS(myDS);
162 PerformNewVertices();
165 myPavePool.Resize (myNbEdges);
174 myCommonBlockPool.Resize (myNbEdges);
175 mySplitShapesPool.Resize (myNbEdges);
176 myPavePoolNew .Resize (myNbEdges);
178 PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE);
179 PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE);
185 myPavePoolNew.Destroy();
186 myPavePoolNew.Resize (myNbEdges);
189 PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE);
193 myPavePoolNew.Destroy();
195 UpdateCommonBlocks();
205 NMTTools_DEProcessor aDEP(*this);
209 catch (BOPTColStd_Failure& x) {
210 //QQ MESSAGE(x.Message() << flush);