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

7fd59977 | 1 | -- File: AIS_IdenticRelation.cdl |

2 | -- Created: Mon Mar 3 15:51:18 1997 | |

3 | -- Author: Jean-Pierre COMBE | |

4 | -- <jpr@chariox.paris1.matra-dtv.fr> | |

5 | ---Copyright: Matra Datavision 1997 | |

6 | ||

7 | ||

8 | class IdenticRelation from AIS inherits Relation from AIS | |

9 | ||

10 | ---Purpose: Constructs a constraint by a relation of identity | |

11 | -- between two or more datums figuring in shape | |

12 | -- Interactive Objects. | |

13 | ||

14 | uses | |

15 | Shape from TopoDS, | |

16 | Vertex from TopoDS, | |

17 | Wire from TopoDS, | |

18 | Presentation from Prs3d, | |

19 | PresentationManager3d from PrsMgr, | |

20 | Selection from SelectMgr, | |

21 | Projector from Prs3d, | |

22 | Transformation from Geom, | |

23 | PresentationManager2d from PrsMgr, | |

24 | GraphicObject from Graphic2d, | |

25 | Plane from Geom, | |

26 | Curve from Geom, | |

27 | Line from Geom, | |

28 | Circle from Geom, | |

29 | Ellipse from Geom, | |

30 | Pnt from gp, | |

31 | Dir from gp | |

32 | ||

33 | is | |

34 | Create(FirstShape : Shape from TopoDS; | |

35 | SecondShape : Shape from TopoDS; | |

36 | aPlane : Plane from Geom) | |

37 | returns mutable IdenticRelation from AIS; | |

38 | ---Purpose: | |

39 | -- Initializes the relation of identity between the two | |

40 | -- entities, FirstShape and SecondShape. The plane | |

41 | -- aPlane is initialized in case a visual reference is | |

42 | -- needed to show identity. | |

43 | ||

44 | IsMovable(me) returns Boolean from Standard | |

45 | ---C++: inline | |

46 | ---Purpose: | |

47 | -- Returns true if the interactive object is movable. | |

48 | is redefined; | |

49 | ||

50 | -- Methods from PresentableObject | |

51 | ||

52 | Compute(me : mutable; | |

53 | aPresentationManager: PresentationManager3d from PrsMgr; | |

54 | aPresentation : mutable Presentation from Prs3d; | |

55 | aMode : Integer from Standard= 0) | |

56 | is redefined private; | |

57 | ||

58 | Compute(me:mutable; | |

59 | aProjector: Projector from Prs3d; | |

60 | aPresentation: mutable Presentation from Prs3d) | |

61 | is redefined static private; | |

62 | ||

63 | Compute(me:mutable; | |

64 | aPresentationManager: PresentationManager2d from PrsMgr; | |

65 | aPresentation: mutable GraphicObject from Graphic2d; | |

66 | aMode: Integer from Standard = 0) | |

67 | is redefined static private; | |

68 | ||

69 | Compute(me : mutable; | |

70 | aProjector : Projector from Prs3d; | |

71 | aTrsf : Transformation from Geom; | |

72 | aPresentation : mutable Presentation from Prs3d) | |

73 | is redefined; | |

74 | ---Purpose: computes the presentation according to a point of view | |

75 | -- given by <aProjector>. | |

76 | -- To be Used when the associated degenerated Presentations | |

77 | -- have been transformed by <aTrsf> which is not a Pure | |

78 | -- Translation. The HLR Prs can't be deducted automatically | |

79 | -- WARNING :<aTrsf> must be applied | |

80 | -- to the object to display before computation !!! | |

81 | ||

82 | -- Methods from SelectableObject | |

83 | ||

84 | ComputeSelection(me : mutable; | |

85 | aSelection : mutable Selection from SelectMgr; | |

86 | aMode : Integer from Standard) | |

87 | is redefined private; | |

88 | ||

89 | -- | |

90 | -- Computation private methods | |

91 | -- | |

92 | ||

93 | ComputeOneEdgeOVertexPresentation(me: mutable; | |

94 | aPresentation : mutable Presentation from Prs3d) | |

95 | is private; | |

96 | ||

97 | ComputeTwoEdgesPresentation(me: mutable; | |

98 | aPresentation : mutable Presentation from Prs3d) | |

99 | is private; | |

100 | ||

101 | ComputeTwoLinesPresentation(me: mutable; | |

102 | aPresentation : mutable Presentation from Prs3d; | |

103 | aLin : Line from Geom; | |

104 | Pnt1On1 : in out Pnt from gp; | |

105 | Pnt2On1 : in out Pnt from gp; | |

106 | Pnt1On2 : in out Pnt from gp; | |

107 | Pnt2On2 : in out Pnt from gp; | |

108 | isInf1 : Boolean from Standard; | |

109 | isInf2 : Boolean from Standard) | |

