Modeling - BRepBuilderAPI_GTransform face stretch crash#875
Modeling - BRepBuilderAPI_GTransform face stretch crash#875dpasukhi merged 5 commits intoOpen-Cascade-SAS:IRfrom
Conversation
|
@AtheneNoctuaPt Could you please generate a GTest to cover that changes? |
Added degenerated curves handling to Geom2dAdaptor_Curve and GeomAdaptor_Curve.
There was a problem hiding this comment.
Pull request overview
This PR fixes a crash in BRepBuilderAPI_GTransform during face stretching operations by adding support for degenerated curves (curves with zero or near-zero length) in both GeomAdaptor_Curve and Geom2dAdaptor_Curve classes.
Key Changes:
- Modified parameter validation to allow curves where
theUFirst > theULastwithinPrecision::Confusion()tolerance - Updated documentation to reflect the new tolerance-based validation
- Added comprehensive test suites for both 2D and 3D curve adaptors
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Curve.hxx | Updated parameter validation logic and documentation to support degenerated 3D curves |
| src/ModelingData/TKG3d/GTests/GeomAdaptor_Curve_Test.cxx | Added comprehensive test coverage for 3D degenerated curve handling |
| src/ModelingData/TKG3d/GTests/FILES.cmake | Registered new 3D test file in build system |
| src/ModelingData/TKG2d/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx | Updated parameter validation logic and documentation to support degenerated 2D curves |
| src/ModelingData/TKG2d/GTests/Geom2dAdaptor_Curve_Test.cxx | Added comprehensive test coverage for 2D degenerated curve handling |
| src/ModelingData/TKG2d/GTests/FILES.cmake | Registered new 2D test file in build system |
| 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() |
There was a problem hiding this comment.
The documentation references Precision::PConfusion() but the actual implementation uses Precision::Confusion(). The documentation should match the implementation and use Precision::Confusion() instead.
| } | ||
|
|
||
| //! Standard_ConstructionError is raised if theUFirst>theULast | ||
| //! Standard_ConstructionError is raised if theUFirst > theULast + Precision::PConfusion() |
There was a problem hiding this comment.
The documentation references Precision::PConfusion() but the actual implementation uses Precision::Confusion(). The documentation should match the implementation and use Precision::Confusion() instead.
| } | ||
|
|
||
| //! Standard_ConstructionError is raised if theUFirst>theULast | ||
| //! Standard_ConstructionError is raised if theUFirst > theULast + Precision::PConfusion() |
There was a problem hiding this comment.
The documentation references Precision::PConfusion() but the actual implementation uses Precision::Confusion(). The documentation should match the implementation and use Precision::Confusion() instead.
| //! Standard_ConstructionError is raised if theUFirst > theULast + Precision::PConfusion() | |
| //! Standard_ConstructionError is raised if theUFirst > theULast + Precision::Confusion() |
…-SAS#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
Added degenerated curves handling to Geom2dAdaptor_Curve and GeomAdaptor_Curve.