|
|
|||
File indexing completed on 2026-06-24 08:28:44
0001 // Created on: 1996-11-21 0002 // Created by: Joelle CHAUVET 0003 // Copyright (c) 1996-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _GeomPlate_Surface_HeaderFile 0018 #define _GeomPlate_Surface_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Plate_Plate.hxx> 0024 #include <Geom_Surface.hxx> 0025 #include <GeomAbs_Shape.hxx> 0026 #include <Standard_Integer.hxx> 0027 #include <TColgp_SequenceOfXY.hxx> 0028 class gp_Trsf; 0029 class gp_GTrsf2d; 0030 class Geom_Curve; 0031 class gp_Pnt; 0032 class gp_Vec; 0033 class Geom_Geometry; 0034 0035 class GeomPlate_Surface; 0036 DEFINE_STANDARD_HANDLE(GeomPlate_Surface, Geom_Surface) 0037 0038 //! Describes the characteristics of plate surface objects 0039 //! returned by BuildPlateSurface::Surface. These can be 0040 //! used to verify the quality of the resulting surface before 0041 //! approximating it to a Geom_BSpline surface generated 0042 //! by MakeApprox. This proves necessary in cases where 0043 //! you want to use the resulting surface as the support for 0044 //! a shape. The algorithmically generated surface cannot 0045 //! fill this function as is, and as a result must be converted first. 0046 class GeomPlate_Surface : public Geom_Surface 0047 { 0048 0049 public: 0050 Standard_EXPORT GeomPlate_Surface(const Handle(Geom_Surface)& Surfinit, 0051 const Plate_Plate& Surfinter); 0052 0053 //! Reverses the U direction of parametrization of <me>. 0054 //! The bounds of the surface are not modified. 0055 Standard_EXPORT void UReverse() Standard_OVERRIDE; 0056 0057 //! Return the parameter on the Ureversed surface for 0058 //! the point of parameter U on <me>. 0059 //! @code 0060 //! me->UReversed()->Value(me->UReversedParameter(U),V) 0061 //! @endcode 0062 //! is the same point as 0063 //! @code 0064 //! me->Value(U,V) 0065 //! @endcode 0066 Standard_EXPORT Standard_Real UReversedParameter(const Standard_Real U) const Standard_OVERRIDE; 0067 0068 //! Reverses the V direction of parametrization of <me>. 0069 //! The bounds of the surface are not modified. 0070 Standard_EXPORT void VReverse() Standard_OVERRIDE; 0071 0072 //! Return the parameter on the Vreversed surface for 0073 //! the point of parameter V on <me>. 0074 //! @code 0075 //! me->VReversed()->Value(U,me->VReversedParameter(V)) 0076 //! @endcode 0077 //! is the same point as 0078 //! @code 0079 //! me->Value(U,V) 0080 //! @endcode 0081 Standard_EXPORT Standard_Real VReversedParameter(const Standard_Real V) const Standard_OVERRIDE; 0082 0083 //! Computes the parameters on the transformed surface for 0084 //! the transform of the point of parameters U,V on <me>. 0085 //! @code 0086 //! me->Transformed(T)->Value(U',V') 0087 //! @endcode 0088 //! is the same point as 0089 //! @code 0090 //! me->Value(U,V).Transformed(T) 0091 //! @endcode 0092 //! Where U',V' are the new values of U,V after calling 0093 //! @code 0094 //! me->TransformParameters(U,V,T) 0095 //! @endcode 0096 //! This methods does not change <U> and <V> 0097 //! 0098 //! It can be redefined. For example on the Plane, 0099 //! Cylinder, Cone, Revolved and Extruded surfaces. 0100 Standard_EXPORT virtual void TransformParameters(Standard_Real& U, 0101 Standard_Real& V, 0102 const gp_Trsf& T) const Standard_OVERRIDE; 0103 0104 //! Returns a 2d transformation used to find the new 0105 //! parameters of a point on the transformed surface. 0106 //! @code 0107 //! me->Transformed(T)->Value(U',V') 0108 //! @endcode 0109 //! is the same point as 0110 //! @code 0111 //! me->Value(U,V).Transformed(T) 0112 //! @endcode 0113 //! Where U',V' are obtained by transforming U,V with 0114 //! the 2d transformation returned by 0115 //! @code 0116 //! me->ParametricTransformation(T) 0117 //! @endcode 0118 //! This method returns an identity transformation 0119 //! 0120 //! It can be redefined. For example on the Plane, 0121 //! Cylinder, Cone, Revolved and Extruded surfaces. 0122 Standard_EXPORT virtual gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const 0123 Standard_OVERRIDE; 0124 0125 Standard_EXPORT void Bounds(Standard_Real& U1, 0126 Standard_Real& U2, 0127 Standard_Real& V1, 0128 Standard_Real& V2) const Standard_OVERRIDE; 0129 0130 //! Is the surface closed in the parametric direction U ? 0131 //! Returns True if for each parameter V the distance 0132 //! between the point P (UFirst, V) and P (ULast, V) is 0133 //! lower or equal to Resolution from gp. UFirst and ULast 0134 //! are the parametric bounds in the U direction. 0135 Standard_EXPORT Standard_Boolean IsUClosed() const Standard_OVERRIDE; 0136 0137 //! Is the surface closed in the parametric direction V ? 0138 //! Returns True if for each parameter U the distance 0139 //! between the point P (U, VFirst) and P (U, VLast) is 0140 //! lower or equal to Resolution from gp. VFirst and VLast 0141 //! are the parametric bounds in the V direction. 0142 Standard_EXPORT Standard_Boolean IsVClosed() const Standard_OVERRIDE; 0143 0144 //! Is the parametrization of a surface periodic in the 0145 //! direction U ? 0146 //! It is possible only if the surface is closed in this 0147 //! parametric direction and if the following relation is 0148 //! satisfied : 0149 //! for each parameter V the distance between the point 0150 //! P (U, V) and the point P (U + T, V) is lower or equal 0151 //! to Resolution from package gp. T is the parametric period 0152 //! and must be a constant. 0153 Standard_EXPORT Standard_Boolean IsUPeriodic() const Standard_OVERRIDE; 0154 0155 //! returns the Uperiod. 0156 //! raises if the surface is not uperiodic. 0157 Standard_EXPORT virtual Standard_Real UPeriod() const Standard_OVERRIDE; 0158 0159 //! Is the parametrization of a surface periodic in the 0160 //! direction U ? 0161 //! It is possible only if the surface is closed in this 0162 //! parametric direction and if the following relation is 0163 //! satisfied : 0164 //! for each parameter V the distance between the point 0165 //! P (U, V) and the point P (U + T, V) is lower or equal 0166 //! to Resolution from package gp. T is the parametric period 0167 //! and must be a constant. 0168 Standard_EXPORT Standard_Boolean IsVPeriodic() const Standard_OVERRIDE; 0169 0170 //! returns the Vperiod. 0171 //! raises if the surface is not vperiodic. 0172 Standard_EXPORT virtual Standard_Real VPeriod() const Standard_OVERRIDE; 0173 0174 //! Computes the U isoparametric curve. 0175 Standard_EXPORT Handle(Geom_Curve) UIso(const Standard_Real U) const Standard_OVERRIDE; 0176 0177 //! Computes the V isoparametric curve. 0178 Standard_EXPORT Handle(Geom_Curve) VIso(const Standard_Real V) const Standard_OVERRIDE; 0179 0180 //! Global Continuity of the surface in direction U and V : 0181 //! C0 : only geometric continuity, 0182 //! C1 : continuity of the first derivative all along the surface, 0183 //! C2 : continuity of the second derivative all along the surface, 0184 //! C3 : continuity of the third derivative all along the surface, 0185 //! G1 : tangency continuity all along the surface, 0186 //! G2 : curvature continuity all along the surface, 0187 //! CN : the order of continuity is infinite. 0188 //! Example : 0189 //! If the surface is C1 in the V parametric direction and C2 0190 //! in the U parametric direction Shape = C1. 0191 Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; 0192 0193 //! Returns the order of continuity of the surface in the 0194 //! U parametric direction. 0195 //! Raised if N < 0. 0196 Standard_EXPORT Standard_Boolean IsCNu(const Standard_Integer N) const Standard_OVERRIDE; 0197 0198 //! Returns the order of continuity of the surface in the 0199 //! V parametric direction. 0200 //! Raised if N < 0. 0201 Standard_EXPORT Standard_Boolean IsCNv(const Standard_Integer N) const Standard_OVERRIDE; 0202 0203 //! Computes the point of parameter U,V on the surface. 0204 //! 0205 //! Raised only for an "OffsetSurface" if it is not possible to 0206 //! compute the current point. 0207 Standard_EXPORT void D0(const Standard_Real U, 0208 const Standard_Real V, 0209 gp_Pnt& P) const Standard_OVERRIDE; 0210 0211 //! Computes the point P and the first derivatives in the 0212 //! directions U and V at this point. 0213 //! Raised if the continuity of the surface is not C1. 0214 Standard_EXPORT void D1(const Standard_Real U, 0215 const Standard_Real V, 0216 gp_Pnt& P, 0217 gp_Vec& D1U, 0218 gp_Vec& D1V) const Standard_OVERRIDE; 0219 0220 //! Computes the point P, the first and the second derivatives in 0221 //! the directions U and V at this point. 0222 //! Raised if the continuity of the surface is not C2. 0223 Standard_EXPORT void D2(const Standard_Real U, 0224 const Standard_Real V, 0225 gp_Pnt& P, 0226 gp_Vec& D1U, 0227 gp_Vec& D1V, 0228 gp_Vec& D2U, 0229 gp_Vec& D2V, 0230 gp_Vec& D2UV) const Standard_OVERRIDE; 0231 0232 //! Computes the point P, the first,the second and the third 0233 //! derivatives in the directions U and V at this point. 0234 //! Raised if the continuity of the surface is not C2. 0235 Standard_EXPORT void D3(const Standard_Real U, 0236 const Standard_Real V, 0237 gp_Pnt& P, 0238 gp_Vec& D1U, 0239 gp_Vec& D1V, 0240 gp_Vec& D2U, 0241 gp_Vec& D2V, 0242 gp_Vec& D2UV, 0243 gp_Vec& D3U, 0244 gp_Vec& D3V, 0245 gp_Vec& D3UUV, 0246 gp_Vec& D3UVV) const Standard_OVERRIDE; 0247 0248 //! ---Purpose ; 0249 //! Computes the derivative of order Nu in the direction U and Nv 0250 //! in the direction V at the point P(U, V). 0251 //! 0252 //! Raised if the continuity of the surface is not CNu in the U 0253 //! direction or not CNv in the V direction. 0254 //! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. 0255 Standard_EXPORT gp_Vec DN(const Standard_Real U, 0256 const Standard_Real V, 0257 const Standard_Integer Nu, 0258 const Standard_Integer Nv) const Standard_OVERRIDE; 0259 0260 Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; 0261 0262 //! Transformation of a geometric object. This transformation 0263 //! can be a translation, a rotation, a symmetry, a scaling 0264 //! or a complex transformation obtained by combination of 0265 //! the previous elementaries transformations. 0266 //! (see class Transformation of the package Geom). 0267 Standard_EXPORT void Transform(const gp_Trsf& T) Standard_OVERRIDE; 0268 0269 Standard_EXPORT Handle(Geom_Surface) CallSurfinit() const; 0270 0271 Standard_EXPORT void SetBounds(const Standard_Real Umin, 0272 const Standard_Real Umax, 0273 const Standard_Real Vmin, 0274 const Standard_Real Vmax); 0275 0276 Standard_EXPORT void RealBounds(Standard_Real& U1, 0277 Standard_Real& U2, 0278 Standard_Real& V1, 0279 Standard_Real& V2) const; 0280 0281 Standard_EXPORT void Constraints(TColgp_SequenceOfXY& Seq) const; 0282 0283 DEFINE_STANDARD_RTTIEXT(GeomPlate_Surface, Geom_Surface) 0284 0285 protected: 0286 private: 0287 Plate_Plate mySurfinter; 0288 Handle(Geom_Surface) mySurfinit; 0289 Standard_Real myUmin; 0290 Standard_Real myUmax; 0291 Standard_Real myVmin; 0292 Standard_Real myVmax; 0293 }; 0294 0295 #endif // _GeomPlate_Surface_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|