Back to home page

EIC code displayed by LXR

 
 

    


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_CircularHelicoidSurface_HeaderFile
0015 #define _GeomEval_CircularHelicoidSurface_HeaderFile
0016 
0017 #include <Geom_ElementarySurface.hxx>
0018 
0019 //! Describes a circular helicoid surface.
0020 //! A ruled surface generated by a line segment rotating uniformly about an axis
0021 //! while translating along it. Named "circular" because the generating line
0022 //! sweeps circular helices at constant radius.
0023 //!
0024 //! The parametric equation is:
0025 //! @code
0026 //!   S(u,v) = O + v*cos(u)*XDir + v*sin(u)*YDir + (P*u/(2*Pi))*ZDir
0027 //! @endcode
0028 //! where:
0029 //! - O, XDir, YDir, ZDir are from the local coordinate system (gp_Ax3),
0030 //! - P is the pitch (axial advance per 2*Pi turn, must be != 0).
0031 //!
0032 //! The parametric range is (-inf, +inf) for both u and v.
0033 //! The surface is neither periodic nor closed. Continuity is GeomAbs_CN.
0034 class GeomEval_CircularHelicoidSurface : public Geom_ElementarySurface
0035 {
0036 public:
0037   //! Creates a circular helicoid surface.
0038   //! @param[in] thePosition the local coordinate system
0039   //! @param[in] thePitch the axial advance per 2*Pi turn (must be != 0)
0040   //! @throw Standard_ConstructionError if thePitch == 0
0041   Standard_EXPORT GeomEval_CircularHelicoidSurface(const gp_Ax3& thePosition, double thePitch);
0042 
0043   //! Returns the pitch.
0044   Standard_EXPORT double Pitch() const;
0045 
0046   //! Sets a new pitch value.
0047   //! @param[in] thePitch the new pitch (must be != 0)
0048   //! @throw Standard_ConstructionError if thePitch == 0
0049   Standard_EXPORT void SetPitch(double thePitch);
0050 
0051   //! Reversal is not supported for this eval surface.
0052   //! @throw Standard_NotImplemented
0053   Standard_EXPORT void UReverse() final;
0054 
0055   //! Reversal is not supported for this eval surface.
0056   //! @throw Standard_NotImplemented
0057   Standard_EXPORT void VReverse() final;
0058 
0059   //! Reversal is not supported for this eval surface.
0060   //! @throw Standard_NotImplemented
0061   Standard_EXPORT double UReversedParameter(const double U) const final;
0062 
0063   //! Reversal is not supported for this eval surface.
0064   //! @throw Standard_NotImplemented
0065   Standard_EXPORT double VReversedParameter(const double V) const final;
0066 
0067   //! Returns infinite bounds for both parameters.
0068   Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final;
0069 
0070   //! Returns false.
0071   Standard_EXPORT bool IsUClosed() const final;
0072 
0073   //! Returns false.
0074   Standard_EXPORT bool IsVClosed() const final;
0075 
0076   //! Returns false.
0077   Standard_EXPORT bool IsUPeriodic() const final;
0078 
0079   //! Returns false.
0080   Standard_EXPORT bool IsVPeriodic() const final;
0081 
0082   //! Isoparametric curve extraction is not supported for this eval surface.
0083   //! @throw Standard_NotImplemented
0084   Standard_EXPORT occ::handle<Geom_Curve> UIso(const double U) const final;
0085 
0086   //! Isoparametric curve extraction is not supported for this eval surface.
0087   //! @throw Standard_NotImplemented
0088   Standard_EXPORT occ::handle<Geom_Curve> VIso(const double V) const final;
0089 
0090   //! Computes the point S(U, V) on the surface.
0091   Standard_EXPORT gp_Pnt EvalD0(const double U, const double V) const final;
0092 
0093   //! Computes the point and first partial derivatives at (U, V).
0094   Standard_EXPORT Geom_Surface::ResD1 EvalD1(const double U, const double V) const final;
0095 
0096   //! Computes the point and partial derivatives up to 2nd order at (U, V).
0097   Standard_EXPORT Geom_Surface::ResD2 EvalD2(const double U, const double V) const final;
0098 
0099   //! Computes the point and partial derivatives up to 3rd order at (U, V).
0100   Standard_EXPORT Geom_Surface::ResD3 EvalD3(const double U, const double V) const final;
0101 
0102   //! Computes the derivative of order Nu in u and Nv in v.
0103   //! @throw Geom_UndefinedDerivative if Nu + Nv < 1 or Nu < 0 or Nv < 0
0104   Standard_EXPORT gp_Vec EvalDN(const double U,
0105                                 const double V,
0106                                 const int    Nu,
0107                                 const int    Nv) const final;
0108 
0109   //! Transformation is not supported for this eval geometry.
0110   //! @throw Standard_NotImplemented
0111   Standard_EXPORT void Transform(const gp_Trsf& T) final;
0112 
0113   //! Creates a new object which is a copy of this surface.
0114   Standard_EXPORT occ::handle<Geom_Geometry> Copy() const final;
0115 
0116   //! Dumps the content of me into the stream.
0117   Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final;
0118 
0119   DEFINE_STANDARD_RTTIEXT(GeomEval_CircularHelicoidSurface, Geom_ElementarySurface)
0120 
0121 private:
0122   double myPitch; //!< Axial advance per 2*Pi turn
0123 };
0124 
0125 #endif // _GeomEval_CircularHelicoidSurface_HeaderFile