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

b311480e | 1 | -- Created on: 1992-12-15 |

2 | -- Created by: Jean Louis FRENKEL | |

3 | -- Copyright (c) 1992-1999 Matra Datavision | |

4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS | |

5 | -- | |

6 | -- The content of this file is subject to the Open CASCADE Technology Public | |

7 | -- License Version 6.5 (the "License"). You may not use the content of this file | |

8 | -- except in compliance with the License. Please obtain a copy of the License | |

9 | -- at http://www.opencascade.org and read it completely before using this file. | |

10 | -- | |

11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its | |

12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. | |

13 | -- | |

14 | -- The Original Code and all software distributed under the License is | |

15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the | |

16 | -- Initial Developer hereby disclaims all such warranties, including without | |

17 | -- limitation, any warranties of merchantability, fitness for a particular | |

18 | -- purpose or non-infringement. Please see the License for the specific terms | |

19 | -- and conditions governing the rights and limitations under the License. | |

20 | ||

7fd59977 | 21 | |

22 | ||

23 | class DeflectionCurve from StdPrs | |

24 | ||

25 | inherits Root from Prs3d | |

26 | ||

27 | ||

28 | ---Purpose: A framework to provide display of any curve with | |

29 | -- respect to the maximal chordal deviation defined in | |

30 | -- the Prs3d_Drawer attributes manager. | |

31 | ||

32 | uses | |

33 | Presentation from Prs3d, | |

34 | Drawer from Prs3d, | |

35 | Length from Quantity, | |

36 | Curve from Adaptor3d, | |

37 | SequenceOfPnt from TColgp | |

38 | ||

39 | is | |

40 | ||

7fd59977 | 41 | Add(myclass; aPresentation: Presentation from Prs3d; |

b8ddfc2f | 42 | aCurve : in out Curve from Adaptor3d; |

7fd59977 | 43 | aDrawer : Drawer from Prs3d; |

b8ddfc2f | 44 | drawCurve : Boolean from Standard = Standard_True); |

7fd59977 | 45 | |

46 | ---Purpose: adds to the presentation aPresentation the drawing of the curve | |

47 | -- aCurve with respect to the maximal chordial deviation defined | |

48 | -- by the drawer aDrawer. | |

49 | -- The aspect is defined by LineAspect in aDrawer. | |

50 | -- If drawCurve equals Standard_False the curve will not be displayed, | |

51 | -- it is used if the curve is a part of some shape and PrimitiveArray | |

52 | -- visualization approach is activated (it is activated by default). | |

53 | ||

7fd59977 | 54 | Add(myclass; aPresentation: Presentation from Prs3d; |

b8ddfc2f | 55 | aCurve : in out Curve from Adaptor3d; |

7fd59977 | 56 | U1, U2 : Real from Standard; |

57 | aDrawer : Drawer from Prs3d; | |

b8ddfc2f | 58 | drawCurve : Boolean from Standard = Standard_True); |

7fd59977 | 59 | |

60 | ---Purpose: adds to the presentation aPresentation the drawing of the curve | |

61 | -- aCurve with respect to the maximal chordial deviation defined | |

62 | -- by the drawer aDrawer. | |

63 | -- The aspect is defined by LineAspect in aDrawer. | |

64 | -- The drawing will be limited between the points of parameter U1 and U2. | |

65 | -- If drawCurve equals Standard_False the curve will not be displayed, | |

66 | -- it is used if the curve is a part of some shape and PrimitiveArray | |

67 | -- visualization approach is activated (it is activated by default). | |

68 | ||

7fd59977 | 69 | Add(myclass; aPresentation: Presentation from Prs3d; |

b8ddfc2f | 70 | aCurve : in out Curve from Adaptor3d; |

7fd59977 | 71 | aDeflection : Real from Standard; |

72 | aLimit : Real from Standard; | |

73 | anAngle : Real from Standard = 0.2; | |

b8ddfc2f | 74 | drawCurve : Boolean from Standard = Standard_True); |

7fd59977 | 75 | |

76 | ---Purpose: adds to the presentation aPresentation the drawing of the curve | |

77 | -- aCurve with respect to the maximal chordial deviation aDeflection. | |

78 | -- The aspect is the current aspect | |

79 | -- If drawCurve equals Standard_False the curve will not be displayed, | |

80 | -- it is used if the curve is a part of some shape and PrimitiveArray | |

81 | -- visualization approach is activated (it is activated by default). | |

82 | ||

