1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
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
20 // File: NMTTools_CheckerSI.cxx
21 // Created: Mon Feb 19 11:32:08 2007
22 // Author: Peter KURNEV
24 #include <NMTTools_CheckerSI.hxx>
26 #include <NMTDS_ShapesDataStructure.hxx>
27 #include <NMTDS_IteratorCheckerSI.hxx>
28 #include <NMTDS_InterfPool.hxx>
29 #include <NMTTools_DEProcessor.hxx>
30 #include <IntTools_Context.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;
95 myContext=new IntTools_Context;
97 //=======================================================================
100 //=======================================================================
101 void NMTTools_CheckerSI::Perform()
103 myIsDone=Standard_False;
112 myPavePool.Resize (myNbEdges);
122 myCommonBlockPool.Resize (myNbEdges);
123 mySplitShapesPool.Resize (myNbEdges);
124 myPavePoolNew .Resize (myNbEdges);
126 PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE);
130 PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE);
142 myPavePoolNew.Destroy();
143 myPavePoolNew.Resize (myNbEdges);
146 PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE);
158 myPavePoolNew.Destroy();
162 UpdateCommonBlocks();
174 NMTTools_DEProcessor aDEP(*this);
179 myIsDone=Standard_True;