1 -- File: SolidExplorer.cdl
2 -- Created: Thu Mar 10 14:02:10 1994
3 -- Author: Laurent BUCHARD
5 ---Copyright: Matra Datavision 1994
7 -- Modified by skv - Thu Sep 4 12:19:22 2003 OCC578
8 -- Add the method GetFaceSegmentIndex() which is used to obtain the index of
9 -- the face for which last segment is calculated.
11 class SolidExplorer from BRepClass3d
13 ---Purpose: Provide an exploration of a BRep Shape for the
17 Orientation from TopAbs,
28 Intersector from IntCurvesFace,
29 MapOfInter from BRepClass3d,
30 HSurface from BRepAdaptor
33 Create returns SolidExplorer from BRepClass3d;
35 Create (Oth: SolidExplorer from BRepClass3d)
36 ---Purpose: Raise if called.
37 returns SolidExplorer from BRepClass3d;
39 Create (S : Shape from TopoDS) returns SolidExplorer from BRepClass3d;
41 Delete(me:out) is virtual;
42 ---C++: alias "Standard_EXPORT virtual ~BRepClass3d_SolidExplorer(){Destroy() ; }"
44 InitShape(me : in out; S : Shape from TopoDS) is static ;
46 Reject(me; P : Pnt from gp) returns Boolean is virtual ;
47 ---Purpose: Should return True if P outside of bounding vol. of the shape
49 FindAPointInTheFace(myclass; F: Face from TopoDS;
51 Param: out Real from Standard)
52 ---Purpose : compute a point P in the face F. Param is a Real in
53 -- ]0,1[ and is used to initialise the algorithm. For
54 -- different values , different points are returned.
55 returns Boolean from Standard;
57 FindAPointInTheFace(myclass; F: Face from TopoDS;
59 u,v: out Real from Standard;
60 Param: out Real from Standard)
61 returns Boolean from Standard;
63 FindAPointInTheFace(myclass; F: Face from TopoDS;
65 u,v: out Real from Standard)
66 returns Boolean from Standard;
68 FindAPointInTheFace(myclass; F: Face from TopoDS;
70 returns Boolean from Standard;
72 FindAPointInTheFace(myclass; F: Face from TopoDS;
73 u,v: out Real from Standard)
74 returns Boolean from Standard;
76 -----------------------------------------------------------------------
78 PointInTheFace(me; F: Face from TopoDS;
80 u,v: out Real from Standard;
81 Param: out Real from Standard;
82 Index: out Integer from Standard)
83 returns Boolean from Standard is static ;
86 PointInTheFace(me; F: Face from TopoDS;
88 u,v: out Real from Standard;
89 Param: out Real from Standard;
90 Index: out Integer from Standard;
91 surf: HSurface from BRepAdaptor;
92 u1,v1,u2,v2: Real from Standard)
93 returns Boolean from Standard is static ;
94 ---Purpose: <Index> gives point index to search from and returns
95 -- point index of succeseful search
99 InitShell(me: in out) is static ;
100 ---Purpose: Starts an exploration of the shells.
101 MoreShell(me) returns Boolean from Standard is static ;
102 ---Purpose: Returns True if there is a current shell.
103 NextShell(me: in out) is static ;
104 ---Purpose: Sets the explorer to the next shell.
105 CurrentShell(me) returns Shell from TopoDS is static ;
106 ---Purpose: Returns the current shell.
108 RejectShell(me; L: Lin from gp) returns Boolean from Standard is virtual;
109 ---Purpose: Returns True if the Shell is rejected.
111 InitFace(me: in out) is static ;
112 ---Purpose: Starts an exploration of the faces of the current shell.
113 MoreFace(me) returns Boolean from Standard is static ;
114 ---Purpose: Returns True if current face in current shell.
115 NextFace(me: in out) is static ;
116 ---Purpose: Sets the explorer to the next Face of the current shell.
117 CurrentFace(me) returns Face from TopoDS is static ;
118 ---Purpose: Returns the current face.
120 RejectFace(me; L: Lin from gp) returns Boolean from Standard is virtual;
121 ---Purpose: returns True if the face is rejected.
123 ----------------------------------------------------------------------
125 Segment(me: in out; P : Pnt from gp;
126 L : out Lin from gp; Par : out Real)
127 ---Purpose: Returns in <L>, <Par> a segment having at least
128 -- one intersection with the shape boundary to
129 -- compute intersections.
131 --modified by NIZNHY-PKV Thu Nov 14 12:20:17 2002 f
132 returns Integer from Standard
133 --modified by NIZNHY-PKV Thu Nov 14 12:20:21 2002 t
136 OtherSegment(me: in out; P : Pnt from gp;
137 L : out Lin from gp; Par : out Real)
138 ---Purpose: Returns in <L>, <Par> a segment having at least
139 -- one intersection with the shape boundary to
140 -- compute intersections.
142 -- The First Call to this method returns a line which
143 -- point to a point of the first face of the shape.
144 -- The Second Call provide a line to the second face
147 --modified by NIZNHY-PKV Thu Nov 14 12:20:17 2002 f
148 returns Integer from Standard
149 --modified by NIZNHY-PKV Thu Nov 14 12:20:21 2002 t
152 -- Modified by skv - Thu Sep 4 12:19:22 2003 OCC578 Begin
153 GetFaceSegmentIndex(me)
154 ---Purpose: Returns the index of face for which
155 -- last segment is calculated.
156 returns Integer from Standard
158 -- Modified by skv - Thu Sep 4 12:19:23 2003 OCC578 End
159 --------------------------------------------------------------------
163 DumpSegment(me; P : Pnt from gp; L : Lin from gp;
164 Par : Real from Standard; S : State from TopAbs) is virtual;
168 ---C++: return const &
172 Intersector(me; F : Face from TopoDS)
174 returns Intersector from IntCurvesFace is static;
182 myBox : Box from Bnd;
183 myShape : Shape from TopoDS;
184 myReject : Boolean from Standard;
185 myFirstFace : Integer from Standard;
186 myParamOnEdge : Real from Standard;
187 myShellExplorer : Explorer from TopExp;
188 myFaceExplorer : Explorer from TopExp;
190 myMapOfInter : MapOfInter from BRepClass3d;