7fd59977 | 83 | Add(myclass; aPresentation: Presentation from Prs3d; |

b8ddfc2f | 84 | aCurve : in out Curve from Adaptor3d; |

7fd59977 | 85 | aDeflection : Real from Standard; |

86 | aDrawer : Drawer from Prs3d; | |

87 | Points : out SequenceOfPnt from TColgp; | |

b8ddfc2f | 88 | drawCurve : Boolean from Standard = Standard_True); |

7fd59977 | 89 | |

90 | ---Purpose: adds to the presentation aPresentation the drawing of the curve | |

91 | -- aCurve with respect to the maximal chordial deviation aDeflection. | |

92 | -- The aspect is the current aspect | |

b8ddfc2f | 93 | -- Points give a sequence of curve points. |

7fd59977 | 94 | -- If drawCurve equals Standard_False the curve will not be displayed, |

95 | -- it is used if the curve is a part of some shape and PrimitiveArray | |

96 | -- visualization approach is activated (it is activated by default). | |

97 | ||

7fd59977 | 98 | Add(myclass; aPresentation: Presentation from Prs3d; |

b8ddfc2f | 99 | aCurve : in out Curve from Adaptor3d; |

7fd59977 | 100 | U1, U2 : Real from Standard; |

101 | aDeflection : Real from Standard; | |

b8ddfc2f | 102 | Points : out SequenceOfPnt from TColgp; |

7fd59977 | 103 | anAngle : Real from Standard = 0.2; |

b8ddfc2f | 104 | drawCurve : Boolean from Standard = Standard_True); |

7fd59977 | 105 | |

106 | ---Purpose: adds to the presentation aPresentation the drawing of the curve | |

107 | -- aCurve with respect to the maximal chordial deviation aDeflection. | |

108 | -- The aspect is the current aspect | |

109 | -- The drawing will be limited between the points of parameter U1 and U2. | |

b8ddfc2f | 110 | -- Points give a sequence of curve points. |

7fd59977 | 111 | -- If drawCurve equals Standard_False the curve will not be displayed, |

112 | -- it is used if the curve is a part of some shape and PrimitiveArray | |

113 | -- visualization approach is activated (it is activated by default). | |

114 | ||

7fd59977 | 115 | Match(myclass; X, Y, Z : Length from Quantity; |

116 | aDistance : Length from Quantity; | |

117 | aCurve : Curve from Adaptor3d; | |

118 | aDrawer : Drawer from Prs3d) | |

119 | returns Boolean from Standard; | |

120 | ||

121 | ---Purpose: returns true if the distance between the point (X,Y,Z) and the | |

122 | -- drawing of the curve aCurve with respect of the maximal | |

123 | -- chordial deviation defined by the drawer aDrawer is less then aDistance. | |

124 | ||

125 | ||

7fd59977 | 126 | Match(myclass; X, Y, Z : Length from Quantity; |

127 | aDistance: Length from Quantity; | |

128 | aCurve : Curve from Adaptor3d; | |

129 | U1, U2 : Real from Standard; | |

130 | aDrawer : Drawer from Prs3d) | |

131 | returns Boolean from Standard; | |

132 | ||

133 | ---Purpose: returns true if the distance between the point (X,Y,Z) and the | |

134 | -- drawing of the curve aCurve with respect of the maximal | |

135 | -- chordial deviation defined by the drawer aDrawer is less | |

136 | -- then aDistance. The drawing is considered between the points | |

137 | -- of parameter U1 and U2; | |

138 | ||

7fd59977 | 139 | Match(myclass; X,Y,Z : Length from Quantity; |

140 | aDistance : Length from Quantity; | |

141 | aCurve : Curve from Adaptor3d; | |

142 | aDeflection: Real from Standard; | |

143 | aLimit : Real from Standard; | |

144 | anAngle : Real from Standard = 0.2) | |

145 | returns Boolean from Standard; | |

146 | ||

147 | ---Purpose: returns true if the distance between the point (X,Y,Z) and the | |

148 | -- drawing with respect of the maximal chordial deviation | |

149 | -- aDeflection is less then aDistance. | |

150 | ||

151 | ||

7fd59977 | 152 | Match(myclass; X, Y, Z : Length from Quantity; |

153 | aDistance : Length from Quantity; | |

154 | aCurve : Curve from Adaptor3d; | |

155 | U1, U2 : Real from Standard; | |

156 | aDeflection : Real from Standard; | |

157 | anAngle : Real from Standard = 0.2) | |

158 | returns Boolean from Standard; | |

159 | ||

160 | ---Purpose: returns true if the distance between the point (X,Y,Z) and the | |

161 | -- drawing with respect of the maximal chordial deviation | |

162 | -- aDeflection is less then aDistance. The drawing is considered | |

163 | -- between the points of parameter U1 and U2; | |

164 | ||

7fd59977 | 165 | end DeflectionCurve from StdPrs; |