1 -- File: AIS_MidPointRelation.cdl
2 -- Created: Fri Oct 20 15:57:32 2000
3 -- Author: Julia DOROVSKIKH
4 -- <jfa@androx.nnov.matra-dtv.fr>
5 ---Copyright: Matra Datavision 2000
7 class MidPointRelation from AIS inherits Relation from AIS
9 ---Purpose: presentation of equal distance to point myMidPoint
12 ExtendedString from TCollection,
14 Presentation from Prs3d,
15 PresentationManager2d from PrsMgr,
16 PresentationManager3d from PrsMgr,
17 Selection from SelectMgr,
18 GraphicObject from Graphic2d,
25 Transformation from Geom,
29 Create(aSymmTool : Shape from TopoDS;
30 FirstShape : Shape from TopoDS;
31 SecondShape : Shape from TopoDS;
32 aPlane : Plane from Geom)
33 returns mutable MidPointRelation from AIS;
35 IsMovable(me) returns Boolean from Standard
39 SetTool(me: mutable; aMidPointTool : Shape from TopoDS);
44 ---C++: return const &
45 returns Shape from TopoDS;
47 -- Methods from PresentableObject
49 aPresentationManager: PresentationManager3d from PrsMgr;
50 aPresentation : mutable Presentation from Prs3d;
51 aMode : Integer from Standard= 0)
52 is redefined static private;
55 aProjector : Projector from Prs3d;
56 aPresentation: mutable Presentation from Prs3d)
57 is redefined static private;
60 aPresentationManager: PresentationManager2d from PrsMgr;
61 aPresentation : mutable GraphicObject from Graphic2d;
62 aMode : Integer from Standard = 0)
63 is redefined static private;
66 aProjector : Projector from Prs3d;
67 aTrsf : Transformation from Geom;
68 aPresentation : mutable Presentation from Prs3d)
70 ---Purpose: Computes the presentation according to a point of view
71 -- given by <aProjector>.
72 -- To be Used when the associated degenerated Presentations
73 -- have been transformed by <aTrsf> which is not a Pure
74 -- Translation. The HLR Prs can't be deducted automatically
75 -- WARNING :<aTrsf> must be applied
76 -- to the object to display before computation !!!
78 -- Methods from SelectableObject
79 ComputeSelection(me : mutable;
80 aSelection : mutable Selection from SelectMgr;
81 aMode : Integer from Standard)is private;
83 -- Computation private methods
84 ComputeFaceFromPnt(me: mutable; aprs : mutable Presentation from Prs3d; first : Boolean from Standard)
87 ComputeEdgeFromPnt(me: mutable; aprs : mutable Presentation from Prs3d; first : Boolean from Standard)
90 ComputeVertexFromPnt(me: mutable; aprs : mutable Presentation from Prs3d; first : Boolean from Standard)
94 ComputePointsOnLine(me: mutable; aLin : Lin from gp;
95 first : Boolean from Standard)
98 ComputePointsOnLine(me: mutable; pnt1,pnt2 : Pnt from gp;
99 first : Boolean from Standard)
102 ComputePointsOnCirc(me: mutable; aCirc : Circ from gp; pnt1,pnt2 : Pnt from gp;
103 first : Boolean from Standard)
106 ComputePointsOnElips(me: mutable; anEll : Elips from gp; pnt1,pnt2 : Pnt from gp;
107 first : Boolean from Standard)
109 ---Purpose: ComputePointsOn... methods set myFAttach, myFirstPnt and myLastPnt
110 -- from the following initial data: curve, end points, myMidPoint.
111 -- End points (pnt1 & pnt2) and curve define the trimmed curve.
112 -- If end points are equal, curve is not trimmed (line - special case).
116 -- . circle . myLastPnt
118 -- . pnt1 . myFAttach
119 -- \ arc / . myMidPoint
120 -- .______. myFirstPnt
122 myTool : Shape from TopoDS;
123 myMidPoint : Pnt from gp; -- point of symmetry
125 myFAttach : Pnt from gp; -- position on myFShape to be connected with myMidPoint by segment
126 myFirstPnt1 : Pnt from gp; -- points on myFShape,
127 myFirstPnt2 : Pnt from gp; -- defining a segment of it to be drawn
129 mySAttach : Pnt from gp; -- position on mySShape to be connected with myMidPoint by segment
130 mySecondPnt1 : Pnt from gp; -- points on mySShape,
131 mySecondPnt2 : Pnt from gp; -- defining a segment of it to be drawn
133 end MidPointRelation;