summary | shortlog | log | commit | commitdiff | tree

blob | blame (non-incremental) | history | HEAD

blob | blame (non-incremental) | history | HEAD

... / ...

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

1 | -- Created on: 1991-12-02 | |

2 | -- Created by: Laurent PAINNOT | |

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

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. | |

13 | -- | |

14 | -- Alternatively, this file may be used under the terms of Open CASCADE | |

15 | -- commercial license or contractual agreement. | |

16 | ||

17 | class MultiPointConstraint from AppDef | |

18 | ||

19 | inherits MultiPoint from AppParCurves | |

20 | ||

21 | ---Purpose: Describes a MultiPointConstraint used in a | |

22 | -- Multiline. MultiPointConstraints are composed | |

23 | -- of several two or three-dimensional points. | |

24 | -- The purpose is to define the corresponding | |

25 | -- points that share a common constraint in order | |

26 | -- to compute the approximation of several lines in parallel. | |

27 | -- Notes: | |

28 | -- - The order of points of a MultiPointConstraints is very important. | |

29 | -- Users must give 3D points first, and then 2D points. | |

30 | -- - The constraints for the points included in a | |

31 | -- MultiPointConstraint are always identical for | |

32 | -- all points, including the parameter. | |

33 | -- - If a MultiPointConstraint is a "tangency" | |

34 | -- point, the point is also a "passing" point. | |

35 | ||

36 | ||

37 | ||

38 | uses Pnt from gp, | |

39 | Pnt2d from gp, | |

40 | Vec from gp, | |

41 | Vec2d from gp, | |

42 | Array1OfPnt from TColgp, | |

43 | Array1OfPnt2d from TColgp, | |

44 | Array1OfVec from TColgp, | |

45 | Array1OfVec2d from TColgp, | |

46 | Constraint from AppParCurves, | |

47 | OStream from Standard, | |

48 | TShared from MMgt | |

49 | ||

50 | raises OutOfRange from Standard, | |

51 | ConstructionError from Standard, | |

52 | DimensionError from Standard | |

53 | ||

54 | ||

55 | is | |

56 | ||

57 | Create | |

58 | ---Purpose: creates an undefined MultiPointConstraint. | |

59 | ||

60 | returns MultiPointConstraint from AppDef; | |

61 | ||

62 | ||

63 | Create(NbPoints, NbPoints2d: Integer) | |

64 | ---Purpose: constructs a set of Points used to approximate a Multiline. | |

65 | -- These Points can be of 2 or 3 dimensions. | |

66 | -- Points will be initialized with SetPoint and SetPoint2d. | |

67 | ||

68 | returns MultiPointConstraint from AppDef; | |

69 | ||

70 | ||

71 | ||

72 | Create(tabP: Array1OfPnt) | |

73 | ---Purpose: creates a MultiPoint only composed of 3D points. | |

74 | ||

75 | returns MultiPointConstraint from AppDef; | |

76 | ||

77 | ||

78 | Create(tabP: Array1OfPnt2d) | |

79 | ---Purpose: creates a MultiPoint only composed of 2D points. | |

80 | ||

81 | returns MultiPointConstraint from AppDef; | |

82 | ||

83 | ||

84 | Create(tabP: Array1OfPnt; tabP2d: Array1OfPnt2d) | |

85 | ---Purpose: constructs a set of Points used to approximate a Multiline. | |

86 | -- These Points can be of 2 or 3 dimensions. | |

87 | -- Points will be initialized with SetPoint and SetPoint2d. | |

88 | ||

89 | returns MultiPointConstraint from AppDef; | |

90 | ||

91 | ||

92 | ||

93 | Create(tabP: Array1OfPnt; tabP2d: Array1OfPnt2d; | |

94 | tabVec: Array1OfVec; tabVec2d: Array1OfVec2d; | |

95 | tabCur: Array1OfVec; tabCur2d: Array1OfVec2d) | |

96 | ---Purpose: creates a MultiPointConstraint with a constraint of | |

97 | -- Curvature. | |

98 | -- An exception is raised if | |

