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
19 // File: NMTTools_CheckerSI.cxx
20 // Created: Mon Feb 19 11:32:08 2007
21 // Author: Peter KURNEV
23 #include <NMTTools_CheckerSI.ixx>
25 #include <NMTTools_DEProcessor.hxx>
27 #include <NMTDS_ShapesDataStructure.hxx>
28 #include <NMTDS_IteratorCheckerSI.hxx>
29 #include <NMTDS_InterfPool.hxx>
31 #include <Basics_OCCTVersion.hxx>
33 #include <IntTools_Context.hxx>
35 //=======================================================================
38 //=======================================================================
39 NMTTools_CheckerSI::NMTTools_CheckerSI()
40 : NMTTools_PaveFiller()
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;
97 #if OCC_VERSION_LARGE > 0x06050200
98 // In OCCT6.5.3 class IntTools_Context become a handle
99 myContext=new IntTools_Context;
102 //=======================================================================
105 //=======================================================================
106 void NMTTools_CheckerSI::Perform()
108 myIsDone=Standard_False;
117 myPavePool.Resize (myNbEdges);
127 myCommonBlockPool.Resize (myNbEdges);
128 mySplitShapesPool.Resize (myNbEdges);
129 myPavePoolNew .Resize (myNbEdges);
131 PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE);
135 PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE);
147 myPavePoolNew.Destroy();
148 myPavePoolNew.Resize (myNbEdges);
151 PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE);
163 myPavePoolNew.Destroy();
167 UpdateCommonBlocks();
179 NMTTools_DEProcessor aDEP(*this);
184 myIsDone=Standard_True;