1 -- Created on: 1997-03-03
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 SymmetricRelation from AIS inherits Relation from AIS
25 ---Purpose: A framework to display constraints of symmetricity
26 -- between two or more datum Interactive Objects.
27 -- A plane serves as the axis of symmetry between the
28 -- shapes of which the datums are parts.
30 uses Shape from TopoDS,
31 Presentation from Prs3d,
32 PresentationManager3d from PrsMgr,
33 Selection from SelectMgr,
37 Transformation from Geom,
38 PresentationManager2d from PrsMgr,
39 GraphicObject from Graphic2d,
40 ExtendedString from TCollection,
44 Create(aSymmTool : Shape from TopoDS;
45 FirstShape : Shape from TopoDS;
46 SecondShape : Shape from TopoDS;
47 aPlane : Plane from Geom)
48 returns mutable SymmetricRelation from AIS;
49 --- Purpose: Constructs an object to display constraints of symmetricity.
50 -- This object is defined by a tool aSymmTool, a first
51 -- shape FirstShape, a second shape SecondShape, and a plane aPlane.
52 -- aPlane serves as the axis of symmetry.
53 -- aSymmTool is the shape composed of FirstShape
54 -- SecondShape and aPlane. It may be queried and
55 -- edited using the functions GetTool and SetTool.
56 -- The two shapes are typically two edges, two vertices or two points.
58 IsMovable(me) returns Boolean from Standard
59 ---Purpose: Returns true if the symmetric constraint display is movable.
64 SetTool(me:mutable; aSymmetricTool : Shape from TopoDS);
65 ---Purpose: Sets the tool aSymmetricTool composed of a first
66 -- shape, a second shape, and a plane.
67 -- This tool is initially created at construction time.
71 ---Purpose: Returns the tool composed of a first shape, a second
72 -- shape, and a plane. This tool is created at construction time.
74 ---C++: return const &
75 returns Shape from TopoDS;
77 -- Methods from PresentableObject
80 aPresentationManager: PresentationManager3d from PrsMgr;
81 aPresentation : mutable Presentation from Prs3d;
82 aMode : Integer from Standard= 0)
83 is redefined static private;
86 aProjector: Projector from Prs3d;
87 aPresentation: mutable Presentation from Prs3d)
88 is redefined static private;
91 aPresentationManager: PresentationManager2d from PrsMgr;
92 aPresentation: mutable GraphicObject from Graphic2d;
93 aMode: Integer from Standard = 0)
94 is redefined static private;
97 aProjector : Projector from Prs3d;
98 aTrsf : Transformation from Geom;
99 aPresentation : mutable Presentation from Prs3d)
101 ---Purpose: computes the presentation according to a point of view
102 -- given by <aProjector>.
103 -- To be Used when the associated degenerated Presentations
104 -- have been transformed by <aTrsf> which is not a Pure
105 -- Translation. The HLR Prs can't be deducted automatically
106 -- WARNING :<aTrsf> must be applied
107 -- to the object to display before computation !!!
109 -- SymmetricRelation Methods from SelectableObject
111 ComputeSelection(me : mutable;
112 aSelection : mutable Selection from SelectMgr;
113 aMode : Integer from Standard)is private;
116 -- Computation private methods
119 ComputeTwoFacesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
122 ComputeTwoEdgesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
125 ComputeTwoVerticesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
131 myTool : Shape from TopoDS;
132 myFAttach : Pnt from gp;
133 mySAttach : Pnt from gp;
134 myFDirAttach : Dir from gp;
135 myAxisDirAttach : Dir from gp;
137 end SymmetricRelation;