Implemented spirals close approach#8803
Merged
Merged
Conversation
- carefully handle `reverse` flag when computing additional seeds for extended curveA - `refineSpiralResultsByNewton`: instead of passing size of array tail, it is simpler to pass first index of tail, like in `CurveChainWithDistanceIndex.convertChildDetailToChainDetail` - consolidate duplicated code - add helpers for resetting geomA/B - increase maxIters for Newton to handle tangent intersections, which have sub-quadratic convergence - use appropriate tolerances for point/fraction comparison
…oser spiral point compared to using the linestring fractional arclength as spiral fraction seed.
saeeedtorabi
commented
Nov 26, 2025
saeeedtorabi
commented
Nov 26, 2025
saeeedtorabi
commented
Nov 26, 2025
saeeedtorabi
commented
Nov 26, 2025
- compute two types of Newton seeds from solving the discrete spiral intersectionXY and closeApproachXY problems. - order seeds carefully so that most accurate is processed first. - cull convergent solutions with a dual tolerance filter. Subsequent equivalent solutions are not recorded. - remove check for a solution seed; this can install a less-accurate result. Instead, check the last iterate if Newton fails early on a zero derivative. - compute the max stroke error for a spiral ~ close to the midpoint of first or last stroke segment, whichever spans higher spiral curvature. This is used to limit the results of the discrete spiral closeApproachXY problem. Previous value of 1 micron was way too small, and will fail the new test.
d4d4332 to
81222ed
Compare
saeeedtorabi
commented
Nov 28, 2025
Base automatically changed from
saeed-torabi/spiral-intersection-modify
to
master
December 3, 2025 19:08
* remove line/linestring ambiguity in method signatures that resulted in incorrect detail construction (local v. global) * use new closestPointXY API * sort detail pairs by points, not fractions * Arc3d.isPhysicallyClosedCurve override optimization * improve tests by checking more expected values
- fix invalid loop (was disconnected) - tests were not verifying expected approach counts
dassaf4
approved these changes
Mar 28, 2026
dassaf4
left a comment
Member
There was a problem hiding this comment.
Fixed and refactored. Please check my changes and tests.
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…fice (with tight tolerance check).
…h as spiral intersection.
…om/iTwin/itwinjs-core into saeed-torabi/spiral-close-approach
dassaf4
approved these changes
Apr 13, 2026
…om/iTwin/itwinjs-core into saeed-torabi/spiral-close-approach
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.