Commit | Line | Data |
---|---|---|

7fd59977 | 1 | -- File: IntCurveSurface_Inter.cdl |

2 | -- Created: Wed Apr 7 15:46:05 1993 | |

3 | -- Author: Laurent BUCHARD | |

4 | -- <lbr@sdsun2> | |

5 | ---Copyright: Matra Datavision 1993 | |

6 | ||

7 | generic class Inter from IntCurveSurface ( | |

8 | TheCurve as any; | |

9 | TheCurveTool as any; | |

10 | TheSurface as any; | |

11 | TheSurfaceTool as any) | |

12 | ||

13 | inherits Intersection from IntCurveSurface | |

14 | ||

15 | ---Purpose: This class provides the intersections between a | |

16 | -- surface S(u,v) and a curve C(w) on their natural | |

17 | -- domains (S: (uo,vo)->(u1,v1)) and (C: wo->w1). | |

18 | -- | |

19 | -- The class <Intersection from IntCurveSurface> | |

20 | -- describes the methods which are used to read | |

21 | -- the results. | |

22 | ||

23 | uses | |

24 | Box from Bnd, | |

25 | Lin from gp, | |

26 | Elips from gp, | |

27 | Circ from gp, | |

28 | Parab from gp, | |

29 | Hypr from gp, | |

30 | IntConicQuad from IntAna, | |

31 | IntersectionPoint from IntCurveSurface, | |

32 | IntersectionSegment from IntCurveSurface, | |

33 | SurfaceType from GeomAbs, | |

34 | --modified by NIZHNY-MKK Tue Jul 26 14:31:08 2005 | |

35 | Array2OfPnt from TColgp, | |

36 | Array1OfReal from TColStd, | |

37 | BoundSortBox from Bnd | |

38 | ||

39 | ------------------------------------------------------------ | |

40 | class ThePolygon instantiates | |

41 | Polygon from IntCurveSurface ( | |

42 | TheCurve, | |

43 | TheCurveTool); | |

44 | ------------------------------------------------------------ | |

45 | class ThePolygonTool instantiates | |

46 | PolygonTool from IntCurveSurface ( | |

47 | Pnt from gp, | |

48 | ThePolygon, | |

49 | Box from Bnd); | |

50 | ------------------------------------------------------------ | |

51 | class ThePolyhedron instantiates | |

52 | Polyhedron from IntCurveSurface ( | |

53 | TheSurface, | |

54 | TheSurfaceTool); | |

55 | ------------------------------------------------------------ | |

56 | class ThePolyhedronTool instantiates | |

57 | PolyhedronTool from IntCurveSurface ( | |

58 | ThePolyhedron); | |

59 | ------------------------------------------------------------ | |

60 | class TheInterference instantiates | |

61 | InterferencePolygonPolyhedron from Intf ( | |

62 | ThePolygon, | |

63 | ThePolygonTool, | |

64 | ThePolyhedron, | |

65 | ThePolyhedronTool); | |

66 | ------------------------------------------------------------ | |

67 | -- find a root (u,v,w) from a starting point (u0,v0,w0) of the problem : | |

68 | -- XS(u,v) = XC(w) | |

69 | -- YS(u,v) = YC(w) | |

70 | -- ZS(u,v) = ZC(w) | |

71 | -- where (XS,YS,ZS) is the point of parameters (u,v) on the | |

72 | -- biparametric surface and (XC,YC,ZC) the point of parameter w on | |

73 | -- the parametric curve. | |

74 | -- | |

75 | class TheCSFunction instantiates | |

76 | ZerCSParFunc from IntImp ( | |

77 | TheSurface, | |

78 | TheSurfaceTool, | |

79 | TheCurve, | |

80 | TheCurveTool); | |

81 | ||

82 | class TheExactInter instantiates | |

83 | IntCS from IntImp ( | |

84 | TheSurface, | |

85 | TheSurfaceTool, | |

86 | TheCurve, | |

87 | TheCurveTool, | |

88 | TheCSFunction); | |

