b311480e |
1 | -- Created on: 1992-05-07 |
2 | -- Created by: Jacques GOUSSARD |
3 | -- Copyright (c) 1992-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class ImpImpIntersection from IntPatch |
18 | |
19 | ---Purpose: Implementation of the intersection between two |
20 | -- quadric patches : Plane, Cone, Cylinder or Sphere. |
21 | |
22 | |
23 | uses HSurface from Adaptor3d, |
24 | TopolTool from Adaptor3d, |
25 | Point from IntPatch, |
26 | SequenceOfPoint from IntPatch, |
27 | TheSOnBounds from IntPatch, |
28 | SequenceOfLine from IntPatch, |
29 | Line from IntPatch |
30 | |
31 | |
32 | raises NotDone from StdFail, |
33 | OutOfRange from Standard, |
34 | DomainError from Standard, |
35 | ConstructionError from Standard |
36 | |
37 | is |
38 | |
39 | |
40 | Create |
41 | |
42 | returns ImpImpIntersection from IntPatch; |
43 | |
44 | |
45 | Create (S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d; |
46 | S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d; |
d4b867e6 |
47 | TolArc,TolTang: Real from Standard; |
48 | theIsReqToKeepRLine: Boolean from Standard = Standard_False) |
49 | |
50 | ---Purpose: Flag theIsReqToKeepRLine has been enterred only for |
51 | -- compatibility with TopOpeBRep package. It shall be deleted |
52 | -- after deleting TopOpeBRep. |
53 | -- When intersection result returns IntPatch_RLine and another |
54 | -- IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE) |
55 | -- will always keep both lines even if they are coincided. |
7fd59977 |
56 | |
57 | returns ImpImpIntersection from IntPatch |
58 | |
59 | raises ConstructionError from Standard; |
60 | |
61 | |
62 | Perform (me: in out; |
63 | S1: HSurface from Adaptor3d; D1: TopolTool from Adaptor3d; |
64 | S2: HSurface from Adaptor3d; D2: TopolTool from Adaptor3d; |
ecc4f148 |
65 | TolArc,TolTang: Real from Standard; |
d4b867e6 |
66 | isTheTrimmed: Boolean from Standard = Standard_False; |
67 | theIsReqToKeepRLine: Boolean from Standard = Standard_False) |
7fd59977 |
68 | |
69 | raises ConstructionError from Standard |
d4b867e6 |
70 | |
71 | ---Purpose: Flag theIsReqToKeepRLine has been enterred only for |
72 | -- compatibility with TopOpeBRep package. It shall be deleted |
73 | -- after deleting TopOpeBRep. |
74 | -- When intersection result returns IntPatch_RLine and another |
75 | -- IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE) |
76 | -- will always keep both lines even if they are coincided. |
7fd59977 |
77 | |
78 | is static; |
79 | |
80 | |
81 | IsDone(me) |
82 | |
83 | ---Purpose: Returns True if the calculus was succesfull. |
84 | |
85 | returns Boolean from Standard |
86 | ---C++: inline |
87 | |
88 | is static; |
89 | |
90 | |
91 | IsEmpty(me) |
92 | |
93 | ---Purpose: Returns true if the is no intersection. |
94 | |
95 | returns Boolean from Standard |
96 | ---C++: inline |
97 | |
98 | raises NotDone from StdFail |
99 | |
100 | is static; |
101 | |
102 | |
103 | TangentFaces(me) |
104 | |
105 | ---Purpose: Returns True if the two patches are considered as |
106 | -- entierly tangent, i-e every restriction arc of one |
107 | -- patch is inside the geometric base of the otehr patch. |
108 | |
109 | returns Boolean from Standard |
110 | ---C++: inline |
111 | |
112 | raises NotDone from StdFail |
113 | |
114 | is static; |
115 | |
116 | |
117 | OppositeFaces(me) |
118 | |
119 | ---Purpose: Returns True when the TangentFaces returns True and the |
120 | -- normal vectors evaluated at a point on the first and the |
121 | -- second surface are opposite. |
122 | -- The exception DomainError is raised if TangentFaces |
123 | -- returns False. |
124 | |
125 | returns Boolean from Standard |
126 | ---C++: inline |
127 | |
128 | raises NotDone from StdFail, |
129 | DomainError from Standard |
130 | |
131 | is static; |
132 | |
133 | |
134 | NbPnts(me) |
135 | |
136 | ---Purpose: Returns the number of "single" points. |
137 | |
138 | returns Integer from Standard |
139 | ---C++: inline |
140 | |
141 | raises NotDone from StdFail |
142 | |
143 | is static; |
144 | |
145 | |
146 | Point(me; Index: Integer from Standard) |
147 | |
148 | ---Purpose: Returns the point of range Index. |
149 | -- An exception is raised if Index<=0 or Index>NbPnt. |
150 | |
151 | returns Point from IntPatch |
152 | ---C++: return const& |
153 | ---C++: inline |
154 | |
155 | raises NotDone from StdFail, |
156 | OutOfRange from Standard |
157 | |
158 | is static; |
159 | |
160 | |
161 | NbLines(me) |
162 | |
163 | ---Purpose: Returns the number of intersection lines. |
164 | |
165 | returns Integer from Standard |
166 | ---C++: inline |
167 | |
168 | raises NotDone from StdFail |
169 | |
170 | is static; |
171 | |
172 | |
173 | Line(me; Index: Integer from Standard) |
174 | |
175 | ---Purpose: Returns the line of range Index. |
176 | -- An exception is raised if Index<=0 or Index>NbLine. |
177 | |
178 | returns Line from IntPatch |
179 | ---C++: inline |
180 | ---C++: return const& |
181 | |
182 | raises NotDone from StdFail, |
183 | OutOfRange from Standard |
184 | |
185 | is static; |
186 | |
187 | |
188 | fields |
189 | |
190 | done : Boolean from Standard; |
191 | empt : Boolean from Standard; |
192 | tgte : Boolean from Standard; |
193 | oppo : Boolean from Standard; |
7fd59977 |
194 | spnt : SequenceOfPoint from IntPatch; |
195 | slin : SequenceOfLine from IntPatch; |
196 | solrst : TheSOnBounds from IntPatch; |
197 | |
198 | end ImpImpIntersection; |