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 ExtendedString from TCollection,
42 Create(aSymmTool : Shape from TopoDS;
43 FirstShape : Shape from TopoDS;
44 SecondShape : Shape from TopoDS;
45 aPlane : Plane from Geom)
46 returns mutable SymmetricRelation from AIS;
47 --- Purpose: Constructs an object to display constraints of symmetricity.
48 -- This object is defined by a tool aSymmTool, a first
49 -- shape FirstShape, a second shape SecondShape, and a plane aPlane.
50 -- aPlane serves as the axis of symmetry.
51 -- aSymmTool is the shape composed of FirstShape
52 -- SecondShape and aPlane. It may be queried and
53 -- edited using the functions GetTool and SetTool.
54 -- The two shapes are typically two edges, two vertices or two points.
56 IsMovable(me) returns Boolean from Standard
57 ---Purpose: Returns true if the symmetric constraint display is movable.
62 SetTool(me:mutable; aSymmetricTool : Shape from TopoDS);
63 ---Purpose: Sets the tool aSymmetricTool composed of a first
64 -- shape, a second shape, and a plane.
65 -- This tool is initially created at construction time.
69 ---Purpose: Returns the tool composed of a first shape, a second
70 -- shape, and a plane. This tool is created at construction time.
72 ---C++: return const &
73 returns Shape from TopoDS;
75 -- Methods from PresentableObject
78 aPresentationManager: PresentationManager3d from PrsMgr;
79 aPresentation : mutable Presentation from Prs3d;
80 aMode : Integer from Standard= 0)
81 is redefined static private;
84 aProjector: Projector from Prs3d;
85 aPresentation: mutable Presentation from Prs3d)
86 is redefined static private;
89 aProjector : Projector from Prs3d;
90 aTrsf : Transformation from Geom;
91 aPresentation : mutable Presentation from Prs3d)
93 ---Purpose: computes the presentation according to a point of view
94 -- given by <aProjector>.
95 -- To be Used when the associated degenerated Presentations
96 -- have been transformed by <aTrsf> which is not a Pure
97 -- Translation. The HLR Prs can't be deducted automatically
98 -- WARNING :<aTrsf> must be applied
99 -- to the object to display before computation !!!
101 -- SymmetricRelation Methods from SelectableObject
103 ComputeSelection(me : mutable;
104 aSelection : mutable Selection from SelectMgr;
105 aMode : Integer from Standard)is private;
108 -- Computation private methods
111 ComputeTwoFacesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
114 ComputeTwoEdgesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
117 ComputeTwoVerticesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
123 myTool : Shape from TopoDS;
124 myFAttach : Pnt from gp;
125 mySAttach : Pnt from gp;
126 myFDirAttach : Dir from gp;
127 myAxisDirAttach : Dir from gp;
129 end SymmetricRelation;