89 | ------------------------------------------------------------ | |

90 | -- find a root (u,v,w) from a starting point (w0) of the problem : | |

91 | -- Q(X(w),Y(w),Z(w)) = 0 | |

92 | -- | |

93 | -- where Q(X,Y,Z) = 0 is the implicit expression of a quadric | |

94 | -- and (X(w),Y(w),Z(w)) the point of parameter w on a parametric | |

95 | -- curve. | |

96 | -- | |

97 | class TheQuadCurvExactInter instantiates | |

98 | QuadricCurveExactInter from IntCurveSurface( | |

99 | TheSurface, | |

100 | TheSurfaceTool, | |

101 | TheCurve, | |

102 | TheCurveTool); | |

103 | -------------------------------------------------------------- | |

104 | ||

105 | is | |

106 | ||

107 | Create | |

108 | ---Purpose: Empty Constructor | |

109 | returns Inter from IntCurveSurface; | |

110 | ||

111 | Perform(me : in out; | |

112 | Curve : TheCurve; | |

113 | Surface : TheSurface) | |

114 | ---Purpose: Compute the Intersection between the curve and the | |

115 | -- surface | |

116 | is static; | |

117 | ||

118 | ||

119 | Perform(me : in out; | |

120 | Curve : TheCurve; | |

121 | Polygon : ThePolygon; | |

122 | Surface : TheSurface) | |

123 | ---Purpose: Compute the Intersection between the curve and | |

124 | -- the surface. The Curve is already sampled and | |

125 | -- its polygon : <Polygon> is given. | |

126 | is static; | |

127 | ||

128 | Perform(me : in out; | |

129 | Curve : TheCurve; | |

130 | ThePolygon: ThePolygon; | |

131 | Surface : TheSurface; | |

132 | Polyhedron: ThePolyhedron) | |

133 | ---Purpose: Compute the Intersection between the curve and | |

134 | -- the surface. The Curve is already sampled and | |

135 | -- its polygon : <Polygon> is given. The Surface is | |

136 | -- also sampled and <Polyhedron> is given. | |

137 | is static; | |

138 | ||

139 | Perform(me : in out; | |

140 | Curve : TheCurve; | |

141 | ThePolygon: ThePolygon; | |

142 | Surface : TheSurface; | |

143 | Polyhedron: ThePolyhedron; | |

144 | BndBSB : in out BoundSortBox from Bnd) | |

145 | ---Purpose: Compute the Intersection between the curve and | |

146 | -- the surface. The Curve is already sampled and | |

147 | -- its polygon : <Polygon> is given. The Surface is | |

148 | -- also sampled and <Polyhedron> is given. | |

149 | is static; | |

150 | ||

151 | Perform(me : in out; | |

152 | Curve : TheCurve; | |

153 | Surface : TheSurface; | |

154 | Polyhedron: ThePolyhedron) | |

155 | ---Purpose: Compute the Intersection between the curve and | |

156 | -- the surface. The Surface is already sampled and | |

157 | -- its polyhedron : <Polyhedron> is given. | |

158 | is static; | |

159 | ||

160 | ||

161 | ------------------------------------------------------------ | |

162 | ------ Implementation functions : | |

163 | ------------------------------------------------------------ | |

164 | ||

165 | Perform(me : in out; | |

166 | Curve : TheCurve; | |

167 | Surface : TheSurface; | |

168 | U0,V0,U1,V1: Real from Standard) | |

169 | ---Purpose: Compute the Intersection between the curve and the | |

170 | -- surface | |

171 | is static protected; | |

172 | ||

173 | InternalPerformCurveQuadric(me : in out; | |

174 | Curve : TheCurve; | |

175 | Surface : TheSurface) | |

176 | is static protected; | |

177 | ||

178 | InternalPerform(me : in out; | |

179 | Curve : TheCurve; | |

180 | Polygon : ThePolygon; | |

181 | Surface : TheSurface; | |

182 | Polyhedron : ThePolyhedron; | |

183 | U1,V1,U2,V2 : Real from Standard) | |

