0024428: Implementation of LGPL license
[occt.git] / src / AIS / AIS_SymmetricRelation.cdl
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
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class SymmetricRelation from AIS inherits Relation from AIS
18
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.
23
24 uses Shape                 from TopoDS,
25      Presentation          from Prs3d,
26      PresentationManager3d from PrsMgr,
27      Selection             from SelectMgr,
28      Dir                   from gp,
29      Pnt                   from gp,
30      Projector             from Prs3d,
31      Transformation        from Geom,
32      ExtendedString        from TCollection,
33      Plane                 from Geom
34
35 is
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.   
49
50     IsMovable(me) returns Boolean from Standard 
51         ---Purpose: Returns true if the symmetric constraint display is movable.
52         ---C++: inline       
53       
54     is redefined;        
55     
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.
60         ---C++: inline
61
62     GetTool(me)
63         ---Purpose: Returns the tool composed of a first shape, a second
64         -- shape, and a plane. This tool is created at construction time.
65         ---C++: inline
66         ---C++: return const &
67     returns Shape from TopoDS;
68     
69 -- Methods from PresentableObject
70
71     Compute(me            : mutable;
72             aPresentationManager: PresentationManager3d from PrsMgr;
73             aPresentation : mutable Presentation from Prs3d;
74             aMode         : Integer from Standard= 0) 
75     is redefined static private;
76     
77     Compute(me:mutable;
78                 aProjector: Projector from Prs3d;
79                 aPresentation: mutable Presentation from Prs3d)
80     is redefined static private;     
81
82     Compute(me            : mutable;
83             aProjector    : Projector from Prs3d;
84             aTrsf         : Transformation from Geom;
85             aPresentation : mutable Presentation from Prs3d)
86     is redefined;
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  !!!
94
95 --     SymmetricRelation Methods from SelectableObject
96
97     ComputeSelection(me         : mutable;
98                      aSelection : mutable Selection from SelectMgr;
99                      aMode      : Integer from Standard)is private;
100
101 --
102 --     Computation private methods
103 --
104
105     ComputeTwoFacesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
106     is private;
107     
108     ComputeTwoEdgesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
109     is private;
110     
111     ComputeTwoVerticesSymmetric(me: mutable; aprs : mutable Presentation from Prs3d)
112     is private;
113     
114     
115 fields
116
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;
122     
123 end SymmetricRelation;