1 -- Created on: 1997-03-03
2 -- Created by: Jean-Pierre COMBE
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
23 class IdenticRelation from AIS inherits Relation from AIS
25 ---Purpose: Constructs a constraint by a relation of identity
26 -- between two or more datums figuring in shape
27 -- Interactive Objects.
33 Presentation from Prs3d,
34 PresentationManager3d from PrsMgr,
35 Selection from SelectMgr,
37 Transformation from Geom,
47 Create(FirstShape : Shape from TopoDS;
48 SecondShape : Shape from TopoDS;
49 aPlane : Plane from Geom)
50 returns mutable IdenticRelation from AIS;
52 -- Initializes the relation of identity between the two
53 -- entities, FirstShape and SecondShape. The plane
54 -- aPlane is initialized in case a visual reference is
55 -- needed to show identity.
57 IsMovable(me) returns Boolean from Standard
60 -- Returns true if the interactive object is movable.
63 -- Methods from PresentableObject
66 aPresentationManager: PresentationManager3d from PrsMgr;
67 aPresentation : mutable Presentation from Prs3d;
68 aMode : Integer from Standard= 0)
72 aProjector: Projector from Prs3d;
73 aPresentation: mutable Presentation from Prs3d)
74 is redefined static private;
77 aProjector : Projector from Prs3d;
78 aTrsf : Transformation from Geom;
79 aPresentation : mutable Presentation from Prs3d)
81 ---Purpose: computes the presentation according to a point of view
82 -- given by <aProjector>.
83 -- To be Used when the associated degenerated Presentations
84 -- have been transformed by <aTrsf> which is not a Pure
85 -- Translation. The HLR Prs can't be deducted automatically
86 -- WARNING :<aTrsf> must be applied
87 -- to the object to display before computation !!!
89 -- Methods from SelectableObject
91 ComputeSelection(me : mutable;
92 aSelection : mutable Selection from SelectMgr;
93 aMode : Integer from Standard)
97 -- Computation private methods
100 ComputeOneEdgeOVertexPresentation(me: mutable;
101 aPresentation : mutable Presentation from Prs3d)
104 ComputeTwoEdgesPresentation(me: mutable;
105 aPresentation : mutable Presentation from Prs3d)
108 ComputeTwoLinesPresentation(me: mutable;
109 aPresentation : mutable Presentation from Prs3d;
110 aLin : Line from Geom;
111 Pnt1On1 : in out Pnt from gp;
112 Pnt2On1 : in out Pnt from gp;
113 Pnt1On2 : in out Pnt from gp;
114 Pnt2On2 : in out Pnt from gp;
115 isInf1 : Boolean from Standard;
116 isInf2 : Boolean from Standard)
119 ComputeTwoCirclesPresentation(me: mutable;
120 aPresentation : mutable Presentation from Prs3d;
121 aCircle : Circle from Geom;
122 Pnt1On1 : Pnt from gp;
123 Pnt2On1 : Pnt from gp;
124 Pnt1On2 : Pnt from gp;
125 Pnt2On2 : Pnt from gp)
129 ComputeAutoArcPresentation(me: mutable;
130 aCircle : Circle from Geom;
131 firstp : Pnt from gp;
133 isstatic: Boolean from Standard = Standard_False)
134 ---Purpose: Computes the presentation of the identic constraint
135 -- between 2 arcs in the case of automatic presentation
138 ComputeNotAutoCircPresentation(me: mutable;
139 aCircle : Circle from Geom)
140 ---Purpose: Computes the presentation of the identic constraint
141 -- between 2 circles in the case of non automatic presentation
144 ComputeNotAutoArcPresentation(me: mutable;
145 aCircle : Circle from Geom;
146 pntfirst: Pnt from gp;
147 pntlast : Pnt from gp)
148 ---Purpose: Computes the presentation of the identic constraint
149 -- between 2 arcs in the case of non automatic presentation
151 -- jfa 17/10/2000 end
154 ComputeTwoEllipsesPresentation(me: mutable;
155 aPrs : mutable Presentation from Prs3d;
156 anEll : Ellipse from Geom;
157 Pnt1On1 : Pnt from gp;
158 Pnt2On1 : Pnt from gp;
159 Pnt1On2 : Pnt from gp;
160 Pnt2On2 : Pnt from gp)
162 -- jfa 10/10/2000 end
165 ComputeAutoArcPresentation(me: mutable;
166 theEll : Ellipse from Geom;
167 firstp : Pnt from gp;
169 isstatic: Boolean from Standard = Standard_False)
170 ---Purpose: Computes the presentation of the identic constraint
171 -- between 2 arcs in the case of automatic presentation
174 ComputeNotAutoElipsPresentation(me: mutable;
175 theEll : Ellipse from Geom)
176 ---Purpose: Computes the presentation of the identic constraint
177 -- between 2 ellipses in the case of non automatic presentation
180 ComputeNotAutoArcPresentation(me: mutable;
181 theEll : Ellipse from Geom;
182 pntfirst: Pnt from gp;
183 pntlast : Pnt from gp)
184 ---Purpose: Computes the presentation of the identic constraint
185 -- between 2 arcs in the case of non automatic presentation
187 -- jfa 18/10/2000 end
189 ComputeTwoVerticesPresentation(me: mutable;
190 aPresentation : mutable Presentation from Prs3d)
194 returns Real from Standard
197 ComputeDirection(me; aWire : Wire from TopoDS;
198 aVertex : Vertex from TopoDS;
199 aDir : out Dir from gp)
200 returns Boolean from Standard
203 ComputeLineDirection(me; aLin : Line from Geom;
204 anExtremity : Pnt from gp)
208 ComputeCircleDirection(me; aCirc : Circle from Geom;
209 ConnectedVertex : Vertex from TopoDS)
215 isCircle : Boolean from Standard;
216 myFAttach : Pnt from gp;
217 mySAttach : Pnt from gp;
218 myCenter : Pnt from gp;