1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File: NMTTools_CheckerSI.cxx
23 // Created: Mon Feb 19 11:32:08 2007
24 // Author: Peter KURNEV
27 #include <NMTTools_CheckerSI.ixx>
29 #include <NMTDS_ShapesDataStructure.hxx>
30 #include <NMTDS_IteratorCheckerSI.hxx>
31 #include <NMTDS_InterfPool.hxx>
32 #include <NMTTools_DEProcessor.hxx>
34 //=======================================================================
37 //=======================================================================
38 NMTTools_CheckerSI::NMTTools_CheckerSI()
44 //=======================================================================
47 //=======================================================================
48 NMTTools_CheckerSI::~NMTTools_CheckerSI()
51 //=======================================================================
54 //=======================================================================
55 void NMTTools_CheckerSI::Clear()
57 NMTTools_PaveFiller::Clear();
59 //=======================================================================
60 //function : StopStatus
62 //=======================================================================
63 Standard_Integer NMTTools_CheckerSI::StopStatus()const
67 //=======================================================================
70 //=======================================================================
71 void NMTTools_CheckerSI::Init()
73 myIsDone=Standard_False;
74 if (myCompositeShape.IsNull()) {
80 myDS=new NMTDS_ShapesDataStructure;
81 myDS->SetCompositeShape(myCompositeShape);
85 myDSIt=new NMTDS_IteratorCheckerSI;
90 myNbSources=myDS->NumberOfShapesOfTheObject()+
91 myDS->NumberOfShapesOfTheTool();
92 myNbEdges=myDS->NbEdges();
94 myIP=new NMTDS_InterfPool;
96 //=======================================================================
99 //=======================================================================
100 void NMTTools_CheckerSI::Perform()
102 myIsDone=Standard_False;
111 myPavePool.Resize (myNbEdges);
121 myCommonBlockPool.Resize (myNbEdges);
122 mySplitShapesPool.Resize (myNbEdges);
123 myPavePoolNew .Resize (myNbEdges);
125 PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE);
129 PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE);
141 myPavePoolNew.Destroy();
142 myPavePoolNew.Resize (myNbEdges);
145 PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE);
157 myPavePoolNew.Destroy();
161 UpdateCommonBlocks();
173 NMTTools_DEProcessor aDEP(*this);
178 myIsDone=Standard_True;