b311480e |
1 | -- Created on: 1997-03-04 |
2 | -- Created by: Jean-Pierre COMBE |
3 | -- Copyright (c) 1997-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 OffsetDimension from AIS inherits Relation from AIS |
24 | |
25 | ---Purpose: A framework to display dimensions of offsets. |
26 | -- The relation between the offset and the basis shape |
27 | -- is indicated. This relation is displayed with arrows and |
28 | -- text. The text gives the dsitance between the offset |
29 | -- and the basis shape. |
30 | |
31 | uses |
32 | Shape from TopoDS, |
33 | Presentation from Prs3d, |
34 | Projector from Prs3d, |
128cc8df |
35 | Transformation from Geom, |
7fd59977 |
36 | PresentationManager3d from PrsMgr, |
7fd59977 |
37 | Selection from SelectMgr, |
7fd59977 |
38 | Dir from gp, |
39 | Pnt from gp, |
40 | Trsf from gp, |
41 | KindOfDimension from AIS, |
42 | ExtendedString from TCollection |
43 | |
44 | is |
45 | Create (FistShape, SecondShape : Shape from TopoDS; |
46 | aVal : Real from Standard; |
47 | aText : ExtendedString from TCollection) |
48 | returns mutable OffsetDimension from AIS; |
49 | ---Purpose: Constructs the offset display object defined by the |
50 | -- first shape aFShape, the second shape aSShape, the |
51 | -- dimension aVal, and the text aText. |
52 | |
53 | Compute(me : mutable; |
54 | aPresentationManager: PresentationManager3d from PrsMgr; |
55 | aPresentation : mutable Presentation from Prs3d; |
56 | aMode : Integer from Standard= 0) |
57 | is redefined private; |
58 | |
59 | Compute(me:mutable; |
60 | aProjector: Projector from Prs3d; |
61 | aPresentation: mutable Presentation from Prs3d) |
62 | is redefined static private; |
7fd59977 |
63 | |
64 | Compute(me : mutable; |
65 | aProjector : Projector from Prs3d; |
66 | aTrsf : Transformation from Geom; |
67 | aPresentation : mutable Presentation from Prs3d) |
68 | is redefined; |
69 | ---Purpose: computes the presentation according to a point of view |
70 | -- given by <aProjector>. |
71 | -- To be Used when the associated degenerated Presentations |
72 | -- have been transformed by <aTrsf> which is not a Pure |
73 | -- Translation. The HLR Prs can't be deducted automatically |
74 | -- WARNING :<aTrsf> must be applied |
75 | -- to the object to display before computation !!! |
76 | |
77 | -- Methods from SelectableObject |
78 | |
79 | ComputeSelection(me : mutable; |
80 | aSelection : mutable Selection from SelectMgr; |
81 | aMode : Integer from Standard) |
82 | is redefined private; |
83 | |
84 | KindOfDimension(me) |
85 | ---Purpose: |
86 | -- Indicates that the dimension we are concerned with is an offset. |
87 | ---C++: inline |
88 | returns KindOfDimension from AIS |
89 | is redefined; |
90 | |
91 | IsMovable(me) |
92 | ---C++: inline |
93 | ---Purpose: Returns true if the offset datum is movable. |
94 | returns Boolean from Standard |
95 | is redefined; |
96 | |
97 | SetRelativePos (me:mutable; aTrsf: Trsf from gp); |
98 | ---C++: inline |
99 | ---Purpose: Sets a transformation aTrsf for presentation and |
100 | -- selection to a relative position. |
101 | |
102 | ComputeTwoFacesOffset(me: mutable; |
103 | aPresentation : mutable Presentation from Prs3d; |
104 | aTrsf : Trsf from gp) |
105 | is private; |
106 | |
107 | ComputeTwoAxesOffset(me: mutable; |
108 | aPresentation : mutable Presentation from Prs3d; |
109 | aTrsf : Trsf from gp) |
110 | is private; |
111 | |
112 | ComputeAxeFaceOffset(me: mutable; |
113 | aPresentation : mutable Presentation from Prs3d; |
114 | aTrsf : Trsf from gp) |
115 | is private; |
116 | |
117 | fields |
118 | |
119 | myFAttach : Pnt from gp; |
120 | mySAttach : Pnt from gp; |
121 | myDirAttach : Dir from gp; |
122 | myDirAttach2 : Dir from gp; |
123 | myRelativePos : Trsf from gp; |
124 | |
125 | end OffsetDimension; |