b311480e |
1 | -- Created on: 1996-12-05 |
2 | -- Created by: Flore Lantheaume/Odile Olivier |
3 | -- Copyright (c) 1996-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
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. |
10 | -- |
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. |
13 | -- |
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. |
20 | |
7fd59977 |
21 | |
22 | |
23 | |
24 | |
25 | class ConcentricRelation from AIS inherits Relation from AIS |
26 | |
27 | ---Purpose: A framework to define a constraint by a relation of |
28 | -- concentricity between two or more interactive datums. |
29 | -- The display of this constraint is also defined. |
30 | -- A plane is used to create an axis along which the |
31 | -- relation of concentricity can be extended. |
32 | |
33 | uses |
34 | |
35 | PresentationManager3d from PrsMgr, |
36 | Presentation from Prs3d, |
37 | Selection from SelectMgr, |
38 | Shape from TopoDS, |
39 | Pnt from gp, |
40 | Dir from gp, |
41 | Projector from Prs3d, |
42 | Transformation from Geom, |
43 | PresentationManager2d from PrsMgr, |
44 | GraphicObject from Graphic2d , |
45 | Plane from Geom |
46 | |
47 | is |
48 | Create (aFShape : Shape from TopoDS; |
49 | aSShape : Shape from TopoDS; |
50 | aPlane : Plane from Geom) |
51 | ---Purpose: Constructs the display object for concentric relations |
52 | -- between shapes. |
53 | -- This object is defined by the two shapes, aFShape |
54 | -- and aSShape and the plane aPlane. |
55 | -- aPlane is provided to create an axis along which the |
56 | -- relation of concentricity can be extended. |
57 | returns mutable ConcentricRelation from AIS; |
58 | |
59 | -- Methods from PresentableObject |
60 | |
61 | Compute(me : mutable; |
62 | aPresentationManager: PresentationManager3d from PrsMgr; |
63 | aPresentation : mutable Presentation from Prs3d; |
64 | aMode : Integer from Standard= 0) |
65 | is redefined static private; |
66 | |
67 | Compute(me:mutable; |
68 | aProjector: Projector from Prs3d; |
69 | aPresentation: mutable Presentation from Prs3d) |
70 | is redefined static private; |
71 | |
72 | Compute(me:mutable; |
73 | aPresentationManager: PresentationManager2d from PrsMgr; |
74 | aPresentation: mutable GraphicObject from Graphic2d; |
75 | aMode: Integer from Standard = 0) |
76 | is redefined static private; |
77 | |
78 | Compute(me : mutable; |
79 | aProjector : Projector from Prs3d; |
80 | aTrsf : Transformation from Geom; |
81 | aPresentation : mutable Presentation from Prs3d) |
82 | is redefined; |
83 | ---Purpose: computes the presentation according to a point of view |
84 | -- given by <aProjector>. |
85 | -- To be Used when the associated degenerated Presentations |
86 | -- have been transformed by <aTrsf> which is not a Pure |
87 | -- Translation. The HLR Prs can't be deducted automatically |
88 | -- WARNING :<aTrsf> must be applied |
89 | -- to the object to display before computation !!! |
90 | |
91 | ComputeTwoEdgesConcentric(me:mutable; |
92 | aPresentationManager: Presentation from Prs3d) |
93 | is private; |
94 | |
95 | ComputeEdgeVertexConcentric(me:mutable; |
96 | aPresentationManager: Presentation from Prs3d) |
97 | is private; |
98 | |
99 | ComputeTwoVerticesConcentric(me:mutable; |
100 | aPresentationManager: Presentation from Prs3d) |
101 | is private; |
102 | |
103 | -- Methods from SelectableObject |
104 | |
105 | ComputeSelection(me : mutable; |
106 | aSelection : mutable Selection from SelectMgr; |
107 | aMode : Integer from Standard) |
108 | is redefined private; |
109 | |
110 | fields |
111 | |
112 | myCenter : Pnt from gp; |
113 | myRad : Real from Standard; |
114 | myDir : Dir from gp; |
115 | myPnt : Pnt from gp; |
116 | |
117 | end ConcentricRelation; |