99 | -- (length of <tabP> + length of <tabP2d> ) is different | |

100 | -- from (length of <tabVec> + length of <tabVec2d> ) or | |

101 | -- from (length of <tabCur> + length of <tabCur2d> ) | |

102 | ||

103 | returns MultiPointConstraint from AppDef | |

104 | raises ConstructionError from Standard; | |

105 | ||

106 | ||

107 | ||

108 | Create(tabP: Array1OfPnt; tabP2d: Array1OfPnt2d; | |

109 | tabVec: Array1OfVec; tabVec2d: Array1OfVec2d) | |

110 | ---Purpose: creates a MultiPointConstraint with a constraint of | |

111 | -- Tangency. | |

112 | -- An exception is raised if | |

113 | -- (length of <tabP> + length of <tabP2d> ) is different | |

114 | -- from (length of <tabVec> + length of <tabVec2d> ) | |

115 | ||

116 | returns MultiPointConstraint from AppDef | |

117 | raises ConstructionError from Standard; | |

118 | ||

119 | ||

120 | ||

121 | ||

122 | Create(tabP: Array1OfPnt; tabVec: Array1OfVec; tabCur: Array1OfVec) | |

123 | ---Purpose: creates a MultiPointConstraint only composed of 3d points | |

124 | -- with constraints of curvature. | |

125 | -- An exception is raised if the length of tabP is different | |

126 | -- from the length of tabVec or from tabCur. | |

127 | ||

128 | returns MultiPointConstraint from AppDef | |

129 | raises ConstructionError; | |

130 | ||

131 | ||

132 | Create(tabP: Array1OfPnt; tabVec: Array1OfVec) | |

133 | ---Purpose: creates a MultiPointConstraint only composed of 3d points | |

134 | -- with constraints of tangency. | |

135 | -- An exception is raised if the length of tabP is different | |

136 | -- from the length of tabVec. | |

137 | ||

138 | returns MultiPointConstraint | |

139 | raises ConstructionError; | |

140 | ||

141 | ||

142 | ||

143 | Create(tabP2d: Array1OfPnt2d; tabVec2d: Array1OfVec2d) | |

144 | ---Purpose: creates a MultiPointConstraint only composed of 2d points | |

145 | -- with constraints of tangency. | |

146 | -- An exception is raised if the length of tabP is different | |

147 | -- from the length of tabVec2d. | |

148 | ||

149 | returns MultiPointConstraint from AppDef | |

150 | raises ConstructionError from Standard; | |

151 | ||

152 | ||

153 | Create(tabP2d: Array1OfPnt2d; | |

154 | tabVec2d: Array1OfVec2d; | |

155 | tabCur2d: Array1OfVec2d) | |

156 | ---Purpose: creates a MultiPointConstraint only composed of 2d points | |

157 | -- with constraints of curvature. | |

158 | -- An exception is raised if the length of tabP is different | |

159 | -- from the length of tabVec2d or from tabCur2d. | |

160 | ||

161 | returns MultiPointConstraint from AppDef | |

162 | raises ConstructionError from Standard; | |

163 | ||

164 | ||

165 | ||

166 | ||

167 | SetTang(me: in out; Index: Integer; Tang: Vec) | |

168 | ---Purpose: sets the value of the tangency of the point of range | |

169 | -- Index. | |

170 | -- An exception is raised if Index <0 or if Index > number | |

171 | -- of 3d points. | |

172 | -- An exception is raised if Tang has an incorrect number of | |

173 | -- dimensions. | |

174 | ||

175 | raises OutOfRange from Standard, | |

176 | DimensionError from Standard | |

177 | is static; | |

178 | ||

179 | ||

180 | Tang(me; Index: Integer) | |

181 | ---Purpose: returns the tangency value of the point of range Index. | |

182 | -- An exception is raised if Index < 0 or if Index > number | |

183 | -- of 3d points. | |

184 | ||

185 | returns Vec from gp | |

186 | raises OutOfRange from Standard | |

187 | is static; | |

188 | ||

189 | ||

