1 // Copyright (C) 2006 SAMTECH
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // File: NMTTools_CheckerSI.cxx
20 // Created: Mon Feb 19 11:32:08 2007
21 // Author: Peter KURNEV
25 #include <NMTTools_CheckerSI.ixx>
27 #include <NMTDS_ShapesDataStructure.hxx>
28 #include <NMTDS_IteratorCheckerSI.hxx>
29 #include <NMTDS_InterfPool.hxx>
30 #include <NMTTools_DEProcessor.hxx>
32 //=======================================================================
35 //=======================================================================
36 NMTTools_CheckerSI::NMTTools_CheckerSI()
42 //=======================================================================
45 //=======================================================================
46 NMTTools_CheckerSI::~NMTTools_CheckerSI()
49 //=======================================================================
52 //=======================================================================
53 void NMTTools_CheckerSI::Clear()
55 NMTTools_PaveFiller::Clear();
57 //=======================================================================
58 //function : StopStatus
60 //=======================================================================
61 Standard_Integer NMTTools_CheckerSI::StopStatus()const
65 //=======================================================================
68 //=======================================================================
69 void NMTTools_CheckerSI::Init()
71 myIsDone=Standard_False;
72 if (myCompositeShape.IsNull()) {
78 myDS=new NMTDS_ShapesDataStructure;
79 myDS->SetCompositeShape(myCompositeShape);
83 myDSIt=new NMTDS_IteratorCheckerSI;
88 myNbSources=myDS->NumberOfShapesOfTheObject()+
89 myDS->NumberOfShapesOfTheTool();
90 myNbEdges=myDS->NbEdges();
92 myIP=new NMTDS_InterfPool;
94 //=======================================================================
97 //=======================================================================
98 void NMTTools_CheckerSI::Perform()
100 myIsDone=Standard_False;
109 myPavePool.Resize (myNbEdges);
119 myCommonBlockPool.Resize (myNbEdges);
120 mySplitShapesPool.Resize (myNbEdges);
121 myPavePoolNew .Resize (myNbEdges);
123 PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE);
127 PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE);
139 myPavePoolNew.Destroy();
140 myPavePoolNew.Resize (myNbEdges);
143 PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE);
155 myPavePoolNew.Destroy();
159 UpdateCommonBlocks();
171 NMTTools_DEProcessor aDEP(*this);
176 myIsDone=Standard_True;