b311480e |
1 | -- Created on: 1998-01-17 |
2 | -- Created by: Julia GERASIMOVA |
3 | -- Copyright (c) 1998-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 | class EqualRadiusRelation from AIS inherits Relation from AIS |
24 | |
25 | ---Purpose: |
26 | |
27 | uses |
28 | Edge from TopoDS, |
29 | Plane from Geom, |
30 | PresentationManager3d from PrsMgr, |
31 | Presentation from Prs3d, |
32 | Projector from Prs3d, |
33 | Transformation from Geom, |
34 | PresentationManager2d from PrsMgr, |
35 | GraphicObject from Graphic2d, |
36 | Selection from SelectMgr, |
37 | Pnt from gp |
38 | |
39 | is |
40 | Create( aFirstEdge : Edge from TopoDS; |
41 | aSecondEdge : Edge from TopoDS; |
42 | aPlane : Plane from Geom ) |
43 | ---Purpose: Creates equal relation of two arc's radiuses. |
44 | -- If one of edges is not in the given plane, |
45 | -- the presentation method projects it onto the plane. |
46 | returns mutable EqualRadiusRelation from AIS; |
47 | |
48 | -- Methods from PresentableObject |
49 | |
50 | Compute( me : mutable; |
51 | aPresentationManager: PresentationManager3d from PrsMgr; |
52 | aPresentation : mutable Presentation from Prs3d; |
53 | aMode : Integer from Standard= 0 ) |
54 | is redefined static private; |
55 | |
56 | Compute( me : mutable; |
57 | aProjector : Projector from Prs3d; |
58 | aPresentation : mutable Presentation from Prs3d ) |
59 | is redefined static private; |
60 | |
61 | Compute( me : mutable; |
62 | aPresentationManager : PresentationManager2d from PrsMgr; |
63 | aPresentation : mutable GraphicObject from Graphic2d; |
64 | aMode : Integer from Standard = 0 ) |
65 | is redefined static private; |
66 | |
67 | Compute(me : mutable; |
68 | aProjector : Projector from Prs3d; |
69 | aTrsf : Transformation from Geom; |
70 | aPresentation : mutable Presentation from Prs3d) |
71 | is redefined; |
72 | ---Purpose: computes the presentation according to a point of view |
73 | -- given by <aProjector>. |
74 | -- To be Used when the associated degenerated Presentations |
75 | -- have been transformed by <aTrsf> which is not a Pure |
76 | -- Translation. The HLR Prs can't be deducted automatically |
77 | -- WARNING :<aTrsf> must be applied |
78 | -- to the object to display before computation !!! |
79 | |
80 | -- Methods from SelectableObject |
81 | |
82 | ComputeSelection( me : mutable; |
83 | aSelection : mutable Selection from SelectMgr; |
84 | aMode : Integer from Standard) |
85 | is private; |
86 | |
87 | ComputeRadiusPosition(me: mutable) is private; |
88 | |
89 | fields |
90 | |
91 | myFirstCenter : Pnt from gp; |
92 | mySecondCenter : Pnt from gp; |
93 | myFirstPoint : Pnt from gp; |
94 | mySecondPoint : Pnt from gp; |
95 | |
96 | end EqualRadiusRelation; |