Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-28 09:20:23

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 _HelixGeom_BuilderHelixGen_HeaderFile
0015 #define _HelixGeom_BuilderHelixGen_HeaderFile
0016 
0017 #include <Standard.hxx>
0018 #include <Standard_DefineAlloc.hxx>
0019 #include <Standard_Handle.hxx>
0020 
0021 #include <Standard_Real.hxx>
0022 #include <Standard_Boolean.hxx>
0023 #include <HelixGeom_BuilderApproxCurve.hxx>
0024 
0025 //! Base class for helix curve building algorithms with parameter management.
0026 //!
0027 //! This class extends HelixGeom_BuilderApproxCurve by adding helix-specific
0028 //! geometric parameters:
0029 //! - Parameter range (T1, T2) - angular range in radians
0030 //! - Pitch - vertical distance per full turn (2*PI radians)
0031 //! - Start radius (RStart) - radius at parameter T1
0032 //! - Taper angle - angle for radius variation (0 = cylindrical)
0033 //! - Orientation - clockwise or counter-clockwise
0034 //!
0035 //! Concrete implementations include:
0036 //! - HelixGeom_BuilderHelix: Single helix approximation
0037 //! - HelixGeom_BuilderHelixCoil: Multi-coil helix approximation
0038 //!
0039 //! @sa HelixGeom_BuilderApproxCurve, HelixGeom_HelixCurve
0040 class HelixGeom_BuilderHelixGen : public HelixGeom_BuilderApproxCurve
0041 {
0042 public:
0043   DEFINE_STANDARD_ALLOC
0044 
0045   //! Sets parameters for building helix curves
0046   Standard_EXPORT void SetCurveParameters(const double aT1,
0047                                           const double aT2,
0048                                           const double aPitch,
0049                                           const double aRStart,
0050                                           const double aTaperAngle,
0051                                           const bool   bIsClockwise);
0052 
0053   //! Gets parameters for building helix curves
0054   Standard_EXPORT void CurveParameters(double& aT1,
0055                                        double& aT2,
0056                                        double& aPitch,
0057                                        double& aRStart,
0058                                        double& aTaperAngle,
0059                                        bool&   bIsClockwise) const;
0060 
0061 protected:
0062   //! Sets default parameters
0063   Standard_EXPORT HelixGeom_BuilderHelixGen();
0064   Standard_EXPORT ~HelixGeom_BuilderHelixGen() override;
0065 
0066   double myT1;
0067   double myT2;
0068   double myPitch;
0069   double myRStart;
0070   double myTaperAngle;
0071   bool   myIsClockWise;
0072 };
0073 
0074 #endif // _HelixGeom_BuilderHelixGen_HeaderFile