1 -- Created on: 1997-05-05
2 -- Created by: Jerome LEMONIER
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 under
9 -- the terms of the GNU Lesser General Public License 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 PointConstraint from GeomPlate inherits TShared from MMgt
19 -- Defines points as constraints to be used to deform a surface.
25 SLProps from GeomLProp
28 ConstructionError from Standard
31 Create (Pt : Pnt from gp;
32 Order: Integer from Standard ;
33 TolDist : Real from Standard = 0.0001)
34 returns PointConstraint from GeomPlate
35 raises ConstructionError from Standard;
36 ---Purpose: Constructs a point constraint object defined by Pt, a 3D point
37 -- Order gives the order of constraint, one of:
38 -- - -1 i.e. none, or 0 i.e.G0 when assigned to Pt
39 -- - -1 i.e. none, 0 i.e. G0, 1 i.e. G1, 2 i.e. G2 when
40 -- assigned to U, V and Surf.
41 -- In this constructor, only TolDist is given.
42 -- Distance tolerance represents the greatest distance
43 -- allowed between the constraint and the target surface.
44 -- Angular tolerance represents the largest angle allowed
45 -- between the constraint and the target surface. Curvature
46 -- tolerance represents the greatest difference in curvature
47 -- allowed between the constraint and the target surface.
48 -- Raises ConstructionError if Order is not 0 or -1
50 Create (U,V : Real from Standard;
51 Surf : Surface from Geom;
52 Order: Integer from Standard;
53 TolDist : Real from Standard=0.0001;
54 TolAng : Real from Standard=0.01;
55 TolCurv: Real from Standard=0.1)
56 returns PointConstraint from GeomPlate;
58 ---Purpose: Constructs a point constraint object defined by
59 -- the intersection point of U and V on the surface Surf.
60 -- Order gives the order of constraint, one of:
61 -- - -1 i.e. none, or 0 i.e.G0 when assigned to Pt
62 -- - -1 i.e. none, 0 i.e. G0, 1 i.e. G1, 2 i.e. G2 when
63 -- assigned to U, V and Surf.
64 -- In this constructor the surface to be generated must
65 -- respect several tolerance values only:
66 -- - the distance tolerance TolDist
67 -- - the angular tolerance TolAng
68 -- - the curvature tolerance, TolCurv.
69 -- Distance tolerance represents the greatest distance
70 -- allowed between the constraint and the target surface.
71 -- Angular tolerance represents the largest angle allowed
72 -- between the constraint and the target surface. Curvature
73 -- tolerance represents the greatest difference in curvature
74 -- allowed between the constraint and the target surface.Creates a punctual constraint.
76 SetOrder(me : mutable ; Order: Integer from Standard);
78 Order(me) returns Integer from Standard;
80 -- Returns the order of constraint: G0, G1, and G2,
81 -- controlled respectively by G0Criterion G1Criterion and G2Criterion.
83 SetG0Criterion(me : mutable; TolDist : Real from Standard) ;
85 -- Allows you to set the G0 criterion. This is the law
86 -- defining the greatest distance allowed between the
87 -- constraint and the target surface. If this criterion is not
88 -- set, {TolDist, the distance tolerance from the constructor, is used
90 SetG1Criterion(me : mutable; TolAng : Real from Standard)
91 raises ConstructionError from Standard;
93 -- Allows you to set the G1 criterion. This is the law
94 -- defining the greatest angle allowed between the
95 -- constraint and the target surface. If this criterion is not
96 -- set, TolAng, the angular tolerance from the constructor, is used.
97 -- Raises ConstructionError if the point is not on the surface
99 SetG2Criterion(me : mutable; TolCurv : Real from Standard)
100 raises ConstructionError from Standard;
102 -- Allows you to set the G2 criterion. This is the law
103 -- defining the greatest difference in curvature allowed
104 -- between the constraint and the target surface. If this
105 -- criterion is not set, TolCurv, the curvature tolerance from
106 -- the constructor, is used.
107 -- Raises ConstructionError if the point is not on the surface
109 G0Criterion(me) returns Real from Standard ;
111 -- Returns the G0 criterion. This is the greatest distance
112 -- allowed between the constraint and the target surface.
114 G1Criterion(me) returns Real from Standard
115 raises ConstructionError from Standard;
117 -- Returns the G1 criterion. This is the greatest angle
118 -- allowed between the constraint and the target surface.
119 -- Raises ConstructionError if the point is not on the surface.
121 G2Criterion(me) returns Real from Standard
122 raises ConstructionError from Standard;
124 -- Returns the G2 criterion. This is the greatest difference
125 -- in curvature allowed between the constraint and the target surface.
126 -- Raises ConstructionError if the point is not on the surface
128 D0(me ;P : out Pnt) ;
130 D1(me ;P : out Pnt; V1, V2 : out Vec )
131 raises ConstructionError from Standard;
132 --if the point is not on the surface
134 D2(me ;P : out Pnt; V1, V2 , V3, V4, V5 : out Vec)
135 raises ConstructionError from Standard;
136 --if the point is not on the surface
139 HasPnt2dOnSurf(me) returns Boolean;
141 SetPnt2dOnSurf(me : mutable; Pnt :Pnt2d from gp);
143 Pnt2dOnSurf (me) returns Pnt2d from gp;
145 LPropSurf (me : mutable)
147 returns SLProps from GeomLProp
148 raises ConstructionError;
149 --if the curve is not on a surface
153 myLProp : SLProps from GeomLProp;
154 myPoint : Pnt from gp;
155 myPt2d : Pnt2d from gp;
156 mySurf : Surface from Geom;
162 myU : Real from Standard;
163 myV : Real from Standard;
164 myTolDist : Real from Standard;
165 myTolAng : Real from Standard;
166 myTolCurv : Real from Standard;
167 myOrder : Integer from Standard is protected;
168 hasPnt2dOnSurf : Boolean;