184 | is static protected; | |

185 | ||

186 | InternalPerform(me : in out; | |

187 | Curve : TheCurve; | |

188 | Polygon : ThePolygon; | |

189 | Surface : TheSurface; | |

190 | Polyhedron : ThePolyhedron; | |

191 | U1,V1,U2,V2 : Real from Standard; | |

192 | BSB : in out BoundSortBox from Bnd) | |

193 | is static protected; | |

194 | ||

195 | InternalPerform(me : in out; | |

196 | Curve : TheCurve; | |

197 | Polygon : ThePolygon; | |

198 | Surface : TheSurface; | |

199 | U1,V1,U2,V2 : Real from Standard) | |

200 | is static protected; | |

201 | ||

202 | PerformConicSurf(me : in out; | |

203 | Line : Lin from gp; | |

204 | Curve : TheCurve; | |

205 | Surface : TheSurface; | |

206 | U1,V1,U2,V2 : Real from Standard) | |

207 | is static protected; | |

208 | ||

209 | PerformConicSurf(me : in out; | |

210 | Circle : Circ from gp; | |

211 | Curve : TheCurve; | |

212 | Surface : TheSurface; | |

213 | U1,V1,U2,V2 : Real from Standard) | |

214 | is static protected; | |

215 | ||

216 | PerformConicSurf(me : in out; | |

217 | Ellipse : Elips from gp; | |

218 | Curve : TheCurve; | |

219 | Surface : TheSurface; | |

220 | U1,V1,U2,V2 : Real from Standard) | |

221 | is static protected; | |

222 | ||

223 | PerformConicSurf(me : in out; | |

224 | Parab : Parab from gp; | |

225 | Curve : TheCurve; | |

226 | Surface : TheSurface; | |

227 | U1,V1,U2,V2 : Real from Standard) | |

228 | is static protected; | |

229 | ||

230 | PerformConicSurf(me : in out; | |

231 | Hyper : Hypr from gp; | |

232 | Curve : TheCurve; | |

233 | Surface : TheSurface; | |

234 | U1,V1,U2,V2 : Real from Standard) | |

235 | is static protected; | |

236 | ||

237 | AppendIntAna(me : in out; | |

238 | Curve : TheCurve; | |

239 | Surface : TheSurface; | |

240 | InterAna : IntConicQuad from IntAna) | |

241 | is static protected; | |

242 | ||

243 | AppendPoint(me : in out; | |

244 | Curve : TheCurve; | |

245 | w : Real from Standard; | |

246 | Surface : TheSurface; | |

247 | u,v : Real from Standard) | |

248 | is static protected; | |

249 | ||

250 | AppendSegment(me : in out; | |

251 | Curve : TheCurve; | |

252 | u0,u1 : Real from Standard; | |

253 | Surface : TheSurface) | |

254 | is static protected; | |

255 | ||

256 | --modified by NIZHNY-MKK Tue Jul 26 14:31:11 2005.BEGIN | |

257 | ||

258 | DoSurface(me : in out; | |

259 | surface : TheSurface; | |

260 | u0,u1,v0,v1 : Real from Standard; | |

261 | pntsOnSurface: in out Array2OfPnt from TColgp; | |

262 | boxSurface : in out Box from Bnd; | |

263 | gap : in out Real from Standard) | |

264 | is private; | |

265 | ||

266 | DoNewBounds(me : in out; | |

267 | surface : TheSurface; | |

268 | u0,u1,v0,v1 : Real from Standard; | |

269 | pntsOnSurface: Array2OfPnt from TColgp; | |

270 | X,Y,Z : Array1OfReal from TColStd; | |

271 | Bounds : in out Array1OfReal from TColStd) | |

272 | is private; | |

273 | --modified by NIZHNY-MKK Tue Jul 26 14:40:22 2005.END | |

274 | ||

275 | end Inter; | |

276 | ||

277 | ||

278 | ||

279 | ||

280 |