mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-05 20:27:38 +08:00
Coding, Warnings - Refactor parameter naming in curve and surface evaluation methods (#1165)
- Standardize `EvalD0/EvalD1/EvalD2/EvalD3/EvalDN` parameter names to `theU` / `theV` (and `theN`, `theNu`, `theNv`) across multiple curve/surface adaptor classes. - Update method signatures to use `const double` / `const int` (top-level const) and add local aliases where needed to preserve existing internal variable naming. - Fix MSVC-warning-prone types/usages in `VrmlData_Scene::readLine()` (use `std::streamsize`, `std::ios::iostate`).
This commit is contained in:
@@ -320,7 +320,7 @@ double BRepAdaptor_CompCurve::Period() const
|
||||
return (TLast - TFirst);
|
||||
}
|
||||
|
||||
gp_Pnt BRepAdaptor_CompCurve::EvalD0(double theU) const
|
||||
gp_Pnt BRepAdaptor_CompCurve::EvalD0(const double theU) const
|
||||
{
|
||||
double u = theU, d;
|
||||
int index = CurIndex;
|
||||
@@ -328,7 +328,7 @@ gp_Pnt BRepAdaptor_CompCurve::EvalD0(double theU) const
|
||||
return myCurves->Value(index).EvalD0(u);
|
||||
}
|
||||
|
||||
Geom_Curve::ResD1 BRepAdaptor_CompCurve::EvalD1(double theU) const
|
||||
Geom_Curve::ResD1 BRepAdaptor_CompCurve::EvalD1(const double theU) const
|
||||
{
|
||||
double u = theU, d;
|
||||
int index = CurIndex;
|
||||
@@ -338,7 +338,7 @@ Geom_Curve::ResD1 BRepAdaptor_CompCurve::EvalD1(double theU) const
|
||||
return aRes;
|
||||
}
|
||||
|
||||
Geom_Curve::ResD2 BRepAdaptor_CompCurve::EvalD2(double theU) const
|
||||
Geom_Curve::ResD2 BRepAdaptor_CompCurve::EvalD2(const double theU) const
|
||||
{
|
||||
double u = theU, d;
|
||||
int index = CurIndex;
|
||||
@@ -349,7 +349,7 @@ Geom_Curve::ResD2 BRepAdaptor_CompCurve::EvalD2(double theU) const
|
||||
return aRes;
|
||||
}
|
||||
|
||||
Geom_Curve::ResD3 BRepAdaptor_CompCurve::EvalD3(double theU) const
|
||||
Geom_Curve::ResD3 BRepAdaptor_CompCurve::EvalD3(const double theU) const
|
||||
{
|
||||
double u = theU, d;
|
||||
int index = CurIndex;
|
||||
@@ -361,7 +361,7 @@ Geom_Curve::ResD3 BRepAdaptor_CompCurve::EvalD3(double theU) const
|
||||
return aRes;
|
||||
}
|
||||
|
||||
gp_Vec BRepAdaptor_CompCurve::EvalDN(double theU, int theN) const
|
||||
gp_Vec BRepAdaptor_CompCurve::EvalDN(const double theU, const int theN) const
|
||||
{
|
||||
double u = theU, d;
|
||||
int index = CurIndex;
|
||||
|
||||
@@ -123,24 +123,24 @@ public:
|
||||
Standard_EXPORT double Period() const override;
|
||||
|
||||
//! Computes the point of parameter theU on the curve.
|
||||
[[nodiscard]] Standard_EXPORT gp_Pnt EvalD0(double theU) const final;
|
||||
[[nodiscard]] Standard_EXPORT gp_Pnt EvalD0(const double theU) const final;
|
||||
|
||||
//! Computes the point of parameter theU on the curve with its first derivative.
|
||||
//! Raised if the continuity of the current interval is not C1.
|
||||
[[nodiscard]] Standard_EXPORT Geom_Curve::ResD1 EvalD1(double theU) const final;
|
||||
[[nodiscard]] Standard_EXPORT Geom_Curve::ResD1 EvalD1(const double theU) const final;
|
||||
|
||||
//! Returns the point and the first and second derivatives at parameter theU.
|
||||
//! Raised if the continuity of the current interval is not C2.
|
||||
[[nodiscard]] Standard_EXPORT Geom_Curve::ResD2 EvalD2(double theU) const final;
|
||||
[[nodiscard]] Standard_EXPORT Geom_Curve::ResD2 EvalD2(const double theU) const final;
|
||||
|
||||
//! Returns the point and the first, second and third derivatives at parameter theU.
|
||||
//! Raised if the continuity of the current interval is not C3.
|
||||
[[nodiscard]] Standard_EXPORT Geom_Curve::ResD3 EvalD3(double theU) const final;
|
||||
[[nodiscard]] Standard_EXPORT Geom_Curve::ResD3 EvalD3(const double theU) const final;
|
||||
|
||||
//! Returns the derivative of order theN at parameter theU.
|
||||
//! Raised if the continuity of the current interval is not CN.
|
||||
//! Raised if theN < 1.
|
||||
[[nodiscard]] Standard_EXPORT gp_Vec EvalDN(double theU, int theN) const final;
|
||||
[[nodiscard]] Standard_EXPORT gp_Vec EvalDN(const double theU, const int theN) const final;
|
||||
|
||||
//! returns the parametric resolution
|
||||
Standard_EXPORT double Resolution(const double R3d) const override;
|
||||
|
||||
Reference in New Issue
Block a user