b311480e |
1 | -- Created on: 1997-05-05 |
2 | -- Created by: Jerome LEMONIER |
3 | -- Copyright (c) 1997-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 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
16 | |
7fd59977 |
17 | class PointConstraint from GeomPlate inherits TShared from MMgt |
18 | ---Purpose: |
19 | -- Defines points as constraints to be used to deform a surface. |
20 | uses |
21 | Pnt from gp, |
22 | Pnt2d from gp, |
23 | Surface from Geom, |
24 | Vec from gp, |
25 | SLProps from GeomLProp |
26 | |
27 | raises |
28 | ConstructionError from Standard |
29 | |
30 | is |
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 |
49 | |
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; |
57 | |
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. |
75 | |
76 | SetOrder(me : mutable ; Order: Integer from Standard); |
77 | |
78 | Order(me) returns Integer from Standard; |
79 | ---Purpose: |
80 | -- Returns the order of constraint: G0, G1, and G2, |
81 | -- controlled respectively by G0Criterion G1Criterion and G2Criterion. |
82 | |
83 | SetG0Criterion(me : mutable; TolDist : Real from Standard) ; |
84 | --- Purpose: |
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 |
89 | |
90 | SetG1Criterion(me : mutable; TolAng : Real from Standard) |
91 | raises ConstructionError from Standard; |
92 | ---Purpose: |
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 |
98 | |
99 | SetG2Criterion(me : mutable; TolCurv : Real from Standard) |
100 | raises ConstructionError from Standard; |
101 | ---Purpose: |
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 |
108 | |
109 | G0Criterion(me) returns Real from Standard ; |
110 | ---Purpose: |
111 | -- Returns the G0 criterion. This is the greatest distance |
112 | -- allowed between the constraint and the target surface. |
113 | |
114 | G1Criterion(me) returns Real from Standard |
115 | raises ConstructionError from Standard; |
116 | ---Purpose: |
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. |
120 | |
121 | G2Criterion(me) returns Real from Standard |
122 | raises ConstructionError from Standard; |
123 | ---Purpose: |
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 |
127 | |
128 | D0(me ;P : out Pnt) ; |
129 | |
130 | D1(me ;P : out Pnt; V1, V2 : out Vec ) |
131 | raises ConstructionError from Standard; |
132 | --if the point is not on the surface |
133 | |
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 |
137 | |
138 | |
139 | HasPnt2dOnSurf(me) returns Boolean; |
140 | |
141 | SetPnt2dOnSurf(me : mutable; Pnt :Pnt2d from gp); |
142 | |
143 | Pnt2dOnSurf (me) returns Pnt2d from gp; |
144 | |
145 | LPropSurf (me : mutable) |
146 | ---C++: return & |
147 | returns SLProps from GeomLProp |
148 | raises ConstructionError; |
149 | --if the curve is not on a surface |
150 | |
151 | |
152 | fields |
153 | myLProp : SLProps from GeomLProp; |
154 | myPoint : Pnt from gp; |
155 | myPt2d : Pnt2d from gp; |
156 | mySurf : Surface from Geom; |
157 | myD11 : Vec from gp; |
158 | myD12 : Vec from gp; |
159 | myD21 : Vec from gp; |
160 | myD22 : Vec from gp; |
161 | myD23 : Vec from gp; |
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; |
169 | end; |
170 | |
171 | |
172 | |
173 | |
174 | |