190 | SetTang2d(me: in out; Index: Integer; Tang2d: Vec2d) | |

191 | ---Purpose: sets the value of the tangency of the point of range | |

192 | -- Index. | |

193 | -- An exception is raised if Index <number of 3d points or if | |

194 | -- Index > total number of Points | |

195 | -- An exception is raised if Tang has an incorrect number of | |

196 | -- dimensions. | |

197 | ||

198 | raises OutOfRange from Standard, | |

199 | DimensionError from Standard | |

200 | is static; | |

201 | ||

202 | ||

203 | Tang2d(me; Index: Integer) | |

204 | ---Purpose: returns the tangency value of the point of range Index. | |

205 | -- An exception is raised if Index < number of 3d points or | |

206 | -- if Index > total number of points. | |

207 | ||

208 | returns Vec2d from gp | |

209 | raises OutOfRange from Standard | |

210 | is static; | |

211 | ||

212 | ||

213 | SetCurv(me: in out; Index: Integer; Curv: Vec) | |

214 | ---Purpose: Vec sets the value of the normal vector at the | |

215 | -- point of index Index. The norm of the normal | |

216 | -- vector at the point of position Index is set to the normal curvature. | |

217 | -- An exception is raised if Index <0 or if Index > number | |

218 | -- of 3d points. | |

219 | -- An exception is raised if Curv has an incorrect number of | |

220 | -- dimensions. | |

221 | ||

222 | raises OutOfRange from Standard, | |

223 | DimensionError from Standard | |

224 | is static; | |

225 | ||

226 | ||

227 | Curv(me; Index: Integer) | |

228 | ---Purpose: returns the normal vector at the point of range Index. | |

229 | -- An exception is raised if Index < 0 or if Index > number | |

230 | -- of 3d points. | |

231 | ||

232 | returns Vec from gp | |

233 | raises OutOfRange from Standard | |

234 | is static; | |

235 | ||

236 | ||

237 | ||

238 | SetCurv2d(me: in out; Index: Integer; Curv2d: Vec2d) | |

239 | ---Purpose: Vec sets the value of the normal vector at the | |

240 | -- point of index Index. The norm of the normal | |

241 | -- vector at the point of position Index is set to the normal curvature. | |

242 | -- An exception is raised if Index <0 or if Index > number | |

243 | -- of 3d points. | |

244 | -- An exception is raised if Curv has an incorrect number of | |

245 | -- dimensions. | |

246 | ||

247 | raises OutOfRange from Standard, | |

248 | DimensionError from Standard | |

249 | is static; | |

250 | ||

251 | ||

252 | Curv2d(me; Index: Integer) | |

253 | ---Purpose: returns the normal vector at the point of range Index. | |

254 | -- An exception is raised if Index < 0 or if Index > number | |

255 | -- of 3d points. | |

256 | ||

257 | returns Vec2d from gp | |

258 | is static; | |

259 | ||

260 | ||

261 | IsTangencyPoint(me) | |

262 | ---Purpose: returns True if the MultiPoint has a tangency value. | |

263 | ||

264 | returns Boolean | |

265 | raises OutOfRange from Standard | |

266 | is static; | |

267 | ||

268 | IsCurvaturePoint(me) | |

269 | ---Purpose: returns True if the MultiPoint has a curvature value. | |

270 | ||

271 | returns Boolean | |

272 | raises OutOfRange from Standard | |

273 | is static; | |

274 | ||

275 | ||

276 | Dump(me; o: in out OStream) | |

277 | ---Purpose: Prints on the stream o information on the current | |

278 | -- state of the object. | |

279 | -- Is used to redefine the operator <<. | |

280 | ||

281 | is redefined; | |

282 | ||

283 | ||

284 | ||

285 | fields | |

286 | ||

287 | ttabTang: TShared from MMgt; | |

288 | ttabCurv: TShared from MMgt; | |

289 | ttabTang2d: TShared from MMgt; | |

290 | ttabCurv2d: TShared from MMgt; | |

291 | ||

292 | ||

293 | end MultiPointConstraint from AppDef; |