From: Dmitrii Kulikov <164657232+AtheneNoctuaPt@users.noreply.github.com> Date: Thu, 4 Dec 2025 19:02:29 +0000 (+0000) Subject: Modeling - BRepBuilderAPI_GTransform face stretch crash (#875) X-Git-Tag: V7_9_3~9 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=f2a1716c844cb49f3a783dd1250217fc4c5cb9a9;p=occt.git Modeling - BRepBuilderAPI_GTransform face stretch crash (#875) - Modified parameter validation to allow curves where `theUFirst > theULast` within `Precision::Confusion()` tolerance - Updated documentation to reflect the new tolerance-based validation - Added comprehensive test suites for both 2D and 3D curve adaptors --- diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx index 0ac96d8b2a..7bbc94bf1b 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -71,7 +72,7 @@ public: load(theCurve, theCurve->FirstParameter(), theCurve->LastParameter()); } - //! Standard_ConstructionError is raised if theUFirst>theULast + //! Standard_ConstructionError is raised if theUFirst > theULast + Precision::PConfusion() void Load(const Handle(Geom2d_Curve)& theCurve, const Standard_Real theUFirst, const Standard_Real theULast) @@ -80,7 +81,7 @@ public: { throw Standard_NullObject(); } - if (theUFirst > theULast) + if (theUFirst > theULast + Precision::Confusion()) { throw Standard_ConstructionError(); } diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.hxx b/src/GeomAdaptor/GeomAdaptor_Curve.hxx index fc217b612c..88d576c2d8 100644 --- a/src/GeomAdaptor/GeomAdaptor_Curve.hxx +++ b/src/GeomAdaptor/GeomAdaptor_Curve.hxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -47,7 +48,7 @@ public: GeomAdaptor_Curve(const Handle(Geom_Curve)& theCurve) { Load(theCurve); } - //! Standard_ConstructionError is raised if theUFirst>theULast + //! Standard_ConstructionError is raised if theUFirst > theULast + Precision::PConfusion() GeomAdaptor_Curve(const Handle(Geom_Curve)& theCurve, const Standard_Real theUFirst, const Standard_Real theULast) @@ -70,7 +71,7 @@ public: load(theCurve, theCurve->FirstParameter(), theCurve->LastParameter()); } - //! Standard_ConstructionError is raised if theUFirst>theULast + //! Standard_ConstructionError is raised if theUFirst > theULast + Precision::PConfusion() void Load(const Handle(Geom_Curve)& theCurve, const Standard_Real theUFirst, const Standard_Real theULast) @@ -79,7 +80,7 @@ public: { throw Standard_NullObject(); } - if (theUFirst > theULast) + if (theUFirst > theULast + Precision::Confusion()) { throw Standard_ConstructionError(); }