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

b311480e | 1 | -- Created on: 1994-03-24 |

2 | -- Created by: model | |

3 | -- Copyright (c) 1994-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 | -- |

973c2be1 | 8 | -- This library is free software; you can redistribute it and / or modify it |

9 | -- under the terms of the GNU Lesser General Public 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. | |

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 TopolTool from Adaptor3d | |

18 | ||

19 | ---Purpose: This class provides a default topological tool, | |

20 | -- based on the Umin,Vmin,Umax,Vmax of an HSurface | |

21 | -- from Adaptor3d. | |

22 | -- All methods and fields may be redefined when | |

23 | -- inheriting from this class. | |

24 | -- This class is used to instantiate algorithmes | |

25 | -- as Intersection, outlines,... | |

26 | ||

27 | ||

28 | inherits TShared from MMgt | |

29 | ||

30 | uses HSurface from Adaptor3d, | |

31 | HCurve2d from Adaptor2d, | |

32 | HVertex from Adaptor3d, | |

33 | HLine2d from Adaptor2d, | |

34 | Pnt2d from gp, | |

35 | Pnt from gp, | |

36 | State from TopAbs, | |

37 | Orientation from TopAbs, | |

38 | HArray1OfReal from TColStd, | |

39 | Array1OfReal from TColStd | |

40 | ||

41 | raises DomainError from Standard | |

42 | ||

43 | is | |

44 | ||

45 | Create | |

46 | ||

47 | returns mutable TopolTool from Adaptor3d; | |

48 | ||

49 | ||

50 | Create(Surface: HSurface from Adaptor3d) | |

51 | ||

52 | returns mutable TopolTool from Adaptor3d; | |

53 | ||

54 | ||

55 | Initialize(me: mutable) | |

56 | is virtual; | |

57 | ||

58 | Initialize(me: mutable; S: HSurface from Adaptor3d) | |

59 | is virtual; | |

60 | ||

61 | ||

62 | Initialize(me: mutable; Curve: HCurve2d from Adaptor2d) | |

63 | is virtual; | |

64 | ||

65 | ||

66 | ||

67 | --- Arc iterator | |

68 | ||

69 | ||

70 | Init(me: mutable) | |

71 | is virtual; | |

72 | ||

73 | ||

74 | More(me: mutable) | |

75 | ||

76 | returns Boolean from Standard | |

77 | is virtual; | |

78 | ||

79 | ||

80 | Value(me: mutable) | |

81 | ||

82 | returns mutable HCurve2d from Adaptor2d | |

83 | raises DomainError from Standard | |

84 | is virtual; | |

85 | ||

86 | ||

87 | Next(me: mutable) | |

88 | is virtual; | |

89 | ||

90 | ||

91 | --- Vertex iterator | |

92 | ||

93 | ||

94 | InitVertexIterator(me: mutable) | |

95 | is virtual; | |

96 | ||

97 | ||

98 | MoreVertex(me: mutable) | |

99 | ||

100 | returns Boolean from Standard | |

101 | is virtual; | |

102 | ||

103 | ||

104 | Vertex(me: mutable) | |

105 | ||

106 | returns mutable HVertex from Adaptor3d | |

107 | raises DomainError from Standard | |

108 | is virtual; | |

109 | ||

110 | ||

111 | NextVertex(me: mutable) | |

112 | is virtual; | |

113 | ||

114 | ||

115 | --- Other methods | |

116 | ||

117 | Classify(me: mutable; | |

118 | P: Pnt2d from gp; | |

119 | Tol: Real from Standard; | |

120 | ReacdreOnPeriodic: Boolean from Standard = Standard_True) | |

121 | ||

122 | returns State from TopAbs | |

123 | is virtual; | |

124 | ||

125 | IsThePointOn(me: mutable; | |

126 | P: Pnt2d from gp; | |

127 | Tol: Real from Standard; | |

128 | ReacdreOnPeriodic: Boolean from Standard = Standard_True) | |

129 | ||

130 | returns Boolean from Standard | |

131 | is virtual; | |

132 | ||

133 | ||

134 | Orientation(me: mutable; C: HCurve2d from Adaptor2d) | |

135 | ||

136 | ---Purpose: If the function returns the orientation of the arc. | |

137 | -- If the orientation is FORWARD or REVERSED, the arc is | |

138 | -- a "real" limit of the surface. | |

139 | -- If the orientation is INTERNAL or EXTERNAL, the arc is | |

140 | -- considered as an arc on the surface. | |

141 | ||

142 | returns Orientation from TopAbs | |

143 | is virtual; | |

144 | ||

145 | ||

146 | Orientation(me: mutable; V: HVertex from Adaptor3d) | |

147 | ||

148 | ---Purpose: Returns the orientation of the vertex V. | |

149 | -- The vertex has been found with an exploration on | |

150 | -- a given arc. The orientation is the orientation | |

151 | -- of the vertex on this arc. | |

152 | ||

153 | returns Orientation from TopAbs | |

154 | is virtual; | |

155 | ||

156 | ||

157 | Identical(me: mutable; V1,V2: HVertex from Adaptor3d) | |

158 | ||

159 | ---Purpose: Returns True if the vertices V1 and V2 are identical. | |

160 | -- This method does not take the orientation of the | |

161 | -- vertices in account. | |

162 | ||

163 | returns Boolean from Standard | |

