|
||||
File indexing completed on 2025-01-18 10:03:42
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 0036 class GeomPlate_Surface; 0037 DEFINE_STANDARD_HANDLE(GeomPlate_Surface, Geom_Surface) 0038 0039 0040 //! Describes the characteristics of plate surface objects 0041 //! returned by BuildPlateSurface::Surface. These can be 0042 //! used to verify the quality of the resulting surface before 0043 //! approximating it to a Geom_BSpline surface generated 0044 //! by MakeApprox. This proves necessary in cases where 0045 //! you want to use the resulting surface as the support for 0046 //! a shape. The algorithmically generated surface cannot 0047 //! fill this function as is, and as a result must be converted first. 0048 class GeomPlate_Surface : public Geom_Surface 0049 { 0050 0051 public: 0052 0053 0054 Standard_EXPORT GeomPlate_Surface(const Handle(Geom_Surface)& Surfinit, const Plate_Plate& Surfinter); 0055 0056 0057 //! Reverses the U direction of parametrization of <me>. 0058 //! The bounds of the surface are not modified. 0059 Standard_EXPORT void UReverse() Standard_OVERRIDE; 0060 0061 //! Return the parameter on the Ureversed surface for 0062 //! the point of parameter U on <me>. 0063 //! @code 0064 //! me->UReversed()->Value(me->UReversedParameter(U),V) 0065 //! @endcode 0066 //! is the same point as 0067 //! @code 0068 //! me->Value(U,V) 0069 //! @endcode 0070 Standard_EXPORT Standard_Real UReversedParameter (const Standard_Real U) const Standard_OVERRIDE; 0071 0072 0073 //! Reverses the V direction of parametrization of <me>. 0074 //! The bounds of the surface are not modified. 0075 Standard_EXPORT void VReverse() Standard_OVERRIDE; 0076 0077 //! Return the parameter on the Vreversed surface for 0078 //! the point of parameter V on <me>. 0079 //! @code 0080 //! me->VReversed()->Value(U,me->VReversedParameter(V)) 0081 //! @endcode 0082 //! is the same point as 0083 //! @code 0084 //! me->Value(U,V) 0085 //! @endcode 0086 Standard_EXPORT Standard_Real VReversedParameter (const Standard_Real V) const Standard_OVERRIDE; 0087 0088 //! Computes the parameters on the transformed surface for 0089 //! the transform of the point of parameters U,V on <me>. 0090 //! @code 0091 //! me->Transformed(T)->Value(U',V') 0092 //! @endcode 0093 //! is the same point as 0094 //! @code 0095 //! me->Value(U,V).Transformed(T) 0096 //! @endcode 0097 //! Where U',V' are the new values of U,V after calling 0098 //! @code 0099 //! me->TransformParameters(U,V,T) 0100 //! @endcode 0101 //! This methods does not change <U> and <V> 0102 //! 0103 //! It can be redefined. For example on the Plane, 0104 //! Cylinder, Cone, Revolved and Extruded surfaces. 0105 Standard_EXPORT virtual void TransformParameters (Standard_Real& U, Standard_Real& V, const gp_Trsf& T) const Standard_OVERRIDE; 0106 0107 //! Returns a 2d transformation used to find the new 0108 //! parameters of a point on the transformed surface. 0109 //! @code 0110 //! me->Transformed(T)->Value(U',V') 0111 //! @endcode 0112 //! is the same point as 0113 //! @code 0114 //! me->Value(U,V).Transformed(T) 0115 //! @endcode 0116 //! Where U',V' are obtained by transforming U,V with 0117 //! the 2d transformation returned by 0118 //! @code 0119 //! me->ParametricTransformation(T) 0120 //! @endcode 0121 //! This method returns an identity transformation 0122 //! 0123 //! It can be redefined. For example on the Plane, 0124 //! Cylinder, Cone, Revolved and Extruded surfaces. 0125 Standard_EXPORT virtual gp_GTrsf2d ParametricTransformation (const gp_Trsf& T) const Standard_OVERRIDE; 0126 0127 Standard_EXPORT void Bounds (Standard_Real& U1, Standard_Real& U2, Standard_Real& V1, Standard_Real& V2) const Standard_OVERRIDE; 0128 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 0138 //! Is the surface closed in the parametric direction V ? 0139 //! Returns True if for each parameter U the distance 0140 //! between the point P (U, VFirst) and P (U, VLast) is 0141 //! lower or equal to Resolution from gp. VFirst and VLast 0142 //! are the parametric bounds in the V direction. 0143 Standard_EXPORT Standard_Boolean IsVClosed() const Standard_OVERRIDE; 0144 0145 0146 //! Is the parametrization of a surface periodic in the 0147 //! direction U ? 0148 //! It is possible only if the surface is closed in this 0149 //! parametric direction and if the following relation is 0150 //! satisfied : 0151 //! for each parameter V the distance between the point 0152 //! P (U, V) and the point P (U + T, V) is lower or equal 0153 //! to Resolution from package gp. T is the parametric period 0154 //! and must be a constant. 0155 Standard_EXPORT Standard_Boolean IsUPeriodic() const Standard_OVERRIDE; 0156 0157 //! returns the Uperiod. 0158 //! raises if the surface is not uperiodic. 0159 Standard_EXPORT virtual Standard_Real UPeriod() const Standard_OVERRIDE; 0160 0161 0162 //! Is the parametrization of a surface periodic in the 0163 //! direction U ? 0164 //! It is possible only if the surface is closed in this 0165 //! parametric direction and if the following relation is 0166 //! satisfied : 0167 //! for each parameter V the distance between the point 0168 //! P (U, V) and the point P (U + T, V) is lower or equal 0169 //! to Resolution from package gp. T is the parametric period 0170 //! and must be a constant. 0171 Standard_EXPORT Standard_Boolean IsVPeriodic() const Standard_OVERRIDE; 0172 0173 //! returns the Vperiod. 0174 //! raises if the surface is not vperiodic. 0175 Standard_EXPORT virtual Standard_Real VPeriod() const Standard_OVERRIDE; 0176 0177 //! Computes the U isoparametric curve. 0178 Standard_EXPORT Handle(Geom_Curve) UIso (const Standard_Real U) const Standard_OVERRIDE; 0179 0180 //! Computes the V isoparametric curve. 0181 Standard_EXPORT Handle(Geom_Curve) VIso (const Standard_Real V) const Standard_OVERRIDE; 0182 0183 0184 //! Global Continuity of the surface in direction U and V : 0185 //! C0 : only geometric continuity, 0186 //! C1 : continuity of the first derivative all along the surface, 0187 //! C2 : continuity of the second derivative all along the surface, 0188 //! C3 : continuity of the third derivative all along the surface, 0189 //! G1 : tangency continuity all along the surface, 0190 //! G2 : curvature continuity all along the surface, 0191 //! CN : the order of continuity is infinite. 0192 //! Example : 0193 //! If the surface is C1 in the V parametric direction and C2 0194 //! in the U parametric direction Shape = C1. 0195 Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; 0196 0197 0198 //! Returns the order of continuity of the surface in the 0199 //! U parametric direction. 0200 //! Raised if N < 0. 0201 Standard_EXPORT Standard_Boolean IsCNu (const Standard_Integer N) const Standard_OVERRIDE; 0202 0203 0204 //! Returns the order of continuity of the surface in the 0205 //! V parametric direction. 0206 //! Raised if N < 0. 0207 Standard_EXPORT Standard_Boolean IsCNv (const Standard_Integer N) const Standard_OVERRIDE; 0208 0209 0210 //! Computes the point of parameter U,V on the surface. 0211 //! 0212 //! Raised only for an "OffsetSurface" if it is not possible to 0213 //! compute the current point. 0214 Standard_EXPORT void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const Standard_OVERRIDE; 0215 0216 0217 //! Computes the point P and the first derivatives in the 0218 //! directions U and V at this point. 0219 //! Raised if the continuity of the surface is not C1. 0220 Standard_EXPORT void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const Standard_OVERRIDE; 0221 0222 0223 //! Computes the point P, the first and the second derivatives in 0224 //! the directions U and V at this point. 0225 //! Raised if the continuity of the surface is not C2. 0226 Standard_EXPORT void D2 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV) const Standard_OVERRIDE; 0227 0228 0229 //! Computes the point P, the first,the second and the third 0230 //! derivatives in the directions U and V at this point. 0231 //! Raised if the continuity of the surface is not C2. 0232 Standard_EXPORT void D3 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV) const Standard_OVERRIDE; 0233 0234 //! ---Purpose ; 0235 //! Computes the derivative of order Nu in the direction U and Nv 0236 //! in the direction V at the point P(U, V). 0237 //! 0238 //! Raised if the continuity of the surface is not CNu in the U 0239 //! direction or not CNv in the V direction. 0240 //! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. 0241 Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const Standard_OVERRIDE; 0242 0243 Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; 0244 0245 0246 //! Transformation of a geometric object. This tansformation 0247 //! can be a translation, a rotation, a symmetry, a scaling 0248 //! or a complex transformation obtained by combination of 0249 //! the previous elementaries transformations. 0250 //! (see class Transformation of the package Geom). 0251 Standard_EXPORT void Transform (const gp_Trsf& T) Standard_OVERRIDE; 0252 0253 Standard_EXPORT Handle(Geom_Surface) CallSurfinit() const; 0254 0255 Standard_EXPORT void SetBounds (const Standard_Real Umin, const Standard_Real Umax, const Standard_Real Vmin, const Standard_Real Vmax); 0256 0257 Standard_EXPORT void RealBounds (Standard_Real& U1, Standard_Real& U2, Standard_Real& V1, Standard_Real& V2) const; 0258 0259 Standard_EXPORT void Constraints (TColgp_SequenceOfXY& Seq) const; 0260 0261 0262 0263 0264 DEFINE_STANDARD_RTTIEXT(GeomPlate_Surface,Geom_Surface) 0265 0266 protected: 0267 0268 0269 0270 0271 private: 0272 0273 0274 Plate_Plate mySurfinter; 0275 Handle(Geom_Surface) mySurfinit; 0276 Standard_Real myUmin; 0277 Standard_Real myUmax; 0278 Standard_Real myVmin; 0279 Standard_Real myVmax; 0280 0281 0282 }; 0283 0284 0285 0286 0287 0288 0289 0290 #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 |