-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: GEOMAlgo_BuilderArea.cxx
-// Created:
-// Author: Peter KURNEV
+// Created:
+// Author: Peter KURNEV
//
-#include <GEOMAlgo_BuilderArea.ixx>
+#include <GEOMAlgo_BuilderArea.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopoDS_Shape.hxx>
+#include <IntTools_Context.hxx>
//=======================================================================
-//function :
-//purpose :
+//function :
+//purpose :
//=======================================================================
- GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea()
+GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea()
:
GEOMAlgo_Algo()
{
- myContext=NULL;
}
//=======================================================================
//function : ~
-//purpose :
+//purpose :
//=======================================================================
- GEOMAlgo_BuilderArea::~GEOMAlgo_BuilderArea()
+GEOMAlgo_BuilderArea::~GEOMAlgo_BuilderArea()
{
}
//=======================================================================
//function : SetContext
-//purpose :
+//purpose :
+//=======================================================================
+void GEOMAlgo_BuilderArea::SetContext(const Handle(IntTools_Context)& theContext)
+{
+ myContext=theContext;
+}
+//=======================================================================
+//function : Context
+//purpose :
//=======================================================================
- void GEOMAlgo_BuilderArea::SetContext(const IntTools_Context& theContext)
+const Handle(IntTools_Context)& GEOMAlgo_BuilderArea::Context()const
{
- myContext=(IntTools_Context*)&theContext;
+ return myContext;
+}
+//=======================================================================
+//function : Perform
+//purpose :
+//=======================================================================
+void GEOMAlgo_BuilderArea::Perform()
+{
+ if (myContext.IsNull()) {
+ myContext=new IntTools_Context;
+ }
}
//=======================================================================
//function : SetShapes
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_BuilderArea::SetShapes(const TopTools_ListOfShape& theLF)
+void GEOMAlgo_BuilderArea::SetShapes(const TopTools_ListOfShape& theLF)
{
TopTools_ListIteratorOfListOfShape aIt;
//
}
//=======================================================================
//function : Shapes
-//purpose :
+//purpose :
//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Shapes()const
+const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Shapes()const
{
return myShapes;
}
//=======================================================================
//function : Loops
-//purpose :
+//purpose :
//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Loops()const
+const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Loops()const
{
return myLoops;
}
//=======================================================================
-//function : Solids
-//purpose :
+//function : Areas
+//purpose :
//=======================================================================
- const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Areas()const
+const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Areas()const
{
return myAreas;
}
//=======================================================================
//function :PerformShapesToAvoid
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_BuilderArea::PerformShapesToAvoid()
+void GEOMAlgo_BuilderArea::PerformShapesToAvoid()
{
}
//=======================================================================
//function : PerformLoops
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_BuilderArea::PerformLoops()
+void GEOMAlgo_BuilderArea::PerformLoops()
{
}
//=======================================================================
//function : PerformAreas
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_BuilderArea::PerformAreas()
+void GEOMAlgo_BuilderArea::PerformAreas()
{
}
//=======================================================================
//function : PerformInternalShapes
-//purpose :
+//purpose :
//=======================================================================
- void GEOMAlgo_BuilderArea::PerformInternalShapes()
+void GEOMAlgo_BuilderArea::PerformInternalShapes()
{
}