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
26 #include <NMTTools_CheckerSI.ixx>
28 #include <NMTDS_ShapesDataStructure.hxx>
29 #include <NMTDS_IteratorCheckerSI.hxx>
30 #include <NMTDS_InterfPool.hxx>
31 #include <NMTTools_DEProcessor.hxx>
33 //=======================================================================
36 //=======================================================================
37 NMTTools_CheckerSI::NMTTools_CheckerSI()
43 //=======================================================================
46 //=======================================================================
47 NMTTools_CheckerSI::~NMTTools_CheckerSI()
50 //=======================================================================
53 //=======================================================================
54 void NMTTools_CheckerSI::Clear()
56 NMTTools_PaveFiller::Clear();
58 //=======================================================================
59 //function : StopStatus
61 //=======================================================================
62 Standard_Integer NMTTools_CheckerSI::StopStatus()const
66 //=======================================================================
69 //=======================================================================
70 void NMTTools_CheckerSI::Init()
72 myIsDone=Standard_False;
73 if (myCompositeShape.IsNull()) {
79 myDS=new NMTDS_ShapesDataStructure;
80 myDS->SetCompositeShape(myCompositeShape);
84 myDSIt=new NMTDS_IteratorCheckerSI;
89 myNbSources=myDS->NumberOfShapesOfTheObject()+
90 myDS->NumberOfShapesOfTheTool();
91 myNbEdges=myDS->NbEdges();
93 myIP=new NMTDS_InterfPool;
95 //=======================================================================
98 //=======================================================================
99 void NMTTools_CheckerSI::Perform()
101 myIsDone=Standard_False;
110 myPavePool.Resize (myNbEdges);
120 myCommonBlockPool.Resize (myNbEdges);
121 mySplitShapesPool.Resize (myNbEdges);
122 myPavePoolNew .Resize (myNbEdges);
124 PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE);
128 PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE);
140 myPavePoolNew.Destroy();
141 myPavePoolNew.Resize (myNbEdges);
144 PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE);
156 myPavePoolNew.Destroy();
160 UpdateCommonBlocks();
172 NMTTools_DEProcessor aDEP(*this);
177 myIsDone=Standard_True;