File indexing completed on 2026-09-22 08:57:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _Extrema_GlobOptFuncCQuadric_HeaderFile
0015 #define _Extrema_GlobOptFuncCQuadric_HeaderFile
0016
0017 #include <Adaptor3d_Surface.hxx>
0018 #include <math_MultipleVarFunction.hxx>
0019 #include <GeomAbs_SurfaceType.hxx>
0020 #include <gp_Pln.hxx>
0021 #include <gp_Cylinder.hxx>
0022 #include <gp_Cone.hxx>
0023 #include <gp_Sphere.hxx>
0024 #include <gp_Torus.hxx>
0025
0026
0027
0028 class Extrema_GlobOptFuncCQuadric : public math_MultipleVarFunction
0029 {
0030 public:
0031
0032 Standard_EXPORT Extrema_GlobOptFuncCQuadric(const Adaptor3d_Curve* C);
0033
0034 Standard_EXPORT Extrema_GlobOptFuncCQuadric(const Adaptor3d_Curve* C,
0035 const double theTf,
0036 const double theTl);
0037
0038 Standard_EXPORT Extrema_GlobOptFuncCQuadric(const Adaptor3d_Curve* C, const Adaptor3d_Surface* S);
0039
0040 Standard_EXPORT void LoadQuad(const Adaptor3d_Surface* S,
0041 const double theUf,
0042 const double theUl,
0043 const double theVf,
0044 const double theVl);
0045
0046 Standard_EXPORT int NbVariables() const override;
0047
0048 Standard_EXPORT bool Value(const math_Vector& theX, double& theF) override;
0049
0050 Standard_EXPORT void QuadricParameters(const math_Vector& theCT, math_Vector& theUV) const;
0051
0052 private:
0053 bool checkInputData(const math_Vector& X, double& ct);
0054
0055 void value(double ct, double& F);
0056
0057 const Adaptor3d_Curve* myC;
0058 const Adaptor3d_Surface* myS;
0059 GeomAbs_SurfaceType mySType;
0060 gp_Pln myPln;
0061 gp_Cone myCone;
0062 gp_Cylinder myCylinder;
0063 gp_Sphere mySphere;
0064 gp_Torus myTorus;
0065 gp_Pnt myPTrim[4];
0066
0067 double myTf;
0068 double myTl;
0069 double myUf;
0070 double myUl;
0071 double myVf;
0072 double myVl;
0073 };
0074
0075 #endif