164 | is virtual; | |

165 | ||

166 | ||

167 | Has3d(me) | |

168 | ---Purpose: answers if arcs and vertices may have 3d representations, | |

169 | -- so that we could use Tol3d and Pnt methods. | |

170 | returns Boolean from Standard | |

171 | is virtual; | |

172 | ||

173 | ||

174 | Tol3d(me; C: HCurve2d from Adaptor2d) | |

175 | ---Purpose: returns 3d tolerance of the arc C | |

176 | returns Real from Standard | |

177 | raises DomainError from Standard | |

178 | is virtual; | |

179 | ||

180 | ||

181 | Tol3d(me; V: HVertex from Adaptor3d) | |

182 | ---Purpose: returns 3d tolerance of the vertex V | |

183 | returns Real from Standard | |

184 | raises DomainError from Standard | |

185 | is virtual; | |

186 | ||

187 | ||

188 | Pnt(me; V: HVertex from Adaptor3d) | |

189 | ---Purpose: returns 3d point of the vertex V | |

190 | returns Pnt from gp | |

191 | raises DomainError from Standard | |

192 | is virtual; | |

193 | ||

194 | ||

195 | --- sample points tools | |

196 | ||

197 | ComputeSamplePoints(me: mutable) | |

198 | is virtual; | |

199 | ||

200 | ||

201 | NbSamplesU(me: mutable) | |

202 | ---Purpose: compute the sample-points for the intersections algorithms | |

203 | returns Integer from Standard | |

204 | is virtual; | |

205 | ||

206 | NbSamplesV(me: mutable) | |

207 | ---Purpose: compute the sample-points for the intersections algorithms | |

208 | returns Integer from Standard | |

209 | is virtual; | |

210 | ||

211 | NbSamples(me: mutable) | |

212 | ---Purpose: compute the sample-points for the intersections algorithms | |

213 | returns Integer from Standard | |

214 | is virtual; | |

215 | ||

216 | UParameters(me; theArray: out Array1OfReal from TColStd); | |

217 | ---Purpose: return the set of U parameters on the surface | |

218 | -- obtained by the method SamplePnts | |

219 | ||

220 | VParameters(me; theArray: out Array1OfReal from TColStd); | |

221 | ---Purpose: return the set of V parameters on the surface | |

222 | -- obtained by the method SamplePnts | |

223 | ||

224 | SamplePoint(me: mutable; Index: Integer from Standard; | |

225 | P2d : out Pnt2d from gp; | |

226 | P3d : out Pnt from gp) | |

227 | is virtual; | |

228 | ||

229 | DomainIsInfinite(me: mutable) | |

230 | returns Boolean from Standard | |

231 | is virtual; | |

232 | ||

233 | --modified by NIZNHY-PKV Mon Apr 23 15:54:51 2001 f | |

234 | Edge (me) | |

235 | returns Address from Standard | |

236 | is virtual; | |

237 | --modified by NIZNHY-PKV Mon Apr 23 15:54:46 2001 t | |

238 | ||

239 | --modified by NIZNHY-IFV Mon Sep 16 16:01:38 2005 f | |

240 | ||

241 | SamplePnts(me: mutable; theDefl: Real from Standard; theNUmin, theNVmin: Integer from Standard) | |

242 | ---Purpose: compute the sample-points for the intersections algorithms | |

243 | -- by adaptive algorithm for BSpline surfaces. For other surfaces algorithm | |

244 | -- is the same as in method ComputeSamplePoints(), but only fill arrays of U | |

245 | -- and V sample parameters; | |

246 | -- theDefl is a requred deflection | |

247 | -- theNUmin, theNVmin are minimal nb points for U and V. | |

248 | is virtual; | |

249 | ||

250 | BSplSamplePnts(me: mutable; theDefl: Real from Standard; theNUmin, theNVmin: Integer from Standard) | |

251 | ---Purpose: compute the sample-points for the intersections algorithms | |

252 | -- by adaptive algorithm for BSpline surfaces - is used in SamplePnts | |

253 | -- theDefl is a requred deflection | |

254 | -- theNUmin, theNVmin are minimal nb points for U and V. | |

255 | is virtual; | |

256 | ||

257 | IsUniformSampling(me) | |

258 | ---Purpose: Returns true if provide uniform sampling of points. | |

259 | returns Boolean from Standard | |

260 | is virtual; | |

261 | ||

262 | fields | |

263 | ||

264 | nbRestr : Integer from Standard; | |

265 | idRestr : Integer from Standard; | |

266 | Uinf : Real from Standard; | |

267 | Usup : Real from Standard; | |

268 | Vinf : Real from Standard; | |

269 | Vsup : Real from Standard; | |

270 | myRestr : HLine2d from Adaptor2d [4]; | |

271 | nbVtx : Integer from Standard; | |

272 | idVtx : Integer from Standard; | |

273 | myVtx : HVertex from Adaptor3d [2]; | |

274 | ||

275 | myS : HSurface from Adaptor3d is protected; | |

276 | myNbSamplesU : Integer from Standard is protected; | |

277 | myNbSamplesV : Integer from Standard is protected; | |

278 | ||

279 | myUPars : HArray1OfReal from TColStd is protected; | |

280 | myVPars : HArray1OfReal from TColStd is protected; | |

281 | ||

282 | end TopolTool; |