File indexing completed on 2026-09-12 09:16:33
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BlendFunc_Ruled_HeaderFile
0018 #define _BlendFunc_Ruled_HeaderFile
0019
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <gp_Pnt.hxx>
0022 #include <gp_Vec.hxx>
0023 #include <gp_Vec2d.hxx>
0024 #include <Blend_Function.hxx>
0025 #include <math_Vector.hxx>
0026 #include <NCollection_Array1.hxx>
0027 #include <GeomAbs_Shape.hxx>
0028 #include <Standard_Integer.hxx>
0029 #include <gp_Pnt2d.hxx>
0030
0031 class math_Matrix;
0032 class Blend_Point;
0033 class gp_Ax1;
0034
0035 class BlendFunc_Ruled : public Blend_Function
0036 {
0037 public:
0038 DEFINE_STANDARD_ALLOC
0039
0040 Standard_EXPORT BlendFunc_Ruled(const occ::handle<Adaptor3d_Surface>& S1,
0041 const occ::handle<Adaptor3d_Surface>& S2,
0042 const occ::handle<Adaptor3d_Curve>& C);
0043
0044
0045 Standard_EXPORT int NbEquations() const override;
0046
0047
0048
0049
0050
0051 Standard_EXPORT bool Value(const math_Vector& X, math_Vector& F) override;
0052
0053
0054
0055
0056
0057 Standard_EXPORT bool Derivatives(const math_Vector& X, math_Matrix& D) override;
0058
0059
0060
0061
0062
0063 Standard_EXPORT bool Values(const math_Vector& X, math_Vector& F, math_Matrix& D) override;
0064
0065 Standard_EXPORT void Set(const double Param) override;
0066
0067 Standard_EXPORT void Set(const double First, const double Last) override;
0068
0069 Standard_EXPORT void GetTolerance(math_Vector& Tolerance, const double Tol) const override;
0070
0071 Standard_EXPORT void GetBounds(math_Vector& InfBound, math_Vector& SupBound) const override;
0072
0073 Standard_EXPORT bool IsSolution(const math_Vector& Sol, const double Tol) override;
0074
0075
0076
0077 Standard_EXPORT double GetMinimalDistance() const override;
0078
0079 Standard_EXPORT const gp_Pnt& PointOnS1() const override;
0080
0081 Standard_EXPORT const gp_Pnt& PointOnS2() const override;
0082
0083 Standard_EXPORT bool IsTangencyPoint() const override;
0084
0085 Standard_EXPORT const gp_Vec& TangentOnS1() const override;
0086
0087 Standard_EXPORT const gp_Vec2d& Tangent2dOnS1() const override;
0088
0089 Standard_EXPORT const gp_Vec& TangentOnS2() const override;
0090
0091 Standard_EXPORT const gp_Vec2d& Tangent2dOnS2() const override;
0092
0093
0094
0095
0096
0097 Standard_EXPORT void Tangent(const double U1,
0098 const double V1,
0099 const double U2,
0100 const double V2,
0101 gp_Vec& TgFirst,
0102 gp_Vec& TgLast,
0103 gp_Vec& NormFirst,
0104 gp_Vec& NormLast) const override;
0105
0106 Standard_EXPORT bool GetSection(const double Param,
0107 const double U1,
0108 const double V1,
0109 const double U2,
0110 const double V2,
0111 NCollection_Array1<gp_Pnt>& tabP,
0112 NCollection_Array1<gp_Vec>& tabV);
0113
0114
0115 Standard_EXPORT bool IsRational() const override;
0116
0117
0118 Standard_EXPORT double GetSectionSize() const override;
0119
0120
0121
0122 Standard_EXPORT void GetMinimalWeight(NCollection_Array1<double>& Weigths) const override;
0123
0124
0125
0126 Standard_EXPORT int NbIntervals(const GeomAbs_Shape S) const override;
0127
0128
0129
0130
0131
0132
0133
0134 Standard_EXPORT void Intervals(NCollection_Array1<double>& T,
0135 const GeomAbs_Shape S) const override;
0136
0137 Standard_EXPORT void GetShape(int& NbPoles, int& NbKnots, int& Degree, int& NbPoles2d) override;
0138
0139
0140
0141
0142
0143
0144 Standard_EXPORT void GetTolerance(const double BoundTol,
0145 const double SurfTol,
0146 const double AngleTol,
0147 math_Vector& Tol3d,
0148 math_Vector& Tol1D) const override;
0149
0150 Standard_EXPORT void Knots(NCollection_Array1<double>& TKnots) override;
0151
0152 Standard_EXPORT void Mults(NCollection_Array1<int>& TMults) override;
0153
0154
0155 Standard_EXPORT bool Section(const Blend_Point& P,
0156 NCollection_Array1<gp_Pnt>& Poles,
0157 NCollection_Array1<gp_Vec>& DPoles,
0158 NCollection_Array1<gp_Vec>& D2Poles,
0159 NCollection_Array1<gp_Pnt2d>& Poles2d,
0160 NCollection_Array1<gp_Vec2d>& DPoles2d,
0161 NCollection_Array1<gp_Vec2d>& D2Poles2d,
0162 NCollection_Array1<double>& Weigths,
0163 NCollection_Array1<double>& DWeigths,
0164 NCollection_Array1<double>& D2Weigths) override;
0165
0166
0167 Standard_EXPORT bool Section(const Blend_Point& P,
0168 NCollection_Array1<gp_Pnt>& Poles,
0169 NCollection_Array1<gp_Vec>& DPoles,
0170 NCollection_Array1<gp_Pnt2d>& Poles2d,
0171 NCollection_Array1<gp_Vec2d>& DPoles2d,
0172 NCollection_Array1<double>& Weigths,
0173 NCollection_Array1<double>& DWeigths) override;
0174
0175 Standard_EXPORT void Section(const Blend_Point& P,
0176 NCollection_Array1<gp_Pnt>& Poles,
0177 NCollection_Array1<gp_Pnt2d>& Poles2d,
0178 NCollection_Array1<double>& Weigths) override;
0179
0180 Standard_EXPORT gp_Ax1 AxeRot(const double Prm);
0181
0182 Standard_EXPORT void Resolution(const int IC2d,
0183 const double Tol,
0184 double& TolU,
0185 double& TolV) const override;
0186
0187 private:
0188 occ::handle<Adaptor3d_Surface> surf1;
0189 occ::handle<Adaptor3d_Surface> surf2;
0190 occ::handle<Adaptor3d_Curve> curv;
0191 gp_Pnt pts1;
0192 gp_Pnt pts2;
0193 bool istangent;
0194 gp_Vec tg1;
0195 gp_Vec2d tg12d;
0196 gp_Vec tg2;
0197 gp_Vec2d tg22d;
0198 gp_Pnt ptgui;
0199 gp_Vec d1gui;
0200 gp_Vec d2gui;
0201 gp_Vec nplan;
0202 double normtg;
0203 double theD;
0204 double distmin;
0205 };
0206
0207 #endif