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

b311480e | 1 | -- Created on: 1992-11-24 |

2 | -- Created by: Laurent BUCHARD | |

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

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 | generic class UserIntConicCurveGen from IntCurve ( | |

18 | TheImpTool as any; -- as ImpTool from IntImpParGen | |

19 | ThePCurve as any; | |

20 | ThePCurveTool as any; -- as CurveTool from IntCurve(ThePCurve) | |

21 | TheIntConicCurve as any) -- as IntConicCurveGen from IntCurve ( | |

22 | -- TheImpTool as ImpTool from IntImpParGen | |

23 | -- ThePCurve as any; | |

24 | -- ThePCurveTool as ParTool from IntImpParGen(ThePCurve) | |

25 | ||

26 | ||

27 | inherits Intersection from IntRes2d | |

28 | ||

29 | ||

30 | ---Purpose: Generic algorithm to intersect a conic from gp and | |

31 | -- a parametric curve. This class uses the class | |

32 | -- IConicTool from IntCurve, and Domain from | |

33 | -- IntCurve. | |

34 | -- | |

35 | -- The template class for the PCurveTool is given in | |

36 | -- the package IntCurve (CurveTool). | |

37 | -- | |

38 | -- The methods used to know the result of the | |

39 | -- intersection are inherited from the class | |

40 | -- Intersection from IntRes2d. | |

41 | -- | |

42 | -- Note: The exception ConstructionError is raised in | |

43 | -- constructors or in Perform methods when a domain | |

44 | -- (Domain from IntRes2d) is not correct, i-e when a | |

45 | -- Circle (Circ2d from gp) or an Ellipse (i-e Elips2d | |

46 | -- from gp) do not have a closed domain (use the | |

47 | -- SetEquivalentParameters for a domain on a circle | |

48 | -- or an ellipse) or the domain of the ThePCurve is | |

49 | -- not bounded (HasFirstPoint() && HasLastPoint() | |

50 | -- return True.) | |

51 | ---Level: Internal | |

52 | ||

53 | uses IConicTool from IntCurve, | |

54 | Lin2d from gp, | |

55 | Circ2d from gp, | |

56 | Elips2d from gp, | |

57 | Parab2d from gp, | |

58 | Hypr2d from gp, | |

59 | Domain from IntRes2d, | |

60 | IntConicConic from IntCurve | |

61 | ||

62 | ||

63 | raises ConstructionError from Standard | |

64 | ||

65 | is | |

66 | ||

67 | Create | |

68 | ||

69 | ---Purpose: Empty constructor. | |

70 | ||

71 | returns UserIntConicCurveGen from IntCurve; | |

72 | ||

73 | ||

74 | Create (L: Lin2d from gp; D1: Domain from IntRes2d; | |

75 | PCurve: ThePCurve; D2: Domain from IntRes2d; | |

76 | TolConf,Tol: Real from Standard) | |

77 | ||

78 | ---Purpose: Intersection between a line and a parametric curve. | |

79 | ||

80 | returns UserIntConicCurveGen from IntCurve | |

81 | raises ConstructionError from Standard; | |

82 | ||

83 | ||

84 | Create (C: Circ2d from gp; D1: Domain from IntRes2d; | |

85 | PCurve: ThePCurve; D2: Domain from IntRes2d; | |

86 | TolConf,Tol: Real from Standard) | |

87 | ||

88 | ---Purpose: Intersection between a line and a parametric curve. | |

89 | ||

90 | returns UserIntConicCurveGen from IntCurve | |

91 | raises ConstructionError from Standard; | |

92 | ||

93 | ||

94 | ||

95 | Create (E: Elips2d from gp; D1: Domain from IntRes2d; | |

96 | PCurve: ThePCurve; D2: Domain from IntRes2d; | |

97 | TolConf,Tol: Real from Standard) | |

98 | ||

99 | ---Purpose: Intersection between an ellipse and a parametric curve. | |

100 | ||

101 | returns UserIntConicCurveGen from IntCurve | |

102 | raises ConstructionError from Standard; | |

103 | ||

104 | ||

105 | ||

106 | Create (Prb: Parab2d from gp; D1: Domain from IntRes2d; | |

107 | PCurve: ThePCurve; D2: Domain from IntRes2d; | |

108 | TolConf,Tol: Real from Standard) | |

109 | ||

110 | ---Purpose: Intersection between a parabola and a parametric curve. | |

111 | ||

112 | returns UserIntConicCurveGen from IntCurve | |

113 | raises ConstructionError from Standard; | |

114 | ||

115 | ||

116 | ||

117 | Create (H: Hypr2d from gp; D1: Domain from IntRes2d; | |

118 | PCurve: ThePCurve; D2: Domain from IntRes2d; | |

119 | TolConf,Tol: Real from Standard) | |

120 | ||

121 | ---Purpose: Intersection between the main branch of an hyperbola | |

122 | -- and a parametric curve. | |

123 | ||

124 | returns UserIntConicCurveGen from IntCurve | |

125 | raises ConstructionError from Standard; | |

126 | ||

127 | ||

128 | ||

129 | Perform (me: in out; | |

130 | L: Lin2d from gp; D1: Domain from IntRes2d; | |

131 | PCurve: ThePCurve; D2: Domain from IntRes2d; | |

132 | TolConf,Tol: Real from Standard) | |

133 | ||

134 | ---Purpose: Intersection between a line and a parametric curve. | |

135 | ||

136 | raises ConstructionError from Standard | |

137 | is static; | |

138 | ||

139 | ||

140 | Perform (me: in out; | |

141 | C: Circ2d from gp; D1: Domain from IntRes2d; | |

142 | PCurve: ThePCurve; D2: Domain from IntRes2d; | |

143 | TolConf,Tol: Real from Standard) | |

144 | ||

145 | ---Purpose: Intersection between a line and a parametric curve. | |

146 | ||

147 | raises ConstructionError from Standard | |

148 | is static; | |

149 | ||

150 | ||

151 | Perform (me: in out; | |

152 | E: Elips2d from gp; D1: Domain from IntRes2d; | |

153 | PCurve: ThePCurve; D2: Domain from IntRes2d; | |

154 | TolConf,Tol: Real from Standard) | |

155 | ||

156 | ---Purpose: Intersection between an ellipse and a parametric curve. | |

157 | ||

158 | raises ConstructionError from Standard | |

159 | is static; | |

160 | ||

161 | ||

162 | Perform (me: in out; | |

163 | Prb: Parab2d from gp; D1: Domain from IntRes2d; | |

164 | PCurve: ThePCurve; D2: Domain from IntRes2d; | |

165 | TolConf,Tol: Real from Standard) | |

166 | ||

167 | ---Purpose: Intersection between a parabola and a parametric curve. | |

168 | ||

169 | raises ConstructionError from Standard | |

170 | is static; | |

171 | ||

172 | ||

173 | Perform (me: in out; | |

174 | H: Hypr2d from gp; D1: Domain from IntRes2d; | |

175 | PCurve: ThePCurve; D2: Domain from IntRes2d; | |

176 | TolConf,Tol: Real from Standard) | |

177 | ||

178 | ---Purpose: Intersection between the main branch of an hyperbola | |

179 | -- and a parametric curve. | |

180 | ||

181 | raises ConstructionError from Standard | |

182 | is static; | |

183 | ||

184 | ||

185 | ||

186 | -------------------------------- p r i v a t e f u n c t i o n s | |

187 | InternalPerform (me : in out; | |

188 | Lin1 : Lin2d from gp; | |

189 | D1 : Domain from IntRes2d; | |

190 | PCurve : ThePCurve; | |

191 | D2 : Domain from IntRes2d; | |

192 | TolConf,Tol: Real from Standard; | |

193 | Composite : Boolean from Standard) | |

194 | ||

195 | is static private; | |

196 | ||

197 | ||

198 | InternalPerform (me : in out; | |

199 | Circ1 : Circ2d from gp; | |

200 | D1 : Domain from IntRes2d; | |

201 | PCurve : ThePCurve; | |

202 | D2 : Domain from IntRes2d; | |

203 | TolConf,Tol: Real from Standard; | |

204 | Composite : Boolean from Standard) | |

205 | ||

206 | is static private; | |

207 | ||

208 | ||

209 | InternalPerform (me : in out; | |

210 | Eli1 : Elips2d from gp; | |

211 | D1 : Domain from IntRes2d; | |

212 | PCurve : ThePCurve; | |

213 | D2 : Domain from IntRes2d; | |

214 | TolConf,Tol: Real from Standard; | |

215 | Composite : Boolean from Standard) | |

216 | ||

217 | is static private; | |

218 | ||

219 | ||

220 | InternalPerform (me : in out; | |

221 | Prb1 : Parab2d from gp; | |

222 | D1 : Domain from IntRes2d; | |

223 | PCurve : ThePCurve; | |

224 | D2 : Domain from IntRes2d; | |

225 | TolConf,Tol: Real from Standard; | |

226 | Composite : Boolean from Standard) | |

227 | ||

228 | is static private; | |

229 | ||

230 | ||

231 | InternalPerform (me : in out; | |

232 | Hpr1 : Hypr2d from gp; | |

233 | D1 : Domain from IntRes2d; | |

234 | PCurve : ThePCurve; | |

235 | D2 : Domain from IntRes2d; | |

236 | TolConf,Tol: Real from Standard; | |

237 | Composite : Boolean from Standard) | |

238 | ||

239 | is static private; | |

240 | ||

241 | fields | |

242 | ||

243 | param1inf : Real from Standard; | |

244 | param1sup : Real from Standard; | |

245 | param2inf : Real from Standard; | |

246 | param2sup : Real from Standard; | |

247 | ||

248 | intconiconi : IntConicConic from IntCurve; | |

249 | intconicurv : TheIntConicCurve; | |

250 | ||

251 | ||

252 | ||

253 | end UserIntConicCurveGen; | |

254 | ||

255 | ||

256 | ||

257 |