110 | is private; | |

111 | ||

112 | ComputeTwoCirclesPresentation(me: mutable; | |

113 | aPresentation : mutable Presentation from Prs3d; | |

114 | aCircle : Circle from Geom; | |

115 | Pnt1On1 : Pnt from gp; | |

116 | Pnt2On1 : Pnt from gp; | |

117 | Pnt1On2 : Pnt from gp; | |

118 | Pnt2On2 : Pnt from gp) | |

119 | is private; | |

120 | ||

121 | -- jfa 17/10/2000 | |

122 | ComputeAutoArcPresentation(me: mutable; | |

123 | aCircle : Circle from Geom; | |

124 | firstp : Pnt from gp; | |

125 | lastp : Pnt from gp; | |

126 | isstatic: Boolean from Standard = Standard_False) | |

127 | ---Purpose: Computes the presentation of the identic constraint | |

128 | -- between 2 arcs in the case of automatic presentation | |

129 | is private; | |

130 | ||

131 | ComputeNotAutoCircPresentation(me: mutable; | |

132 | aCircle : Circle from Geom) | |

133 | ---Purpose: Computes the presentation of the identic constraint | |

134 | -- between 2 circles in the case of non automatic presentation | |

135 | is private; | |

136 | ||

137 | ComputeNotAutoArcPresentation(me: mutable; | |

138 | aCircle : Circle from Geom; | |

139 | pntfirst: Pnt from gp; | |

140 | pntlast : Pnt from gp) | |

141 | ---Purpose: Computes the presentation of the identic constraint | |

142 | -- between 2 arcs in the case of non automatic presentation | |

143 | is private; | |

144 | -- jfa 17/10/2000 end | |

145 | ||

146 | -- jfa 10/10/2000 | |

147 | ComputeTwoEllipsesPresentation(me: mutable; | |

148 | aPrs : mutable Presentation from Prs3d; | |

149 | anEll : Ellipse from Geom; | |

150 | Pnt1On1 : Pnt from gp; | |

151 | Pnt2On1 : Pnt from gp; | |

152 | Pnt1On2 : Pnt from gp; | |

153 | Pnt2On2 : Pnt from gp) | |

154 | is private; | |

155 | -- jfa 10/10/2000 end | |

156 | ||

157 | -- jfa 18/10/2000 | |

158 | ComputeAutoArcPresentation(me: mutable; | |

159 | theEll : Ellipse from Geom; | |

160 | firstp : Pnt from gp; | |

161 | lastp : Pnt from gp; | |

162 | isstatic: Boolean from Standard = Standard_False) | |

163 | ---Purpose: Computes the presentation of the identic constraint | |

164 | -- between 2 arcs in the case of automatic presentation | |

165 | is private; | |

166 | ||

167 | ComputeNotAutoElipsPresentation(me: mutable; | |

168 | theEll : Ellipse from Geom) | |

169 | ---Purpose: Computes the presentation of the identic constraint | |

170 | -- between 2 ellipses in the case of non automatic presentation | |

171 | is private; | |

172 | ||

173 | ComputeNotAutoArcPresentation(me: mutable; | |

174 | theEll : Ellipse from Geom; | |

175 | pntfirst: Pnt from gp; | |

176 | pntlast : Pnt from gp) | |

177 | ---Purpose: Computes the presentation of the identic constraint | |

178 | -- between 2 arcs in the case of non automatic presentation | |

179 | is private; | |

180 | -- jfa 18/10/2000 end | |

181 | ||

182 | ComputeTwoVerticesPresentation(me: mutable; | |

183 | aPresentation : mutable Presentation from Prs3d) | |

184 | is private; | |

185 | ||

186 | ComputeSegSize(me) | |

187 | returns Real from Standard | |

188 | is private; | |

189 | ||

190 | ComputeDirection(me; aWire : Wire from TopoDS; | |

191 | aVertex : Vertex from TopoDS; | |

192 | aDir : out Dir from gp) | |

193 | returns Boolean from Standard | |

194 | is private; | |

195 | ||

196 | ComputeLineDirection(me; aLin : Line from Geom; | |

197 | anExtremity : Pnt from gp) | |

198 | returns Dir from gp | |

199 | is private; | |

200 | ||

201 | ComputeCircleDirection(me; aCirc : Circle from Geom; | |

202 | ConnectedVertex : Vertex from TopoDS) | |

203 | returns Dir from gp | |

204 | is private; | |

205 | ||

206 | fields | |

207 | ||

208 | isCircle : Boolean from Standard; | |

209 | myFAttach : Pnt from gp; | |

210 | mySAttach : Pnt from gp; | |

211 | myCenter : Pnt from gp; | |

212 | ||

213 | end IdenticRelation; |