b311480e |
1 | -- Created on: 1998-01-22 |
2 | -- Created by: Sergey ZARITCHNY |
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 MaxRadiusDimension from AIS inherits EllipseRadiusDimension from AIS |
24 | |
25 | ---Purpose: |
26 | -- Ellipse Max radius dimension of a Shape which can be Edge |
27 | -- or Face (planar or cylindrical(surface of extrusion or |
28 | -- surface of offset)) |
29 | |
30 | uses |
31 | Shape from TopoDS, |
32 | Elips from gp, |
33 | Pnt from gp, |
34 | Pln from gp, |
35 | Ellipse from Geom, |
36 | OffsetCurve from Geom, |
37 | Plane from Geom, |
38 | Surface from Geom, |
39 | Presentation from Prs3d, |
40 | PresentationManager3d from PrsMgr, |
41 | Selection from SelectMgr, |
42 | Projector from Prs3d, |
128cc8df |
43 | Transformation from Geom, |
7fd59977 |
44 | ExtendedString from TCollection, |
45 | ArrowSide from DsgPrs, |
46 | KindOfSurface from AIS, |
47 | KindOfDimension from AIS |
48 | |
49 | raises ConstructionError from Standard |
50 | |
51 | is |
52 | |
53 | Create (aShape : Shape from TopoDS; |
54 | aVal : Real from Standard; |
55 | aText : ExtendedString from TCollection) |
56 | ---Purpose: Max Ellipse radius dimension |
57 | -- Shape can be edge , planar face or cylindrical face |
58 | -- |
59 | returns mutable MaxRadiusDimension from AIS; |
60 | |
61 | Create (aShape : Shape from TopoDS; |
62 | aVal : Real from Standard; |
63 | aText : ExtendedString from TCollection; |
64 | aPosition : Pnt from gp; |
65 | aSymbolPrs : ArrowSide from DsgPrs; |
66 | anArrowSize : Real from Standard = 0.0) |
67 | ---Purpose: Max Ellipse radius dimension with position |
68 | -- Shape can be edge , planar face or cylindrical face |
69 | -- |
70 | returns mutable MaxRadiusDimension from AIS; |
71 | |
72 | |
73 | |
74 | |
75 | -- Methods from PresentableObject |
76 | |
77 | Compute(me : mutable; |
78 | aPresentationManager: PresentationManager3d from PrsMgr; |
79 | aPresentation : mutable Presentation from Prs3d; |
80 | aMode : Integer from Standard= 0) |
81 | is redefined private; |
82 | |
83 | Compute(me:mutable; |
84 | aProjector: Projector from Prs3d; |
85 | aPresentation: mutable Presentation from Prs3d) |
128cc8df |
86 | is redefined static private; |
7fd59977 |
87 | |
88 | Compute(me : mutable; |
89 | aProjector : Projector from Prs3d; |
90 | aTrsf : Transformation from Geom; |
91 | aPresentation : mutable Presentation from Prs3d) |
92 | is redefined; |
93 | ---Purpose: computes the presentation according to a point of view |
94 | -- given by <aProjector>. |
95 | -- To be Used when the associated degenerated Presentations |
96 | -- have been transformed by <aTrsf> which is not a Pure |
97 | -- Translation. The HLR Prs can't be deducted automatically |
98 | -- WARNING :<aTrsf> must be applied |
99 | -- to the object to display before computation !!! |
100 | |
101 | -- Methods from SelectableObject |
102 | |
103 | ComputeSelection(me : mutable; |
104 | aSelection : mutable Selection from SelectMgr; |
105 | aMode : Integer from Standard) |
106 | is redefined private; |
107 | |
108 | -- |
109 | -- Computation private methods |
110 | -- |
111 | |
112 | ComputeEllipse(me: mutable; |
113 | aPresentation : mutable Presentation from Prs3d) |
114 | is private; |
115 | |
116 | ComputeArcOfEllipse(me: mutable; |
117 | aPresentation : mutable Presentation from Prs3d ) |
118 | is private; |
119 | |
120 | fields |
121 | |
122 | myApexP : Pnt from gp; |
123 | myApexN : Pnt from gp; |
124 | myEndOfArrow : Pnt from gp; |
125 | |
126 | end MaxRadiusDimension; |