|
|
|||
File indexing completed on 2026-09-28 09:20:08
0001 // Copyright (c) 2025 OPEN CASCADE SAS 0002 // 0003 // This file is part of Open CASCADE Technology software library. 0004 // 0005 // This library is free software; you can redistribute it and/or modify it under 0006 // the terms of the GNU Lesser General Public License version 2.1 as published 0007 // by the Free Software Foundation, with special exception defined in the file 0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0009 // distribution for complete text of the license and disclaimer of any warranty. 0010 // 0011 // Alternatively, this file may be used under the terms of Open CASCADE 0012 // commercial license or contractual agreement. 0013 0014 #ifndef _GeomEval_ParaboloidSurface_HeaderFile 0015 #define _GeomEval_ParaboloidSurface_HeaderFile 0016 0017 #include <Geom_ElementarySurface.hxx> 0018 0019 //! Describes a circular paraboloid surface of revolution. 0020 //! A paraboloid is defined by its focal distance and is positioned 0021 //! in space by a coordinate system (a gp_Ax3 object), the origin 0022 //! of which is the vertex of the paraboloid. 0023 //! 0024 //! The parametric equation of the paraboloid is: 0025 //! @code 0026 //! P(u,v) = O + v*cos(u)*XDir + v*sin(u)*YDir + v^2/(4*F)*ZDir 0027 //! @endcode 0028 //! where: 0029 //! - O, XDir, YDir and ZDir are respectively the origin, 0030 //! the "X Direction", the "Y Direction" and the "Z Direction" 0031 //! of its local coordinate system, and 0032 //! - F is the focal distance. 0033 //! 0034 //! The parametric range is: 0035 //! - [0, 2*Pi] for u, and 0036 //! - (-inf, +inf) for v. 0037 //! 0038 //! The implicit equation in local coordinates is: 0039 //! @code 0040 //! X^2 + Y^2 - 4*F*Z = 0 0041 //! @endcode 0042 class GeomEval_ParaboloidSurface : public Geom_ElementarySurface 0043 { 0044 public: 0045 //! Creates a paraboloid surface with the given local coordinate system 0046 //! and focal distance. 0047 //! @param[in] thePosition the local coordinate system 0048 //! @param[in] theFocal the focal distance (must be > 0) 0049 //! @throw Standard_ConstructionError if theFocal <= 0 0050 Standard_EXPORT GeomEval_ParaboloidSurface(const gp_Ax3& thePosition, double theFocal); 0051 0052 //! Returns the focal distance of this paraboloid. 0053 Standard_EXPORT double Focal() const; 0054 0055 //! Assigns the value theFocal to the focal distance of this paraboloid. 0056 //! @param[in] theFocal the new focal distance (must be > 0) 0057 //! @throw Standard_ConstructionError if theFocal <= 0 0058 Standard_EXPORT void SetFocal(double theFocal); 0059 0060 //! Reversal is not supported for this eval surface. 0061 //! @throw Standard_NotImplemented 0062 Standard_EXPORT void UReverse() final; 0063 0064 //! Reversal is not supported for this eval surface. 0065 //! @throw Standard_NotImplemented 0066 Standard_EXPORT void VReverse() final; 0067 0068 //! Reversal is not supported for this eval surface. 0069 //! @throw Standard_NotImplemented 0070 Standard_EXPORT double UReversedParameter(const double U) const final; 0071 0072 //! Reversal is not supported for this eval surface. 0073 //! @throw Standard_NotImplemented 0074 Standard_EXPORT double VReversedParameter(const double V) const final; 0075 0076 //! Returns the parametric bounds U1, U2, V1 and V2 of this paraboloid. 0077 //! @param[out] U1 lower U bound (0) 0078 //! @param[out] U2 upper U bound (2*Pi) 0079 //! @param[out] V1 lower V bound (-Precision::Infinite()) 0080 //! @param[out] V2 upper V bound (Precision::Infinite()) 0081 Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final; 0082 0083 //! Returns True. The paraboloid is closed in U (period 2*Pi). 0084 Standard_EXPORT bool IsUClosed() const final; 0085 0086 //! Returns False. 0087 Standard_EXPORT bool IsVClosed() const final; 0088 0089 //! Returns True. The paraboloid is periodic in U (period 2*Pi). 0090 Standard_EXPORT bool IsUPeriodic() const final; 0091 0092 //! Returns False. 0093 Standard_EXPORT bool IsVPeriodic() const final; 0094 0095 //! Computes the U isoparametric curve. 0096 //! For a paraboloid, the U isoparametric curve is a parabola, 0097 //! which is not a standard Geom_Curve type. 0098 //! @throw Standard_NotImplemented 0099 Standard_EXPORT occ::handle<Geom_Curve> UIso(const double U) const final; 0100 0101 //! Computes the V isoparametric curve. 0102 //! For a paraboloid, the V isoparametric curve is a circle of radius |v|, 0103 //! which degenerates to a point at v=0. 0104 //! @throw Standard_NotImplemented 0105 Standard_EXPORT occ::handle<Geom_Curve> VIso(const double V) const final; 0106 0107 //! Computes the point P(U, V) on the surface. 0108 //! @code 0109 //! P(U, V) = O + V*cos(U)*XDir + V*sin(U)*YDir + V^2/(4*F)*ZDir 0110 //! @endcode 0111 Standard_EXPORT gp_Pnt EvalD0(const double U, const double V) const final; 0112 0113 //! Computes the point and the first partial derivatives at (U, V). 0114 Standard_EXPORT Geom_Surface::ResD1 EvalD1(const double U, const double V) const final; 0115 0116 //! Computes the point and partial derivatives up to 2nd order at (U, V). 0117 Standard_EXPORT Geom_Surface::ResD2 EvalD2(const double U, const double V) const final; 0118 0119 //! Computes the point and partial derivatives up to 3rd order at (U, V). 0120 Standard_EXPORT Geom_Surface::ResD3 EvalD3(const double U, const double V) const final; 0121 0122 //! Computes the derivative of order Nu in the direction u 0123 //! and Nv in the direction v. 0124 //! @param[in] U the u parameter 0125 //! @param[in] V the v parameter 0126 //! @param[in] Nu derivative order in u (must be >= 0) 0127 //! @param[in] Nv derivative order in v (must be >= 0) 0128 //! @return the derivative vector 0129 //! @throw Geom_UndefinedDerivative if Nu + Nv < 1 or Nu < 0 or Nv < 0 0130 Standard_EXPORT gp_Vec EvalDN(const double U, 0131 const double V, 0132 const int Nu, 0133 const int Nv) const final; 0134 0135 //! Transformation is not supported for this eval geometry. 0136 //! @throw Standard_NotImplemented 0137 Standard_EXPORT void Transform(const gp_Trsf& T) final; 0138 0139 //! Creates a new object which is a copy of this paraboloid. 0140 Standard_EXPORT occ::handle<Geom_Geometry> Copy() const final; 0141 0142 //! Dumps the content of me into the stream. 0143 Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; 0144 0145 //! Returns the coefficients of the implicit equation of the 0146 //! quadric in the absolute Cartesian coordinate system: 0147 //! @code 0148 //! A1*X^2 + A2*Y^2 + A3*Z^2 + 2*(B1*X*Y + B2*X*Z + B3*Y*Z) + 0149 //! 2*(C1*X + C2*Y + C3*Z) + D = 0 0150 //! @endcode 0151 //! In local coordinates the equation is: X^2 + Y^2 - 4*F*Z = 0. 0152 Standard_EXPORT void Coefficients(double& A1, 0153 double& A2, 0154 double& A3, 0155 double& B1, 0156 double& B2, 0157 double& B3, 0158 double& C1, 0159 double& C2, 0160 double& C3, 0161 double& D) const; 0162 0163 DEFINE_STANDARD_RTTIEXT(GeomEval_ParaboloidSurface, Geom_ElementarySurface) 0164 0165 private: 0166 double myFocal; 0167 }; 0168 0169 #endif // _GeomEval_ParaboloidSurface_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|