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