1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile
21 #define _GEOMAlgo_FinderShapeOn1_HeaderFile
23 #ifndef _Handle_Geom_Surface_HeaderFile
24 #include <Handle_Geom_Surface.hxx>
26 #ifndef _TopAbs_ShapeEnum_HeaderFile
27 #include <TopAbs_ShapeEnum.hxx>
29 #ifndef _GEOMAlgo_State_HeaderFile
30 #include <GEOMAlgo_State.hxx>
32 #ifndef _Standard_Integer_HeaderFile
33 #include <Standard_Integer.hxx>
35 #ifndef _GeomAdaptor_Surface_HeaderFile
36 #include <GeomAdaptor_Surface.hxx>
38 #ifndef _TopTools_ListOfShape_HeaderFile
39 #include <TopTools_ListOfShape.hxx>
41 #ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile
42 #include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
44 #ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
45 #include <GEOMAlgo_ShapeAlgo.hxx>
48 class TopTools_ListOfShape;
50 class GEOMAlgo_ListOfPnt;
52 class GEOMAlgo_IndexedDataMapOfShapeState;
55 #ifndef _Standard_HeaderFile
56 #include <Standard.hxx>
58 #ifndef _Standard_Macro_HeaderFile
59 #include <Standard_Macro.hxx>
62 class GEOMAlgo_FinderShapeOn1 : public GEOMAlgo_ShapeAlgo {
66 void* operator new(size_t,void* anAddress)
70 void* operator new(size_t size)
72 return Standard::Allocate(size);
74 void operator delete(void *anAddress)
76 if (anAddress) Standard::Free((Standard_Address&)anAddress);
80 Standard_EXPORT GEOMAlgo_FinderShapeOn1();
81 Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn1();
82 Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ;
83 Standard_EXPORT void SetShapeType(const TopAbs_ShapeEnum aST) ;
84 Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ;
85 Standard_EXPORT void SetNbPntsMin(const Standard_Integer aNb) ;
86 Standard_EXPORT Standard_Integer NbPntsMin() const;
87 Standard_EXPORT void SetNbPntsMax(const Standard_Integer aNb) ;
88 Standard_EXPORT Standard_Integer NbPntsMax() const;
89 Standard_EXPORT const Handle_Geom_Surface& Surface() const;
90 Standard_EXPORT TopAbs_ShapeEnum ShapeType() const;
91 Standard_EXPORT GEOMAlgo_State State() const;
92 Standard_EXPORT virtual void Perform() ;
93 Standard_EXPORT const TopTools_ListOfShape& Shapes() const;
94 Standard_EXPORT const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const;
104 Standard_EXPORT virtual void CheckData() ;
105 Standard_EXPORT void ProcessVertices() ;
106 Standard_EXPORT void ProcessEdges() ;
107 Standard_EXPORT void ProcessFaces() ;
108 Standard_EXPORT void ProcessSolids() ;
109 Standard_EXPORT void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ;
110 Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ;
111 Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ;
112 Standard_EXPORT virtual TopAbs_State GetPointState(const gp_Pnt& aP) ;
117 Handle_Geom_Surface mySurface;
118 TopAbs_ShapeEnum myShapeType;
119 GEOMAlgo_State myState;
120 Standard_Integer myNbPntsMin;
121 Standard_Integer myNbPntsMax;
122 GeomAdaptor_Surface myGAS;
123 TopTools_ListOfShape myLS;
124 GEOMAlgo_IndexedDataMapOfShapeState myMSS;
143 // other Inline functions and methods (like "C++: function call" methods)