42cf5bc1 |
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 |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
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. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _LocOpe_WiresOnShape_HeaderFile |
18 | #define _LocOpe_WiresOnShape_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
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> |
25e59720 |
29 | #include <Standard_Transient.hxx> |
42cf5bc1 |
30 | #include <Standard_Real.hxx> |
b94d4858 |
31 | #include <TopTools_SequenceOfShape.hxx> |
32 | |
42cf5bc1 |
33 | class TopoDS_Shape; |
34 | class TopoDS_Wire; |
35 | class TopoDS_Face; |
36 | class TopoDS_Compound; |
37 | class TopoDS_Edge; |
38 | class TopoDS_Vertex; |
39 | |
40 | |
41 | class LocOpe_WiresOnShape; |
25e59720 |
42 | DEFINE_STANDARD_HANDLE(LocOpe_WiresOnShape, Standard_Transient) |
42cf5bc1 |
43 | |
44 | |
25e59720 |
45 | class LocOpe_WiresOnShape : public Standard_Transient |
42cf5bc1 |
46 | { |
47 | |
48 | public: |
49 | |
50 | |
51 | Standard_EXPORT LocOpe_WiresOnShape(const TopoDS_Shape& S); |
52 | |
53 | Standard_EXPORT void Init (const TopoDS_Shape& S); |
b94d4858 |
54 | |
55 | //! Add splitting edges or wires for whole initial shape |
56 | //! withot additional specification edge->face, edge->edge |
57 | //! This method puts edge on the corresponding faces from initial shape |
58 | Standard_EXPORT Standard_Boolean Add(const TopTools_SequenceOfShape& theEdges); |
42cf5bc1 |
59 | |
60 | //! Set the flag of check internal intersections |
61 | //! default value is True (to check) |
62 | void SetCheckInterior (const Standard_Boolean ToCheckInterior); |
63 | |
64 | Standard_EXPORT void Bind (const TopoDS_Wire& W, const TopoDS_Face& F); |
65 | |
66 | Standard_EXPORT void Bind (const TopoDS_Compound& Comp, const TopoDS_Face& F); |
67 | |
68 | Standard_EXPORT void Bind (const TopoDS_Edge& E, const TopoDS_Face& F); |
69 | |
70 | Standard_EXPORT void Bind (const TopoDS_Edge& EfromW, const TopoDS_Edge& EonFace); |
71 | |
72 | Standard_EXPORT void BindAll(); |
73 | |
74 | Standard_Boolean IsDone() const; |
75 | |
76 | Standard_EXPORT void InitEdgeIterator(); |
77 | |
78 | Standard_EXPORT Standard_Boolean MoreEdge(); |
79 | |
80 | Standard_EXPORT TopoDS_Edge Edge(); |
81 | |
82 | //! Returns the face of the shape on which the current |
83 | //! edge is projected. |
84 | Standard_EXPORT TopoDS_Face OnFace(); |
85 | |
86 | //! If the current edge is projected on an edge, |
87 | //! returns <Standard_True> and sets the value of <E>. |
88 | //! Otherwise, returns <Standard_False>. |
89 | Standard_EXPORT Standard_Boolean OnEdge (TopoDS_Edge& E); |
90 | |
91 | Standard_EXPORT void NextEdge(); |
92 | |
93 | Standard_EXPORT Standard_Boolean OnVertex (const TopoDS_Vertex& Vwire, TopoDS_Vertex& Vshape); |
94 | |
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 |
98 | //! edge in <P>. |
99 | //! Else returns <Standard_False>. |
100 | Standard_EXPORT Standard_Boolean OnEdge (const TopoDS_Vertex& V, TopoDS_Edge& E, Standard_Real& P); |
101 | |
102 | //! If the vertex <V> lies on an edge of the original |
103 | //! shape, returns <Standard_True> and sets the |
104 | //! concerned edge in <E>, and the parameter on the |
105 | //! edge in <P>. |
106 | //! Else returns <Standard_False>. |
107 | Standard_EXPORT Standard_Boolean OnEdge (const TopoDS_Vertex& V, const TopoDS_Edge& EdgeFrom, TopoDS_Edge& E, Standard_Real& P); |
108 | |
109 | //! tells is the face to be split by section or not |
110 | Standard_Boolean IsFaceWithSection (const TopoDS_Shape& aFace) const; |
111 | |
112 | |
113 | |
114 | |
25e59720 |
115 | DEFINE_STANDARD_RTTIEXT(LocOpe_WiresOnShape,Standard_Transient) |
42cf5bc1 |
116 | |
117 | protected: |
118 | |
119 | |
120 | |
121 | |
122 | private: |
123 | |
124 | |
125 | TopoDS_Shape myShape; |
126 | TopTools_IndexedDataMapOfShapeShape myMapEF; |
127 | TopTools_MapOfShape myFacesWithSection; |
128 | Standard_Boolean myCheckInterior; |
129 | TopTools_DataMapOfShapeShape myMap; |
130 | Standard_Boolean myDone; |
131 | Standard_Integer myIndex; |
132 | |
133 | |
134 | }; |
135 | |
136 | |
137 | #include <LocOpe_WiresOnShape.lxx> |
138 | |
139 | |
140 | |
141 | |
142 | |
143 | #endif // _LocOpe_WiresOnShape_HeaderFile |