b311480e |
1 | -- Created on: 1993-04-14 |
2 | -- Created by: Isabelle GRIGNON |
3 | -- Copyright (c) 1993-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 | |
17 | class Face from BRepGProp |
18 | |
19 | uses Pnt2d from gp, |
20 | Vec2d from gp, |
21 | Pnt from gp, |
22 | Vec from gp, |
23 | Edge from TopoDS, |
24 | Face from TopoDS, |
25 | Surface from BRepAdaptor, |
26 | Curve from Geom2dAdaptor, |
27 | Array1OfReal from TColStd, |
28 | HArray1OfReal from TColStd, |
29 | IsoType from GeomAbs |
30 | |
31 | is |
32 | |
33 | Create (IsUseSpan: Boolean from Standard = Standard_False) |
34 | ---Purpose: Constructor. Initializes the object with a flag IsUseSpan |
35 | -- that says if it is necessary to define spans on a face. |
36 | -- This option has an effect only for BSpline faces. Spans |
37 | -- are returned by the methods GetUKnots and GetTKnots. |
38 | ---C++: inline |
39 | returns Face from BRepGProp; |
40 | |
41 | Create(F : Face from TopoDS; |
42 | IsUseSpan: Boolean from Standard = Standard_False) |
43 | ---Purpose: Constructor. Initializes the object with the face and the |
44 | -- flag IsUseSpan that says if it is necessary to define |
45 | -- spans on a face. This option has an effect only for |
46 | -- BSpline faces. Spans are returned by the methods GetUKnots |
47 | -- and GetTKnots. |
48 | ---C++: inline |
49 | returns Face from BRepGProp; |
50 | |
51 | Load(me : in out; F : Face from TopoDS) |
52 | is static; |
53 | |
54 | VIntegrationOrder (me) returns Integer |
55 | is static; |
56 | |
57 | NaturalRestriction(me) returns Boolean |
58 | ---Purpose: Returns Standard_True if the face is not trimmed. |
59 | ---C++: inline |
60 | is static; |
61 | |
62 | Value2d (me; U :Real) returns Pnt2d from gp |
63 | ---Purpose: Returns the value of the boundary curve of the face. |
64 | ---C++: inline |
65 | is static; |
66 | |
67 | SIntOrder (me; Eps :Real) returns Integer |
68 | is static; |
69 | SVIntSubs (me) returns Integer |
70 | is static; |
71 | SUIntSubs (me) returns Integer |
72 | is static; |
73 | UKnots(me; Knots : out Array1OfReal from TColStd) |
74 | is static; |
75 | VKnots(me; Knots : out Array1OfReal from TColStd) |
76 | is static; |
77 | LIntOrder (me; Eps :Real) returns Integer |
78 | is static; |
79 | LIntSubs (me) returns Integer |
80 | is static; |
81 | LKnots(me; Knots : out Array1OfReal from TColStd) |
82 | is static; |
83 | |
84 | -- |
85 | -- Methods required by GProp |
86 | -- |
87 | |
88 | UIntegrationOrder (me) returns Integer |
89 | ---Purpose: Returns the number of points required to do the |
90 | -- integration in the U parametric direction with |
91 | -- a good accuracy. |
92 | is static; |
93 | |
94 | Bounds(me; U1,U2,V1,V2 : out Real) |
95 | ---Purpose: Returns the parametric bounds of the Face. |
96 | is static; |
97 | |
98 | Normal (me; U, V : Real; P : out Pnt; VNor: out Vec) |
99 | ---Purpose: Computes the point of parameter U, V on the Face <S> and |
100 | -- the normal to the face at this point. |
101 | is static; |
102 | |
103 | Load(me : in out; E : Edge from TopoDS) |
104 | ---Purpose: Loading the boundary arc. |
105 | is static; |
106 | |
107 | FirstParameter (me) returns Real |
108 | ---Purpose: Returns the parametric value of the start point of |
109 | -- the current arc of curve. |
110 | ---C++: inline |
111 | is static; |
112 | |
113 | LastParameter (me) returns Real |
114 | ---Purpose: Returns the parametric value of the end point of |
115 | -- the current arc of curve. |
116 | ---C++: inline |
117 | is static; |
118 | |
119 | IntegrationOrder (me) returns Integer |
120 | ---Purpose: Returns the number of points required to do the |
121 | -- integration along the parameter of curve. |
122 | is static; |
123 | |
124 | D12d (me; U : Real ;P : out Pnt2d from gp ; |
125 | V1 : out Vec2d from gp) |
126 | ---Purpose: Returns the point of parameter U and the first derivative |
127 | -- at this point of a boundary curve. |
128 | ---C++: inline |
129 | is static; |
130 | |
131 | -- Modified by skv - Fri Dec 9 16:44:00 2005 Begin |
132 | Load(me : in out; IsFirstParam: Boolean from Standard; |
133 | theIsoType : IsoType from GeomAbs); |
134 | ---Purpose: Loading the boundary arc. This arc is either a top, bottom, |
135 | -- left or right bound of a UV rectangle in which the |
136 | -- parameters of surface are defined. |
137 | -- If IsFirstParam is equal to Standard_True, the face is |
138 | -- initialized by either left of bottom bound. Otherwise it is |
139 | -- initialized by the top or right one. |
140 | -- If theIsoType is equal to GeomAbs_IsoU, the face is |
141 | -- initialized with either left or right bound. Otherwise - |
142 | -- with either top or bottom one. |
143 | |
144 | GetUKnots(me; theUMin : Real from Standard; |
145 | theUMax : Real from Standard; |
146 | theUKnots: in out HArray1OfReal from TColStd); |
147 | ---Purpose: Returns an array of U knots of the face. The first and last |
148 | -- elements of the array will be theUMin and theUMax. The |
149 | -- middle elements will be the U Knots of the face greater |
150 | -- then theUMin and lower then theUMax in increasing order. |
151 | -- If the face is not a BSpline, the array initialized with |
152 | -- theUMin and theUMax only. |
153 | |
154 | GetTKnots(me; theTMin : Real from Standard; |
155 | theTMax : Real from Standard; |
156 | theTKnots: in out HArray1OfReal from TColStd); |
157 | ---Purpose: Returns an array of combination of T knots of the arc and |
158 | -- V knots of the face. The first and last elements of the |
159 | -- array will be theTMin and theTMax. The middle elements will |
160 | -- be the Knots of the arc and the values of parameters of |
161 | -- arc on which the value points have V coordinates close to V |
162 | -- knots of face. All the parameter will be greater then |
163 | -- theTMin and lower then theTMax in increasing order. |
164 | -- If the face is not a BSpline, the array initialized with |
165 | -- theTMin and theTMax only. |
166 | |
167 | -- Modified by skv - Fri Dec 9 16:44:00 2005 End |
168 | |
169 | fields |
170 | |
171 | mySurface : Surface from BRepAdaptor; |
172 | myCurve : Curve from Geom2dAdaptor; |
173 | mySReverse : Boolean from Standard; |
174 | myIsUseSpan: Boolean from Standard; |
175 | |
176 | end Face; |