File indexing completed on 2026-09-28 09:20:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _HelixBRep_BuilderHelix_HeaderFile
0015 #define _HelixBRep_BuilderHelix_HeaderFile
0016
0017 #include <Standard.hxx>
0018 #include <Standard_DefineAlloc.hxx>
0019 #include <Standard_Handle.hxx>
0020
0021 #include <gp_Ax3.hxx>
0022 #include <Standard_Integer.hxx>
0023 #include <Standard_Real.hxx>
0024 #include <GeomAbs_Shape.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <Standard_Boolean.hxx>
0027 #include <NCollection_Array1.hxx>
0028 #include <NCollection_List.hxx>
0029
0030 #include <NCollection_HArray1.hxx>
0031 class gp_Ax1;
0032 class gp_Pnt;
0033 class TopoDS_Wire;
0034 class TopoDS_Edge;
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049 class HelixBRep_BuilderHelix
0050 {
0051 public:
0052 DEFINE_STANDARD_ALLOC
0053
0054
0055 Standard_EXPORT HelixBRep_BuilderHelix();
0056 Standard_EXPORT virtual ~HelixBRep_BuilderHelix();
0057
0058
0059 Standard_EXPORT void SetParameters(const gp_Ax3& theAxis,
0060 const NCollection_Array1<double>& theDiams,
0061 const NCollection_Array1<double>& theHeights,
0062 const NCollection_Array1<double>& thePitches,
0063 const NCollection_Array1<bool>& theIsPitches);
0064
0065
0066 Standard_EXPORT void SetParameters(const gp_Ax3& theAxis,
0067 const double theDiam,
0068 const NCollection_Array1<double>& theHeights,
0069 const NCollection_Array1<double>& thePitches,
0070 const NCollection_Array1<bool>& theIsPitches);
0071
0072
0073 Standard_EXPORT void SetParameters(const gp_Ax3& theAxis,
0074 const double theDiam1,
0075 const double theDiam2,
0076 const NCollection_Array1<double>& theHeights,
0077 const NCollection_Array1<double>& thePitches,
0078 const NCollection_Array1<bool>& theIsPitches);
0079
0080
0081 Standard_EXPORT void SetParameters(const gp_Ax3& theAxis,
0082 const NCollection_Array1<double>& theDiams,
0083 const NCollection_Array1<double>& thePitches,
0084 const NCollection_Array1<double>& theNbTurns);
0085
0086
0087 Standard_EXPORT void SetParameters(const gp_Ax3& theAxis,
0088 const double theDiam,
0089 const NCollection_Array1<double>& thePitches,
0090 const NCollection_Array1<double>& theNbTurns);
0091
0092
0093 Standard_EXPORT void SetParameters(const gp_Ax3& theAxis,
0094 const double theDiam1,
0095 const double theDiam2,
0096 const NCollection_Array1<double>& thePitches,
0097 const NCollection_Array1<double>& theNbTurns);
0098
0099
0100 Standard_EXPORT void SetApproxParameters(const double theTolerance,
0101 const int theMaxDegree,
0102 const GeomAbs_Shape theContinuity);
0103
0104
0105 Standard_EXPORT void Perform();
0106
0107
0108 Standard_EXPORT double ToleranceReached() const;
0109
0110
0111 Standard_EXPORT int ErrorStatus() const;
0112
0113
0114 Standard_EXPORT int WarningStatus() const;
0115
0116
0117 Standard_EXPORT const TopoDS_Shape& Shape() const;
0118
0119 protected:
0120 gp_Ax3 myAxis3;
0121 occ::handle<NCollection_HArray1<double>> myDiams;
0122 occ::handle<NCollection_HArray1<double>> myHeights;
0123 occ::handle<NCollection_HArray1<double>> myPitches;
0124 occ::handle<NCollection_HArray1<bool>> myIsPitches;
0125 double myTolerance;
0126 double myTolReached;
0127 GeomAbs_Shape myContinuity;
0128 int myMaxDegree;
0129 int myMaxSegments;
0130 int myErrorStatus;
0131 int myWarningStatus;
0132 TopoDS_Shape myShape;
0133
0134 private:
0135 Standard_EXPORT void BuildPart(const gp_Ax1& theAxis,
0136 const gp_Pnt& thePStart,
0137 const double theHeight,
0138 const double thePitch,
0139 const double theTaperAngle,
0140 const bool theIsClockwise,
0141 TopoDS_Wire& thePart);
0142
0143 Standard_EXPORT void Smoothing(NCollection_List<TopoDS_Shape>& theParts);
0144
0145 Standard_EXPORT void SmoothingEdges(TopoDS_Edge& thePrev, TopoDS_Edge& theNext);
0146
0147 int myNParts;
0148 };
0149
0150 #endif