1 -- File: AIS_SymmetricRelation.cdl
2 -- Created: Mon Mar 3 15:51:50 1997
3 -- Author: Jean-Pierre COMBE
4 -- <jpr@chariox.paris1.matra-dtv.fr>
5 ---Copyright: Matra Datavision 1997
8 class SymmetricRelation from AIS inherits Relation from AIS
10 ---Purpose: A framework to display constraints of symmetricity
11 -- between two or more datum Interactive Objects.
12 -- A plane serves as the axis of symmetry between the
13 -- shapes of which the datums are parts.
15 uses Shape from TopoDS,
16 Presentation from Prs3d,
17 PresentationManager3d from PrsMgr,
18 Selection from SelectMgr,
22 Transformation from Geom,
23 PresentationManager2d from PrsMgr,
24 GraphicObject from Graphic2d,
25 ExtendedString from TCollection,
29 Create(aSymmTool : Shape from TopoDS;
30 FirstShape : Shape from TopoDS;
31 SecondShape : Shape from TopoDS;
32 aPlane : Plane from Geom)
33 returns mutable SymmetricRelation from AIS;
34 --- Purpose: Constructs an object to display constraints of symmetricity.
35 -- This object is defined by a tool aSymmTool, a first
36 -- shape FirstShape, a second shape SecondShape, and a plane aPlane.
37 -- aPlane serves as the axis of symmetry.
38 -- aSymmTool is the shape composed of FirstShape
39 -- SecondShape and aPlane. It may be queried and
40 -- edited using the functions GetTool and SetTool.
41 -- The two shapes are typically two edges, two vertices or two points.
43 IsMovable(me) returns Boolean from Standard
44 ---Purpose: Returns true if the symmetric constraint display is movable.
49 SetTool(me:mutable; aSymmetricTool : Shape from TopoDS);
50 ---Purpose: Sets the tool aSymmetricTool composed of a first
51 -- shape, a second shape, and a plane.
52 -- This tool is initially created at construction time.
56 ---Purpose: Returns the tool composed of a first shape, a second
57 -- shape, and a plane. This tool is created at construction time.
59 ---C++: return const &
60 returns Shape from TopoDS;
62 -- Methods from PresentableObject
65 aPresentationManager: PresentationManager3d from PrsMgr;
66 aPresentation : mutable Presentation from Prs3d;
67 aMode : Integer from Standard= 0)
68 is redefined static private;
71 aProjector: Projector from Prs3d;
72 aPresentation: mutable Presentation from Prs3d)
73 is redefined static private;
76 aPresentationManager: PresentationManager2d from PrsMgr;
77 aPresentation: mutable GraphicObject from Graphic2d;
78 aMode: Integer from Standard = 0)
79 is redefined static private;
82 aProjector : Projector from Prs3d;
83 aTrsf : Transformation from Geom;
84 aPresentation : mutable Presentation from Prs3d)
86 ---Purpose: computes the presentation according to a point of view
87 -- given by <aProjector>.
88 -- To be Used when the associated degenerated Presentations
89 -- have been transformed by <aTrsf> which is not a Pure
90 -- Translation. The HLR Prs can't be deducted automatically
91 -- WARNING :<aTrsf> must be applied
92 -- to the object to display before computation !!!
94 -- SymmetricRelation Methods from SelectableObject
96 ComputeSelection(me : mutable;
97 aSelection : mutable Selection from SelectMgr;
98 aMode : Integer from Standard)is private;
101 -- Computation private methods
104 ComputeTwoFacesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
107 ComputeTwoEdgesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
110 ComputeTwoVerticesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
116 myTool : Shape from TopoDS;
117 myFAttach : Pnt from gp;
118 mySAttach : Pnt from gp;
119 myFDirAttach : Dir from gp;
120 myAxisDirAttach : Dir from gp;
122 end SymmetricRelation;