Skip to content

Modeling Data - Fix curve concatenation to use actual endpoints#926

Merged
dpasukhi merged 2 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi:curve_concat_bspl
Dec 20, 2025
Merged

Modeling Data - Fix curve concatenation to use actual endpoints#926
dpasukhi merged 2 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi:curve_concat_bspl

Conversation

@dpasukhi
Copy link
Member

GeomConvert_CompCurveToBSplineCurve::Add() was incorrectly using
first/last poles for G0 continuity checks instead of actual curve
endpoints. For non-clamped or periodic B-splines, poles may not
coincide with curve start/end points, causing concatenation to fail
or produce incorrect results.

Changed to use StartPoint()/EndPoint() methods which properly
evaluate the curve at its parameter bounds.

GeomConvert_CompCurveToBSplineCurve::Add() was incorrectly using
  first/last poles for G0 continuity checks instead of actual curve
  endpoints. For non-clamped or periodic B-splines, poles may not
  coincide with curve start/end points, causing concatenation to fail
  or produce incorrect results.

Changed to use StartPoint()/EndPoint() methods which properly
  evaluate the curve at its parameter bounds.
@dpasukhi dpasukhi added this to the Release 8.0 milestone Dec 16, 2025
@dpasukhi dpasukhi self-assigned this Dec 16, 2025
@dpasukhi dpasukhi added the 1. Modeling Boolean operations, offsets, primitives, any conversion, brep builders and etc... label Dec 16, 2025
@dpasukhi
Copy link
Member Author

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in GeomConvert_CompCurveToBSplineCurve::Add() where G0 continuity checks incorrectly used B-spline poles instead of actual curve endpoints. For non-clamped or periodic B-splines, the first/last poles may not coincide with the curve's start/end points, causing concatenation to fail or produce incorrect results.

Key Changes:

  • Updated the continuity check logic to use StartPoint()/EndPoint() methods instead of accessing poles directly
  • Added comprehensive test coverage for various concatenation scenarios including the specific bug case

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
GeomConvert_CompCurveToBSplineCurve.cxx Replaced pole-based distance checks with endpoint-based checks for proper G0 continuity validation
GeomConvert_CompCurveToBSplineCurve_Test.cxx New test file with 9 test cases covering clamped/non-clamped B-splines, trimmed arcs, reversal, and edge cases
FILES.cmake Registered the new test file in the build system

…oBSplineCurve.cxx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Pasukhin Dmitry <pasuhinsvzn@gmail.com>
@github-project-automation github-project-automation bot moved this from Todo to Integration in Maintenance Dec 19, 2025
@dpasukhi dpasukhi merged commit 568ced2 into Open-Cascade-SAS:IR Dec 20, 2025
47 of 48 checks passed
@dpasukhi dpasukhi deleted the curve_concat_bspl branch December 20, 2025 20:57
@github-project-automation github-project-automation bot moved this from Integration to Done in Maintenance Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. Modeling Boolean operations, offsets, primitives, any conversion, brep builders and etc...

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants