1 // Copyright (C) 2007-2011 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: GEOMAlgo_BuilderArea.cxx
23 // Author: Peter KURNEV
25 #include <GEOMAlgo_BuilderArea.ixx>
27 #include <Basics_OCCTVersion.hxx>
29 #include <TopTools_ListIteratorOfListOfShape.hxx>
31 #include <TopoDS_Shape.hxx>
33 #include <IntTools_Context.hxx>
35 //=======================================================================
38 //=======================================================================
39 GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea()
42 #if OCC_VERSION_LARGE <= 0x06050200
46 //=======================================================================
49 //=======================================================================
50 GEOMAlgo_BuilderArea::~GEOMAlgo_BuilderArea()
53 //=======================================================================
54 //function : SetContext
56 //=======================================================================
57 #if OCC_VERSION_LARGE > 0x06050200
58 void GEOMAlgo_BuilderArea::SetContext(const Handle(IntTools_Context)& theContext)
60 void GEOMAlgo_BuilderArea::SetContext(const IntTools_Context& theContext)
63 #if OCC_VERSION_LARGE > 0x06050200
66 myContext=(IntTools_Context*)&theContext;
70 #if OCC_VERSION_LARGE > 0x06050200
71 //=======================================================================
74 //=======================================================================
75 const Handle(IntTools_Context)& GEOMAlgo_BuilderArea::Context()const
79 //=======================================================================
82 //=======================================================================
83 void GEOMAlgo_BuilderArea::Perform()
85 if (myContext.IsNull()) {
86 myContext=new IntTools_Context;
91 //=======================================================================
92 //function : SetShapes
94 //=======================================================================
95 void GEOMAlgo_BuilderArea::SetShapes(const TopTools_ListOfShape& theLF)
97 TopTools_ListIteratorOfListOfShape aIt;
100 aIt.Initialize(theLF);
101 for(; aIt.More(); aIt.Next()) {
102 const TopoDS_Shape& aF=aIt.Value();
106 //=======================================================================
109 //=======================================================================
110 const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Shapes()const
114 //=======================================================================
117 //=======================================================================
118 const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Loops()const
122 //=======================================================================
125 //=======================================================================
126 const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Areas()const
130 //=======================================================================
131 //function :PerformShapesToAvoid
133 //=======================================================================
134 void GEOMAlgo_BuilderArea::PerformShapesToAvoid()
137 //=======================================================================
138 //function : PerformLoops
140 //=======================================================================
141 void GEOMAlgo_BuilderArea::PerformLoops()
144 //=======================================================================
145 //function : PerformAreas
147 //=======================================================================
148 void GEOMAlgo_BuilderArea::PerformAreas()
151 //=======================================================================
152 //function : PerformInternalShapes
154 //=======================================================================
155 void GEOMAlgo_BuilderArea::PerformInternalShapes()