1 // Copyright (C) 2007-2010 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
23 #ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile
24 #define _GEOMAlgo_FinderShapeOn1_HeaderFile
26 #ifndef _Handle_Geom_Surface_HeaderFile
27 #include <Handle_Geom_Surface.hxx>
29 #ifndef _TopAbs_ShapeEnum_HeaderFile
30 #include <TopAbs_ShapeEnum.hxx>
32 #ifndef _GEOMAlgo_State_HeaderFile
33 #include <GEOMAlgo_State.hxx>
35 #ifndef _Standard_Integer_HeaderFile
36 #include <Standard_Integer.hxx>
38 #ifndef _GeomAdaptor_Surface_HeaderFile
39 #include <GeomAdaptor_Surface.hxx>
41 #ifndef _TopTools_ListOfShape_HeaderFile
42 #include <TopTools_ListOfShape.hxx>
44 #ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
45 #include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
47 #ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
48 #include <GEOMAlgo_ShapeAlgo.hxx>
50 #ifndef _TopAbs_State_HeaderFile
51 #include <TopAbs_State.hxx>
54 class TopTools_ListOfShape;
56 class GEOMAlgo_ListOfPnt;
58 class GEOMAlgo_IndexedDataMapOfShapeState;
62 #ifndef _Standard_HeaderFile
63 #include <Standard.hxx>
65 #ifndef _Standard_Macro_HeaderFile
66 #include <Standard_Macro.hxx>
70 class GEOMAlgo_FinderShapeOn1 : public GEOMAlgo_ShapeAlgo {
74 void* operator new(size_t,void* anAddress)
78 void* operator new(size_t size)
80 return Standard::Allocate(size);
82 void operator delete(void *anAddress)
84 if (anAddress) Standard::Free((Standard_Address&)anAddress);
90 Standard_EXPORT GEOMAlgo_FinderShapeOn1();
91 Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn1();
94 Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ;
97 Standard_EXPORT void SetShapeType(const TopAbs_ShapeEnum aST) ;
100 Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ;
103 Standard_EXPORT void SetNbPntsMin(const Standard_Integer aNb) ;
106 Standard_EXPORT Standard_Integer NbPntsMin() const;
109 Standard_EXPORT void SetNbPntsMax(const Standard_Integer aNb) ;
112 Standard_EXPORT Standard_Integer NbPntsMax() const;
115 Standard_EXPORT const Handle_Geom_Surface& Surface() const;
118 Standard_EXPORT TopAbs_ShapeEnum ShapeType() const;
121 Standard_EXPORT GEOMAlgo_State State() const;
124 Standard_EXPORT virtual void Perform() ;
127 Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
130 Standard_EXPORT const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
142 Standard_EXPORT virtual void CheckData() ;
145 Standard_EXPORT void ProcessVertices() ;
148 Standard_EXPORT void ProcessEdges() ;
151 Standard_EXPORT void ProcessFaces() ;
154 Standard_EXPORT void ProcessSolids() ;
157 Standard_EXPORT void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ;
160 Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ;
163 Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ;
166 Standard_EXPORT virtual TopAbs_State GetPointState(const gp_Pnt& aP) ;
171 Handle_Geom_Surface mySurface;
172 TopAbs_ShapeEnum myShapeType;
173 GEOMAlgo_State myState;
174 Standard_Integer myNbPntsMin;
175 Standard_Integer myNbPntsMax;
176 GeomAdaptor_Surface myGAS;
177 TopTools_ListOfShape myLS;
178 GEOMAlgo_IndexedDataMapOfShapeState myMSS;
197 // other Inline functions and methods (like "C++: function call" methods)