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

b311480e | 1 | -- Created on: 1995-05-02 |

2 | -- Created by: Modelistation | |

3 | -- Copyright (c) 1995-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 Line2d from Adaptor2d inherits Curve2d from Adaptor2d | |

18 | ||

19 | uses | |

20 | Array1OfReal from TColStd, | |

21 | Pnt2d from gp, | |

22 | Dir2d from gp, | |

23 | Vec2d from gp, | |

24 | Lin2d from gp, | |

25 | Ax2d from gp, | |

26 | Circ2d from gp, | |

27 | Elips2d from gp, | |

28 | Hypr2d from gp, | |

29 | Parab2d from gp, | |

30 | Shape from GeomAbs, | |

31 | CurveType from GeomAbs, | |

32 | BezierCurve from Geom2d, | |

33 | BSplineCurve from Geom2d, | |

34 | HCurve2d from Adaptor2d | |

35 | ||

36 | raises | |

37 | ||

38 | OutOfRange from Standard, | |

39 | NoSuchObject from Standard, | |

40 | DomainError from Standard | |

41 | ||

42 | is | |

43 | ||

44 | Create returns Line2d from Adaptor2d; | |

45 | ||

46 | Create(P: Pnt2d from gp; | |

47 | D: Dir2d from gp; | |

48 | UFirst,ULast: Real from Standard) | |

49 | returns Line2d from Adaptor2d; | |

50 | ||

51 | Load(me : in out; L : Lin2d from gp) | |

52 | is static; | |

53 | ||

54 | Load(me : in out; L : Lin2d from gp; | |

55 | UFirst,ULast: Real from Standard) | |

56 | is static; | |

57 | ||

58 | FirstParameter(me) | |

59 | returns Real from Standard | |

60 | is redefined static; | |

61 | ||

62 | LastParameter(me) | |

63 | returns Real from Standard | |

64 | is redefined static; | |

65 | ||

66 | Continuity(me) | |

67 | returns Shape from GeomAbs | |

68 | is redefined static; | |

69 | ||

70 | NbIntervals(me; S : Shape from GeomAbs) returns Integer | |

71 | ---Purpose: If necessary, breaks the curve in intervals of | |

72 | -- continuity <S>. And returns the number of | |

73 | -- intervals. | |

74 | is redefined static; | |

75 | ||

76 | Intervals(me; T : in out Array1OfReal from TColStd; | |

77 | S : Shape from GeomAbs) | |

78 | ---Purpose: Stores in <T> the parameters bounding the intervals | |

79 | -- of continuity <S>. | |

80 | -- | |

81 | -- The array must provide enough room to accomodate | |

82 | -- for the parameters. i.e. T.Length() > NbIntervals() | |

83 | raises | |

84 | OutOfRange from Standard | |

85 | is redefined static; | |

86 | ||

87 | Trim(me; First, Last, Tol : Real) returns HCurve2d from Adaptor2d | |

88 | ---Purpose: Returns a curve equivalent of <me> between | |

89 | -- parameters <First> and <Last>. <Tol> is used to | |

90 | -- test for 3d points confusion. | |

91 | raises | |

92 | OutOfRange from Standard | |

93 | ---Purpose: If <First> >= <Last> | |

94 | is redefined static; | |

95 | ||

96 | IsClosed(me) | |

97 | returns Boolean from Standard | |

98 | is redefined static; | |

99 | ||

100 | IsPeriodic(me) | |

101 | returns Boolean from Standard | |

102 | is redefined static; | |

103 | ||

104 | Period(me) returns Real | |

105 | raises | |

106 | DomainError from Standard -- if the curve is not periodic | |

107 | is redefined static; | |

108 | ||

109 | Value(me; X: Real from Standard) | |

110 | returns Pnt2d from gp | |

111 | is redefined static; | |

112 | ||

113 | D0(me; X: Real from Standard; P: out Pnt2d from gp) | |

114 | is redefined static; | |

115 | ||

116 | D1(me; X: Real from Standard; | |

117 | P: out Pnt2d from gp; V: out Vec2d from gp) | |

118 | is redefined static; | |

119 | ||

120 | D2(me; X: Real from Standard; | |

121 | P: out Pnt2d from gp; V1,V2: out Vec2d from gp) | |

122 | is redefined static; | |

123 | ||

124 | D3(me; X: Real from Standard; | |

125 | P: out Pnt2d from gp; V1,V2,V3: out Vec2d from gp) | |

126 | is redefined static; | |

127 | ||

128 | DN (me; U : Real; N : Integer) | |

129 | returns Vec2d from gp | |

130 | is redefined static; | |

131 | ||

132 | ||

133 | Resolution(me; R3d : Real) | |

134 | returns Real from Standard | |

135 | is redefined static; | |

136 | ||

137 | ||

138 | GetType(me) | |

139 | returns CurveType from GeomAbs | |

140 | is redefined static; | |

141 | ||

142 | ||

143 | Line(me) | |

144 | returns Lin2d from gp | |

145 | is redefined static; | |

146 | ||

147 | Circle(me) returns Circ2d from gp | |

148 | raises | |

149 | NoSuchObject from Standard | |

150 | is redefined static; | |

151 | ||

152 | Ellipse(me) returns Elips2d from gp | |

153 | raises | |

154 | NoSuchObject from Standard | |

155 | is redefined static; | |

156 | ||

157 | Hyperbola(me) returns Hypr2d from gp | |

158 | raises | |

159 | NoSuchObject from Standard | |

160 | is redefined static; | |

161 | ||

162 | Parabola(me) returns Parab2d from gp | |

163 | raises | |

164 | NoSuchObject from Standard | |

165 | is redefined static; | |

166 | ||

167 | ||

168 | Degree(me) returns Integer | |

169 | raises | |

170 | NoSuchObject from Standard | |

171 | is redefined static; | |

172 | ||

173 | IsRational(me) returns Boolean | |

174 | raises | |

175 | NoSuchObject from Standard | |

176 | is redefined static; | |

177 | ||

178 | NbPoles(me) returns Integer | |

179 | raises | |

180 | NoSuchObject from Standard | |

181 | is redefined static; | |

182 | ||

183 | ||

184 | NbKnots(me) returns Integer | |

185 | raises | |

186 | NoSuchObject from Standard | |

187 | is redefined static; | |

188 | ||

189 | ||

190 | ||

191 | Bezier(me) returns BezierCurve from Geom2d | |

192 | raises | |

193 | NoSuchObject from Standard | |

194 | is redefined static; | |

195 | ||

196 | BSpline(me) returns BSplineCurve from Geom2d | |

197 | raises | |

198 | NoSuchObject from Standard | |

199 | is redefined static; | |

200 | ||

201 | fields | |

202 | ||

203 | myUfirst : Real from Standard; | |

204 | myUlast : Real from Standard; | |

205 | myAx2d : Ax2d from gp; | |

206 | ||

207 | end Line2d; |