1 -- Created on: 2000-10-20
2 -- Created by: Julia DOROVSKIKH
3 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
21 class MidPointRelation from AIS inherits Relation from AIS
23 ---Purpose: presentation of equal distance to point myMidPoint
26 ExtendedString from TCollection,
28 Presentation from Prs3d,
29 PresentationManager2d from PrsMgr,
30 PresentationManager3d from PrsMgr,
31 Selection from SelectMgr,
32 GraphicObject from Graphic2d,
39 Transformation from Geom,
43 Create(aSymmTool : Shape from TopoDS;
44 FirstShape : Shape from TopoDS;
45 SecondShape : Shape from TopoDS;
46 aPlane : Plane from Geom)
47 returns mutable MidPointRelation from AIS;
49 IsMovable(me) returns Boolean from Standard
53 SetTool(me: mutable; aMidPointTool : Shape from TopoDS);
58 ---C++: return const &
59 returns Shape from TopoDS;
61 -- Methods from PresentableObject
63 aPresentationManager: PresentationManager3d from PrsMgr;
64 aPresentation : mutable Presentation from Prs3d;
65 aMode : Integer from Standard= 0)
66 is redefined static private;
69 aProjector : Projector from Prs3d;
70 aPresentation: mutable Presentation from Prs3d)
71 is redefined static private;
74 aPresentationManager: PresentationManager2d from PrsMgr;
75 aPresentation : mutable GraphicObject from Graphic2d;
76 aMode : Integer from Standard = 0)
77 is redefined static private;
80 aProjector : Projector from Prs3d;
81 aTrsf : Transformation from Geom;
82 aPresentation : mutable Presentation from Prs3d)
84 ---Purpose: Computes the presentation according to a point of view
85 -- given by <aProjector>.
86 -- To be Used when the associated degenerated Presentations
87 -- have been transformed by <aTrsf> which is not a Pure
88 -- Translation. The HLR Prs can't be deducted automatically
89 -- WARNING :<aTrsf> must be applied
90 -- to the object to display before computation !!!
92 -- Methods from SelectableObject
93 ComputeSelection(me : mutable;
94 aSelection : mutable Selection from SelectMgr;
95 aMode : Integer from Standard)is private;
97 -- Computation private methods
98 ComputeFaceFromPnt(me: mutable; aprs : mutable Presentation from Prs3d; first : Boolean from Standard)
101 ComputeEdgeFromPnt(me: mutable; aprs : mutable Presentation from Prs3d; first : Boolean from Standard)
104 ComputeVertexFromPnt(me: mutable; aprs : mutable Presentation from Prs3d; first : Boolean from Standard)
108 ComputePointsOnLine(me: mutable; aLin : Lin from gp;
109 first : Boolean from Standard)
112 ComputePointsOnLine(me: mutable; pnt1,pnt2 : Pnt from gp;
113 first : Boolean from Standard)
116 ComputePointsOnCirc(me: mutable; aCirc : Circ from gp; pnt1,pnt2 : Pnt from gp;
117 first : Boolean from Standard)
120 ComputePointsOnElips(me: mutable; anEll : Elips from gp; pnt1,pnt2 : Pnt from gp;
121 first : Boolean from Standard)
123 ---Purpose: ComputePointsOn... methods set myFAttach, myFirstPnt and myLastPnt
124 -- from the following initial data: curve, end points, myMidPoint.
125 -- End points (pnt1 & pnt2) and curve define the trimmed curve.
126 -- If end points are equal, curve is not trimmed (line - special case).
130 -- . circle . myLastPnt
132 -- . pnt1 . myFAttach
133 -- \ arc / . myMidPoint
134 -- .______. myFirstPnt
136 myTool : Shape from TopoDS;
137 myMidPoint : Pnt from gp; -- point of symmetry
139 myFAttach : Pnt from gp; -- position on myFShape to be connected with myMidPoint by segment
140 myFirstPnt1 : Pnt from gp; -- points on myFShape,
141 myFirstPnt2 : Pnt from gp; -- defining a segment of it to be drawn
143 mySAttach : Pnt from gp; -- position on mySShape to be connected with myMidPoint by segment
144 mySecondPnt1 : Pnt from gp; -- points on mySShape,
145 mySecondPnt2 : Pnt from gp; -- defining a segment of it to be drawn
147 end MidPointRelation;