1 -- Created on: 1997-03-03
2 -- Created by: Jean-Pierre COMBE
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class SymmetricRelation from AIS inherits Relation from AIS
19 ---Purpose: A framework to display constraints of symmetricity
20 -- between two or more datum Interactive Objects.
21 -- A plane serves as the axis of symmetry between the
22 -- shapes of which the datums are parts.
24 uses Shape from TopoDS,
25 Presentation from Prs3d,
26 PresentationManager3d from PrsMgr,
27 Selection from SelectMgr,
31 Transformation from Geom,
32 ExtendedString from TCollection,
36 Create(aSymmTool : Shape from TopoDS;
37 FirstShape : Shape from TopoDS;
38 SecondShape : Shape from TopoDS;
39 aPlane : Plane from Geom)
40 returns mutable SymmetricRelation from AIS;
41 --- Purpose: Constructs an object to display constraints of symmetricity.
42 -- This object is defined by a tool aSymmTool, a first
43 -- shape FirstShape, a second shape SecondShape, and a plane aPlane.
44 -- aPlane serves as the axis of symmetry.
45 -- aSymmTool is the shape composed of FirstShape
46 -- SecondShape and aPlane. It may be queried and
47 -- edited using the functions GetTool and SetTool.
48 -- The two shapes are typically two edges, two vertices or two points.
50 IsMovable(me) returns Boolean from Standard
51 ---Purpose: Returns true if the symmetric constraint display is movable.
56 SetTool(me:mutable; aSymmetricTool : Shape from TopoDS);
57 ---Purpose: Sets the tool aSymmetricTool composed of a first
58 -- shape, a second shape, and a plane.
59 -- This tool is initially created at construction time.
63 ---Purpose: Returns the tool composed of a first shape, a second
64 -- shape, and a plane. This tool is created at construction time.
66 ---C++: return const &
67 returns Shape from TopoDS;
69 -- Methods from PresentableObject
72 aPresentationManager: PresentationManager3d from PrsMgr;
73 aPresentation : mutable Presentation from Prs3d;
74 aMode : Integer from Standard= 0)
75 is redefined static private;
78 aProjector: Projector from Prs3d;
79 aPresentation: mutable Presentation from Prs3d)
80 is redefined static private;
83 aProjector : Projector from Prs3d;
84 aTrsf : Transformation from Geom;
85 aPresentation : mutable Presentation from Prs3d)
87 ---Purpose: computes the presentation according to a point of view
88 -- given by <aProjector>.
89 -- To be Used when the associated degenerated Presentations
90 -- have been transformed by <aTrsf> which is not a Pure
91 -- Translation. The HLR Prs can't be deducted automatically
92 -- WARNING :<aTrsf> must be applied
93 -- to the object to display before computation !!!
95 -- SymmetricRelation Methods from SelectableObject
97 ComputeSelection(me : mutable;
98 aSelection : mutable Selection from SelectMgr;
99 aMode : Integer from Standard)is private;
102 -- Computation private methods
105 ComputeTwoFacesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
108 ComputeTwoEdgesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
111 ComputeTwoVerticesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
117 myTool : Shape from TopoDS;
118 myFAttach : Pnt from gp;
119 mySAttach : Pnt from gp;
120 myFDirAttach : Dir from gp;
121 myAxisDirAttach : Dir from gp;
123 end SymmetricRelation;