b311480e |
1 | -- Created on: 1998-01-22 |
2 | -- Created by: Sergey ZARITCHNY |
3 | -- Copyright (c) 1998-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class MinRadiusDimension from AIS inherits EllipseRadiusDimension from AIS |
18 | |
19 | ---Purpose:-- Ellipse Min radius dimension of a Shape which |
20 | -- can be Edge or Face (planar or cylindrical(surface of |
21 | -- extrusion or surface of offset)) |
22 | |
23 | uses |
24 | |
25 | Shape from TopoDS, |
26 | Elips from gp, |
27 | Pnt from gp, |
28 | Pln from gp, |
29 | Ellipse from Geom, |
30 | Plane from Geom, |
31 | Surface from Geom, |
32 | Presentation from Prs3d, |
33 | PresentationManager3d from PrsMgr, |
34 | Selection from SelectMgr, |
35 | Projector from Prs3d, |
128cc8df |
36 | Transformation from Geom, |
7fd59977 |
37 | ExtendedString from TCollection, |
38 | ArrowSide from DsgPrs, |
39 | KindOfSurface from AIS, |
40 | KindOfDimension from AIS |
41 | |
42 | |
43 | raises ConstructionError from Standard |
44 | |
45 | is |
46 | |
47 | |
48 | Create (aShape : Shape from TopoDS; |
49 | aVal : Real from Standard; |
50 | aText : ExtendedString from TCollection) |
51 | ---Purpose: Max Ellipse radius dimension |
52 | -- Shape can be edge , planar face or cylindrical face |
53 | -- |
6e33d3ce |
54 | returns MinRadiusDimension from AIS; |
7fd59977 |
55 | |
56 | Create (aShape : Shape from TopoDS; |
57 | aVal : Real from Standard; |
58 | aText : ExtendedString from TCollection; |
59 | aPosition : Pnt from gp; |
60 | aSymbolPrs : ArrowSide from DsgPrs; |
61 | anArrowSize : Real from Standard = 0.0) |
62 | ---Purpose: Max Ellipse radius dimension with position |
63 | -- Shape can be edge , planar face or cylindrical face |
64 | -- |
6e33d3ce |
65 | returns MinRadiusDimension from AIS; |
7fd59977 |
66 | |
67 | |
68 | |
69 | |
70 | -- Methods from PresentableObject |
71 | |
72 | Compute(me : mutable; |
73 | aPresentationManager: PresentationManager3d from PrsMgr; |
6e33d3ce |
74 | aPresentation : Presentation from Prs3d; |
7fd59977 |
75 | aMode : Integer from Standard= 0) |
76 | is redefined private; |
77 | |
78 | Compute(me:mutable; |
79 | aProjector: Projector from Prs3d; |
6e33d3ce |
80 | aPresentation: Presentation from Prs3d) |
7fd59977 |
81 | is redefined static private; |
7fd59977 |
82 | |
83 | Compute(me : mutable; |
84 | aProjector : Projector from Prs3d; |
85 | aTrsf : Transformation from Geom; |
6e33d3ce |
86 | aPresentation : Presentation from Prs3d) |
7fd59977 |
87 | is redefined; |
88 | ---Purpose: computes the presentation according to a point of view |
89 | -- given by <aProjector>. |
90 | -- To be Used when the associated degenerated Presentations |
91 | -- have been transformed by <aTrsf> which is not a Pure |
92 | -- Translation. The HLR Prs can't be deducted automatically |
93 | -- WARNING :<aTrsf> must be applied |
94 | -- to the object to display before computation !!! |
95 | |
96 | -- Methods from SelectableObject |
97 | |
98 | ComputeSelection(me : mutable; |
6e33d3ce |
99 | aSelection : Selection from SelectMgr; |
7fd59977 |
100 | aMode : Integer from Standard) |
101 | is redefined private; |
102 | |
103 | -- |
104 | -- Computation private methods |
105 | -- |
106 | |
107 | ComputeEllipse(me: mutable; |
6e33d3ce |
108 | aPresentation : Presentation from Prs3d) |
7fd59977 |
109 | is private; |
110 | |
111 | ComputeArcOfEllipse(me: mutable; |
6e33d3ce |
112 | aPresentation : Presentation from Prs3d ) |
7fd59977 |
113 | is private; |
114 | |
115 | fields |
116 | |
117 | myApexP : Pnt from gp; |
118 | myApexN : Pnt from gp; |
119 | myEndOfArrow : Pnt from gp; |
120 | |
121 | end MinRadiusDimension; |