summary | shortlog | log | commit | commitdiff | tree

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

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

... / ...

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

1 | -- Created on: 1997-03-03 | |

2 | -- Created by: Jean-Pierre COMBE | |

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

9 | -- the terms of the GNU Lesser General Public License 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 IdenticRelation from AIS inherits Relation from AIS | |

18 | ||

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

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

21 | -- Interactive Objects. | |

22 | ||

23 | uses | |

24 | Shape from TopoDS, | |

25 | Vertex from TopoDS, | |

26 | Wire from TopoDS, | |

27 | Presentation from Prs3d, | |

28 | PresentationManager3d from PrsMgr, | |

29 | Selection from SelectMgr, | |

30 | Projector from Prs3d, | |

31 | Transformation from Geom, | |

32 | Plane from Geom, | |

33 | Curve from Geom, | |

34 | Line from Geom, | |

35 | Circle from Geom, | |

36 | Ellipse from Geom, | |

37 | Pnt from gp, | |

38 | Dir from gp | |

39 | ||

40 | is | |

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

42 | SecondShape : Shape from TopoDS; | |

43 | aPlane : Plane from Geom) | |

44 | returns mutable IdenticRelation from AIS; | |

45 | ---Purpose: | |

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

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

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

49 | -- needed to show identity. | |

50 | ||

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

52 | ---C++: inline | |

53 | ---Purpose: | |

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

55 | is redefined; | |

56 | ||

57 | -- Methods from PresentableObject | |

58 | ||

59 | Compute(me : mutable; | |

60 | aPresentationManager: PresentationManager3d from PrsMgr; | |

61 | aPresentation : mutable Presentation from Prs3d; | |

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

63 | is redefined private; | |

64 | ||

65 | Compute(me:mutable; | |

66 | aProjector: Projector from Prs3d; | |

67 | aPresentation: mutable Presentation from Prs3d) | |

68 | is redefined static private; | |

69 | ||

70 | Compute(me : mutable; | |

71 | aProjector : Projector from Prs3d; | |

72 | aTrsf : Transformation from Geom; | |

73 | aPresentation : mutable Presentation from Prs3d) | |

74 | is redefined; | |

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

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

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

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

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

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

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

82 | ||

83 | -- Methods from SelectableObject | |

84 | ||

85 | ComputeSelection(me : mutable; | |

86 | aSelection : mutable Selection from SelectMgr; | |

87 | aMode : Integer from Standard) | |

88 | is redefined private; | |

89 | ||

90 | -- | |

91 | -- Computation private methods | |

92 | -- | |

93 | ||

94 | ComputeOneEdgeOVertexPresentation(me: mutable; | |

95 | aPresentation : mutable Presentation from Prs3d) | |

96 | is private; | |

97 | ||

98 | ComputeTwoEdgesPresentation(me: mutable; | |

99 | aPresentation : mutable Presentation from Prs3d) | |

100 | is private; | |

101 | ||

102 | ComputeTwoLinesPresentation(me: mutable; | |

103 | aPresentation : mutable Presentation from Prs3d; | |

104 | aLin : Line from Geom; | |

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

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

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

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

109 | isInf1 : Boolean from Standard; | |

110 | isInf2 : Boolean from Standard) | |

111 | is private; | |

112 | ||

113 | ComputeTwoCirclesPresentation(me: mutable; | |

114 | aPresentation : mutable Presentation from Prs3d; | |

115 | aCircle : Circle from Geom; | |

116 | Pnt1On1 : Pnt from gp; | |

117 | Pnt2On1 : Pnt from gp; | |

118 | Pnt1On2 : Pnt from gp; | |

119 | Pnt2On2 : Pnt from gp) | |

120 | is private; | |

121 | ||

122 | -- jfa 17/10/2000 | |

123 | ComputeAutoArcPresentation(me: mutable; | |

124 | aCircle : Circle from Geom; | |

125 | firstp : Pnt from gp; | |

126 | lastp : Pnt from gp; | |

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

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

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

130 | is private; | |

131 | ||

132 | ComputeNotAutoCircPresentation(me: mutable; | |

133 | aCircle : Circle from Geom) | |

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

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

136 | is private; | |

137 | ||

138 | ComputeNotAutoArcPresentation(me: mutable; | |

139 | aCircle : Circle from Geom; | |

140 | pntfirst: Pnt from gp; | |

141 | pntlast : Pnt from gp) | |

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

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

144 | is private; | |

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

146 | ||

147 | -- jfa 10/10/2000 | |

148 | ComputeTwoEllipsesPresentation(me: mutable; | |

149 | aPrs : mutable Presentation from Prs3d; | |

150 | anEll : Ellipse from Geom; | |

151 | Pnt1On1 : Pnt from gp; | |

152 | Pnt2On1 : Pnt from gp; | |

153 | Pnt1On2 : Pnt from gp; | |

154 | Pnt2On2 : Pnt from gp) | |

155 | is private; | |

156 | -- jfa 10/10/2000 end | |

157 | ||

158 | -- jfa 18/10/2000 | |

159 | ComputeAutoArcPresentation(me: mutable; | |

160 | theEll : Ellipse from Geom; | |

161 | firstp : Pnt from gp; | |

162 | lastp : Pnt from gp; | |

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

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

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

166 | is private; | |

167 | ||

168 | ComputeNotAutoElipsPresentation(me: mutable; | |

169 | theEll : Ellipse from Geom) | |

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

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

172 | is private; | |

173 | ||

174 | ComputeNotAutoArcPresentation(me: mutable; | |

175 | theEll : Ellipse from Geom; | |

176 | pntfirst: Pnt from gp; | |

177 | pntlast : Pnt from gp) | |

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

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

180 | is private; | |

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

182 | ||

183 | ComputeTwoVerticesPresentation(me: mutable; | |

184 | aPresentation : mutable Presentation from Prs3d) | |

185 | is private; | |

186 | ||

187 | ComputeSegSize(me) | |

188 | returns Real from Standard | |

189 | is private; | |

190 | ||

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

192 | aVertex : Vertex from TopoDS; | |

193 | aDir : out Dir from gp) | |

194 | returns Boolean from Standard | |

195 | is private; | |

196 | ||

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

198 | anExtremity : Pnt from gp) | |

199 | returns Dir from gp | |

200 | is private; | |

201 | ||

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

203 | ConnectedVertex : Vertex from TopoDS) | |

204 | returns Dir from gp | |

205 | is private; | |

206 | ||

207 | fields | |

208 | ||

209 | isCircle : Boolean from Standard; | |

210 | myFAttach : Pnt from gp; | |

211 | mySAttach : Pnt from gp; | |

212 | myCenter : Pnt from gp; | |

213 | ||

214 | end IdenticRelation; |