Test for 0022778: Bug in BRepMesh
[occt.git] / src / GeomPlate / GeomPlate_PointConstraint.cdl
1 -- Created on: 1997-05-05
2 -- Created by: Jerome LEMONIER
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
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.
10 --
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.
13 --
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.
20
21 class  PointConstraint  from  GeomPlate  inherits TShared from MMgt
22         ---Purpose:
23         -- Defines points as constraints to be used to deform a surface.
24 uses 
25    Pnt  from  gp, 
26    Pnt2d  from  gp, 
27    Surface  from  Geom,
28    Vec   from  gp, 
29    SLProps from GeomLProp  
30
31 raises   
32    ConstructionError  from  Standard 
33
34 is
35 Create (Pt  :  Pnt  from  gp;
36               Order: Integer from Standard ;
37               TolDist : Real from Standard = 0.0001)
38         returns  PointConstraint  from  GeomPlate 
39         raises   ConstructionError  from  Standard;
40         ---Purpose: Constructs a point constraint object defined by  Pt, a 3D point
41         --   Order gives the order of constraint, one of:
42         -- -   -1 i.e. none, or 0 i.e.G0 when assigned to Pt
43         -- -   -1 i.e. none, 0 i.e. G0, 1 i.e. G1, 2 i.e. G2 when
44         --   assigned to U, V and Surf.
45         -- In this constructor, only TolDist is given.
46         -- Distance tolerance represents the greatest distance
47         -- allowed between the constraint and the target surface.
48         -- Angular tolerance represents the largest angle allowed
49         -- between the constraint and the target surface. Curvature
50         -- tolerance represents the greatest difference in curvature
51         -- allowed between the constraint and the target surface. 
52         -- Raises   ConstructionError if Order  is  not  0  or  -1 
53
54 Create (U,V   :  Real from Standard;
55               Surf   : Surface from Geom;
56               Order: Integer from Standard;
57               TolDist : Real from Standard=0.0001;
58                TolAng : Real from Standard=0.01;
59                TolCurv: Real from Standard=0.1)
60         returns  PointConstraint  from  GeomPlate; 
61
62         ---Purpose: Constructs a point constraint object defined by
63         -- the intersection point of U and V on the surface Surf.
64         --   Order gives the order of constraint, one of:
65         -- -   -1 i.e. none, or 0 i.e.G0 when assigned to Pt
66         -- -   -1 i.e. none, 0 i.e. G0, 1 i.e. G1, 2 i.e. G2 when
67         --   assigned to U, V and Surf.
68         -- In this constructor the surface to be generated must
69         -- respect several tolerance values only:
70         -- -   the distance tolerance TolDist
71         -- -   the angular tolerance TolAng
72         -- -   the curvature tolerance, TolCurv.
73         -- Distance tolerance represents the greatest distance
74         -- allowed between the constraint and the target surface.
75         -- Angular tolerance represents the largest angle allowed
76         -- between the constraint and the target surface. Curvature
77         -- tolerance represents the greatest difference in curvature
78         -- allowed between the constraint and the target surface.Creates a punctual constraint.
79
80 SetOrder(me : mutable ; Order: Integer from Standard);
81
82 Order(me) returns  Integer from Standard;
83         ---Purpose:
84         -- Returns the order of constraint: G0, G1, and G2,
85         -- controlled respectively by G0Criterion G1Criterion and G2Criterion.
86     
87 SetG0Criterion(me : mutable; TolDist  : Real  from  Standard) ;
88         --- Purpose:
89         -- Allows you to set the G0 criterion. This is the law
90         -- defining the greatest distance allowed between the
91         -- constraint and the target surface. If this criterion is not
92         -- set, {TolDist, the distance tolerance from the constructor, is used 
93
94 SetG1Criterion(me : mutable; TolAng   : Real  from  Standard)  
95 raises   ConstructionError  from  Standard;
96         ---Purpose:
97         -- Allows you to set the G1 criterion. This is the law
98         -- defining the greatest angle allowed between the
99         -- constraint and the target surface. If this criterion is not
100         -- set, TolAng, the angular tolerance from the constructor, is used.
101         -- Raises   ConstructionError  if  the  point  is  not  on  the  surface    
102     
103 SetG2Criterion(me : mutable; TolCurv  : Real  from  Standard)
104 raises   ConstructionError  from  Standard;
105         ---Purpose:
106         -- Allows you to set the G2 criterion. This is the law
107         -- defining the greatest difference in curvature allowed
108         -- between the constraint and the target surface. If this
109         -- criterion is not set, TolCurv, the curvature tolerance from
110         -- the constructor, is used.
111         -- Raises   ConstructionError if  the  point  is  not  on  the  surface    
112     
113 G0Criterion(me)  returns  Real  from  Standard ; 
114         ---Purpose:
115         -- Returns the G0 criterion. This is the greatest distance
116         -- allowed between the constraint and the target surface.
117     
118 G1Criterion(me)  returns  Real  from  Standard
119 raises   ConstructionError  from  Standard;
120         ---Purpose:
121         -- Returns the G1 criterion. This is the greatest angle
122         -- allowed between the constraint and the target surface.
123         -- Raises   ConstructionError if  the  point  is  not  on  the  surface.  
124     
125 G2Criterion(me)  returns  Real  from  Standard
126 raises   ConstructionError  from  Standard;
127         ---Purpose:
128         -- Returns the G2 criterion. This is the greatest difference
129         -- in curvature allowed between the constraint and the target surface.
130         -- Raises   ConstructionError if  the  point  is  not  on  the  surface 
131     
132 D0(me ;P :  out  Pnt) ; 
133
134 D1(me ;P :  out  Pnt;  V1,  V2  :  out  Vec )  
135 raises   ConstructionError  from  Standard;
136 --if  the  point  is  not  on  the  surface
137
138 D2(me ;P :  out  Pnt;  V1,  V2  ,  V3,  V4,  V5  :  out  Vec)   
139 raises   ConstructionError  from  Standard;
140 --if  the  point  is  not  on  the  surface
141
142  
143 HasPnt2dOnSurf(me)  returns  Boolean;
144
145 SetPnt2dOnSurf(me : mutable; Pnt :Pnt2d  from  gp);
146
147 Pnt2dOnSurf (me)  returns  Pnt2d  from  gp;
148
149 LPropSurf  (me  :  mutable)   
150 ---C++: return &
151 returns SLProps from GeomLProp
152 raises  ConstructionError; 
153 --if  the  curve  is  not  on  a  surface
154
155
156 fields 
157 myLProp  :   SLProps from GeomLProp; 
158 myPoint  :  Pnt  from  gp;  
159 myPt2d   :  Pnt2d  from  gp;  
160 mySurf   :  Surface  from  Geom;
161 myD11    :  Vec  from  gp; 
162 myD12    :  Vec  from  gp; 
163 myD21    :  Vec  from  gp; 
164 myD22    :  Vec  from  gp; 
165 myD23    :  Vec  from  gp; 
166 myU  :  Real  from  Standard; 
167 myV  :  Real  from  Standard;  
168 myTolDist  :  Real  from  Standard; 
169 myTolAng  :  Real  from  Standard; 
170 myTolCurv  :  Real  from  Standard; 
171 myOrder  :  Integer  from  Standard  is  protected;  
172 hasPnt2dOnSurf  :  Boolean; 
173 end;
174
175
176
177
178