1 // Created on: 1996-01-11
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _LocOpe_WiresOnShape_HeaderFile
18 #define _LocOpe_WiresOnShape_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <TopoDS_Shape.hxx>
24 #include <TopTools_IndexedDataMapOfShapeShape.hxx>
25 #include <TopTools_MapOfShape.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <TopTools_DataMapOfShapeShape.hxx>
28 #include <Standard_Integer.hxx>
29 #include <MMgt_TShared.hxx>
30 #include <Standard_Real.hxx>
34 class TopoDS_Compound;
39 class LocOpe_WiresOnShape;
40 DEFINE_STANDARD_HANDLE(LocOpe_WiresOnShape, MMgt_TShared)
43 class LocOpe_WiresOnShape : public MMgt_TShared
49 Standard_EXPORT LocOpe_WiresOnShape(const TopoDS_Shape& S);
51 Standard_EXPORT void Init (const TopoDS_Shape& S);
53 //! Set the flag of check internal intersections
54 //! default value is True (to check)
55 void SetCheckInterior (const Standard_Boolean ToCheckInterior);
57 Standard_EXPORT void Bind (const TopoDS_Wire& W, const TopoDS_Face& F);
59 Standard_EXPORT void Bind (const TopoDS_Compound& Comp, const TopoDS_Face& F);
61 Standard_EXPORT void Bind (const TopoDS_Edge& E, const TopoDS_Face& F);
63 Standard_EXPORT void Bind (const TopoDS_Edge& EfromW, const TopoDS_Edge& EonFace);
65 Standard_EXPORT void BindAll();
67 Standard_Boolean IsDone() const;
69 Standard_EXPORT void InitEdgeIterator();
71 Standard_EXPORT Standard_Boolean MoreEdge();
73 Standard_EXPORT TopoDS_Edge Edge();
75 //! Returns the face of the shape on which the current
76 //! edge is projected.
77 Standard_EXPORT TopoDS_Face OnFace();
79 //! If the current edge is projected on an edge,
80 //! returns <Standard_True> and sets the value of <E>.
81 //! Otherwise, returns <Standard_False>.
82 Standard_EXPORT Standard_Boolean OnEdge (TopoDS_Edge& E);
84 Standard_EXPORT void NextEdge();
86 Standard_EXPORT Standard_Boolean OnVertex (const TopoDS_Vertex& Vwire, TopoDS_Vertex& Vshape);
88 //! If the vertex <V> lies on an edge of the original
89 //! shape, returns <Standard_True> and sets the
90 //! concerned edge in <E>, and the parameter on the
92 //! Else returns <Standard_False>.
93 Standard_EXPORT Standard_Boolean OnEdge (const TopoDS_Vertex& V, TopoDS_Edge& E, Standard_Real& P);
95 //! If the vertex <V> lies on an edge of the original
96 //! shape, returns <Standard_True> and sets the
97 //! concerned edge in <E>, and the parameter on the
99 //! Else returns <Standard_False>.
100 Standard_EXPORT Standard_Boolean OnEdge (const TopoDS_Vertex& V, const TopoDS_Edge& EdgeFrom, TopoDS_Edge& E, Standard_Real& P);
102 //! tells is the face to be split by section or not
103 Standard_Boolean IsFaceWithSection (const TopoDS_Shape& aFace) const;
108 DEFINE_STANDARD_RTTIEXT(LocOpe_WiresOnShape,MMgt_TShared)
118 TopoDS_Shape myShape;
119 TopTools_IndexedDataMapOfShapeShape myMapEF;
120 TopTools_MapOfShape myFacesWithSection;
121 Standard_Boolean myCheckInterior;
122 TopTools_DataMapOfShapeShape myMap;
123 Standard_Boolean myDone;
124 Standard_Integer myIndex;
130 #include <LocOpe_WiresOnShape.lxx>
136 #endif // _LocOpe_WiresOnShape_HeaderFile