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
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.
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.
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.
23 class OffsetDimension from AIS inherits Relation from AIS
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.
33 Presentation from Prs3d,
35 Transformation from Geom,
36 PresentationManager3d from PrsMgr,
37 PresentationManager2d from PrsMgr,
38 Selection from SelectMgr,
39 GraphicObject from Graphic2d,
43 KindOfDimension from AIS,
44 ExtendedString from TCollection
47 Create (FistShape, SecondShape : Shape from TopoDS;
48 aVal : Real from Standard;
49 aText : ExtendedString from TCollection)
50 returns mutable OffsetDimension from AIS;
51 ---Purpose: Constructs the offset display object defined by the
52 -- first shape aFShape, the second shape aSShape, the
53 -- dimension aVal, and the text aText.
56 aPresentationManager: PresentationManager3d from PrsMgr;
57 aPresentation : mutable Presentation from Prs3d;
58 aMode : Integer from Standard= 0)
62 aProjector: Projector from Prs3d;
63 aPresentation: mutable Presentation from Prs3d)
64 is redefined static private;
67 aPresentationManager: PresentationManager2d from PrsMgr;
68 aPresentation: mutable GraphicObject from Graphic2d;
69 aMode: Integer from Standard = 0)
70 is redefined static private;
73 aProjector : Projector from Prs3d;
74 aTrsf : Transformation from Geom;
75 aPresentation : mutable Presentation from Prs3d)
77 ---Purpose: computes the presentation according to a point of view
78 -- given by <aProjector>.
79 -- To be Used when the associated degenerated Presentations
80 -- have been transformed by <aTrsf> which is not a Pure
81 -- Translation. The HLR Prs can't be deducted automatically
82 -- WARNING :<aTrsf> must be applied
83 -- to the object to display before computation !!!
85 -- Methods from SelectableObject
87 ComputeSelection(me : mutable;
88 aSelection : mutable Selection from SelectMgr;
89 aMode : Integer from Standard)
94 -- Indicates that the dimension we are concerned with is an offset.
96 returns KindOfDimension from AIS
101 ---Purpose: Returns true if the offset datum is movable.
102 returns Boolean from Standard
105 SetRelativePos (me:mutable; aTrsf: Trsf from gp);
107 ---Purpose: Sets a transformation aTrsf for presentation and
108 -- selection to a relative position.
110 ComputeTwoFacesOffset(me: mutable;
111 aPresentation : mutable Presentation from Prs3d;
112 aTrsf : Trsf from gp)
115 ComputeTwoAxesOffset(me: mutable;
116 aPresentation : mutable Presentation from Prs3d;
117 aTrsf : Trsf from gp)
120 ComputeAxeFaceOffset(me: mutable;
121 aPresentation : mutable Presentation from Prs3d;
122 aTrsf : Trsf from gp)
127 myFAttach : Pnt from gp;
128 mySAttach : Pnt from gp;
129 myDirAttach : Dir from gp;
130 myDirAttach2 : Dir from gp;
131 myRelativePos : Trsf from gp;