0024428: Implementation of LGPL license
[occt.git] / src / AIS / AIS_TangentRelation.cdl
CommitLineData
b311480e 1-- Created on: 1996-12-05
2-- Created by: Jean-Pierre COMBE/Odile Olivier
3-- Copyright (c) 1996-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class TangentRelation from AIS inherits Relation from AIS
18 ---Purpose: A framework to display tangency constraints between
19 -- two or more Interactive Objects of the datum type.
20 -- The datums are normally faces or edges.
21uses Shape from TopoDS,
22 Presentation from Prs3d,
23 PresentationManager3d from PrsMgr,
24 Selection from SelectMgr,
25 Pnt from gp,
26 Dir from gp,
27 Projector from Prs3d,
128cc8df 28 Transformation from Geom,
7fd59977 29 Plane from Geom
30
31is
32 Create (aFShape : Shape from TopoDS;
33 aSShape : Shape from TopoDS;
34 aPlane : Plane from Geom;
35 anExternRef : Integer from Standard = 0)
36 ---Purpose: TwoFacesTangent or TwoEdgesTangent relation
37 returns mutable TangentRelation from AIS;
38 ---Purpose: Constructs an object to display tangency constraints.
39 -- This object is defined by the first shape aFShape, the
40 -- second shape aSShape, the plane aPlane and the index anExternRef.
41 -- aPlane serves as an optional axis.
42 -- anExternRef set to 0 indicates that there is no relation.
43
44 ExternRef(me: mutable) returns Integer from Standard
45 is static;
46 ---Purpose: Returns the external reference for tangency.
47 -- The values are as follows:
48 -- - 0 - there is no connection;
49 -- - 1 - there is a connection to the first shape;
50 -- - 2 - there is a connection to the second shape.
51 -- This reference is defined at construction time.
52
53 SetExternRef(me: mutable;aRef : Integer from Standard)
54 is static;
55 ---Purpose: Sets the external reference for tangency, aRef.
56 -- The values are as follows:
57 -- - 0 - there is no connection;
58 -- - 1 - there is a connection to the first shape;
59 -- - 2 - there is a connection to the second shape.
60 -- This reference is initially defined at construction time.
61
62 Compute(me : mutable;
63 aPresentationManager: PresentationManager3d from PrsMgr;
64 aPresentation : mutable Presentation from Prs3d;
65 aMode : Integer from Standard= 0)
66 is redefined static private;
67
68 Compute(me:mutable;
69 aProjector: Projector from Prs3d;
70 aPresentation: mutable Presentation from Prs3d)
128cc8df 71 is redefined static private;
7fd59977 72
73 Compute(me : mutable;
74 aProjector : Projector from Prs3d;
75 aTrsf : Transformation from Geom;
76 aPresentation : mutable Presentation from Prs3d)
77 is redefined;
78 ---Purpose: computes the presentation according to a point of view
79 -- given by <aProjector>.
80 -- To be Used when the associated degenerated Presentations
81 -- have been transformed by <aTrsf> which is not a Pure
82 -- Translation. The HLR Prs can't be deducted automatically
83 -- WARNING :<aTrsf> must be applied
84 -- to the object to display before computation !!!
85
86-- Methods from SelectableObject
87
88 ComputeSelection(me : mutable;
89 aSelection : mutable Selection from SelectMgr;
90 aMode : Integer from Standard)is private;
91
92
93--
94-- Computation private methods
95--
96
97 ComputeTwoFacesTangent(me: mutable;
98 aPresentation : mutable Presentation from Prs3d)
99 is private;
100
101 ComputeTwoEdgesTangent(me: mutable;
102 aPresentation : mutable Presentation from Prs3d)
103 is private;
104
105
106fields
107
108 myAttach : Pnt from gp;
109 myDir : Dir from gp;
110 myLength : Real from Standard;
111 myExternRef : Integer from Standard; ---purpose: (0 no attachment,1 attachment with first shape, 2 attachment with second shape)
112
113end TangentRelation;
114