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 PresentationManager3d from PrsMgr,
30 Selection from SelectMgr,
37 Transformation from Geom,
41 Create(aSymmTool : Shape from TopoDS;
42 FirstShape : Shape from TopoDS;
43 SecondShape : Shape from TopoDS;
44 aPlane : Plane from Geom)
45 returns mutable MidPointRelation from AIS;
47 IsMovable(me) returns Boolean from Standard
51 SetTool(me: mutable; aMidPointTool : Shape from TopoDS);
56 ---C++: return const &
57 returns Shape from TopoDS;
59 -- Methods from PresentableObject
61 aPresentationManager: PresentationManager3d from PrsMgr;
62 aPresentation : mutable Presentation from Prs3d;
63 aMode : Integer from Standard= 0)
64 is redefined static private;
67 aProjector : Projector from Prs3d;
68 aPresentation: mutable Presentation from Prs3d)
69 is redefined static private;
72 aProjector : Projector from Prs3d;
73 aTrsf : Transformation from Geom;
74 aPresentation : mutable Presentation from Prs3d)
76 ---Purpose: Computes the presentation according to a point of view
77 -- given by <aProjector>.
78 -- To be Used when the associated degenerated Presentations
79 -- have been transformed by <aTrsf> which is not a Pure
80 -- Translation. The HLR Prs can't be deducted automatically
81 -- WARNING :<aTrsf> must be applied
82 -- to the object to display before computation !!!
84 -- Methods from SelectableObject
85 ComputeSelection(me : mutable;
86 aSelection : mutable Selection from SelectMgr;
87 aMode : Integer from Standard)is private;
89 -- Computation private methods
90 ComputeFaceFromPnt(me: mutable; aprs : mutable Presentation from Prs3d; first : Boolean from Standard)
93 ComputeEdgeFromPnt(me: mutable; aprs : mutable Presentation from Prs3d; first : Boolean from Standard)
96 ComputeVertexFromPnt(me: mutable; aprs : mutable Presentation from Prs3d; first : Boolean from Standard)
100 ComputePointsOnLine(me: mutable; aLin : Lin from gp;
101 first : Boolean from Standard)
104 ComputePointsOnLine(me: mutable; pnt1,pnt2 : Pnt from gp;
105 first : Boolean from Standard)
108 ComputePointsOnCirc(me: mutable; aCirc : Circ from gp; pnt1,pnt2 : Pnt from gp;
109 first : Boolean from Standard)
112 ComputePointsOnElips(me: mutable; anEll : Elips from gp; pnt1,pnt2 : Pnt from gp;
113 first : Boolean from Standard)
115 ---Purpose: ComputePointsOn... methods set myFAttach, myFirstPnt and myLastPnt
116 -- from the following initial data: curve, end points, myMidPoint.
117 -- End points (pnt1 & pnt2) and curve define the trimmed curve.
118 -- If end points are equal, curve is not trimmed (line - special case).
122 -- . circle . myLastPnt
124 -- . pnt1 . myFAttach
125 -- \ arc / . myMidPoint
126 -- .______. myFirstPnt
128 myTool : Shape from TopoDS;
129 myMidPoint : Pnt from gp; -- point of symmetry
131 myFAttach : Pnt from gp; -- position on myFShape to be connected with myMidPoint by segment
132 myFirstPnt1 : Pnt from gp; -- points on myFShape,
133 myFirstPnt2 : Pnt from gp; -- defining a segment of it to be drawn
135 mySAttach : Pnt from gp; -- position on mySShape to be connected with myMidPoint by segment
136 mySecondPnt1 : Pnt from gp; -- points on mySShape,
137 mySecondPnt2 : Pnt from gp; -- defining a segment of it to be drawn
139 end MidPointRelation;