1 // Copyright (C) 2007-2011 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.ixx>
26 #include <NMTDS_ShapesDataStructure.hxx>
27 #include <NMTDS_IteratorCheckerSI.hxx>
28 #include <NMTDS_InterfPool.hxx>
29 #include <NMTTools_DEProcessor.hxx>
31 //=======================================================================
34 //=======================================================================
35 NMTTools_CheckerSI::NMTTools_CheckerSI()
41 //=======================================================================
44 //=======================================================================
45 NMTTools_CheckerSI::~NMTTools_CheckerSI()
48 //=======================================================================
51 //=======================================================================
52 void NMTTools_CheckerSI::Clear()
54 NMTTools_PaveFiller::Clear();
56 //=======================================================================
57 //function : StopStatus
59 //=======================================================================
60 Standard_Integer NMTTools_CheckerSI::StopStatus()const
64 //=======================================================================
67 //=======================================================================
68 void NMTTools_CheckerSI::Init()
70 myIsDone=Standard_False;
71 if (myCompositeShape.IsNull()) {
77 myDS=new NMTDS_ShapesDataStructure;
78 myDS->SetCompositeShape(myCompositeShape);
82 myDSIt=new NMTDS_IteratorCheckerSI;
87 myNbSources=myDS->NumberOfShapesOfTheObject()+
88 myDS->NumberOfShapesOfTheTool();
89 myNbEdges=myDS->NbEdges();
91 myIP=new NMTDS_InterfPool;
93 //=======================================================================
96 //=======================================================================
97 void NMTTools_CheckerSI::Perform()
99 myIsDone=Standard_False;
108 myPavePool.Resize (myNbEdges);
118 myCommonBlockPool.Resize (myNbEdges);
119 mySplitShapesPool.Resize (myNbEdges);
120 myPavePoolNew .Resize (myNbEdges);
122 PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE);
126 PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE);
138 myPavePoolNew.Destroy();
139 myPavePoolNew.Resize (myNbEdges);
142 PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE);
154 myPavePoolNew.Destroy();
158 UpdateCommonBlocks();
170 NMTTools_DEProcessor aDEP(*this);
175 myIsDone=Standard_True;