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
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class IdenticRelation from AIS inherits Relation from AIS
19 ---Purpose: Constructs a constraint by a relation of identity
20 -- between two or more datums figuring in shape
21 -- Interactive Objects.
27 Presentation from Prs3d,
28 PresentationManager3d from PrsMgr,
29 Selection from SelectMgr,
31 Transformation from Geom,
41 Create(FirstShape : Shape from TopoDS;
42 SecondShape : Shape from TopoDS;
43 aPlane : Plane from Geom)
44 returns IdenticRelation from AIS;
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.
51 IsMovable(me) returns Boolean from Standard
54 -- Returns true if the interactive object is movable.
57 -- Methods from PresentableObject
60 aPresentationManager: PresentationManager3d from PrsMgr;
61 aPresentation : Presentation from Prs3d;
62 aMode : Integer from Standard= 0)
66 aProjector: Projector from Prs3d;
67 aPresentation: Presentation from Prs3d)
68 is redefined static private;
71 aProjector : Projector from Prs3d;
72 aTrsf : Transformation from Geom;
73 aPresentation : Presentation from Prs3d)
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 !!!
83 -- Methods from SelectableObject
85 ComputeSelection(me : mutable;
86 aSelection : Selection from SelectMgr;
87 aMode : Integer from Standard)
91 -- Computation private methods
94 ComputeOneEdgeOVertexPresentation(me: mutable;
95 aPresentation : Presentation from Prs3d)
98 ComputeTwoEdgesPresentation(me: mutable;
99 aPresentation : Presentation from Prs3d)
102 ComputeTwoLinesPresentation(me: mutable;
103 aPresentation : 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)
113 ComputeTwoCirclesPresentation(me: mutable;
114 aPresentation : 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)
123 ComputeAutoArcPresentation(me: mutable;
124 aCircle : Circle from Geom;
125 firstp : 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
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
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
145 -- jfa 17/10/2000 end
148 ComputeTwoEllipsesPresentation(me: mutable;
149 aPrs : 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)
156 -- jfa 10/10/2000 end
159 ComputeAutoArcPresentation(me: mutable;
160 theEll : Ellipse from Geom;
161 firstp : 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
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
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
181 -- jfa 18/10/2000 end
183 ComputeTwoVerticesPresentation(me: mutable;
184 aPresentation : Presentation from Prs3d)
188 returns Real from Standard
191 ComputeDirection(me; aWire : Wire from TopoDS;
192 aVertex : Vertex from TopoDS;
193 aDir : out Dir from gp)
194 returns Boolean from Standard
197 ComputeLineDirection(me; aLin : Line from Geom;
198 anExtremity : Pnt from gp)
202 ComputeCircleDirection(me; aCirc : Circle from Geom;
203 ConnectedVertex : Vertex from TopoDS)
209 isCircle : Boolean from Standard;
210 myFAttach : Pnt from gp;
211 mySAttach : Pnt from gp;
212 myCenter : Pnt from gp;