Skip to content

Implemented spirals close approach#8803

Merged
saeeedtorabi merged 72 commits into
masterfrom
saeed-torabi/spiral-close-approach
Apr 13, 2026
Merged

Implemented spirals close approach#8803
saeeedtorabi merged 72 commits into
masterfrom
saeed-torabi/spiral-close-approach

Conversation

@saeeedtorabi

Copy link
Copy Markdown
Contributor

No description provided.

saeeedtorabi and others added 11 commits November 14, 2025 15:58
- 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.
Comment thread core/geometry/src/curve/internalContexts/CurveCurveCloseApproachXY.ts Outdated
Comment thread core/geometry/src/curve/internalContexts/CurveCurveCloseApproachXY.ts Outdated
dassaf4 and others added 8 commits November 26, 2025 14:49
- 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.
@saeeedtorabi saeeedtorabi force-pushed the saeed-torabi/spiral-close-approach branch from d4d4332 to 81222ed Compare November 28, 2025 21:03
Comment thread core/geometry/src/curve/internalContexts/CurveCurveCloseApproachXY.ts Outdated
Base automatically changed from saeed-torabi/spiral-intersection-modify to master December 3, 2025 19:08
dassaf4 added 6 commits March 25, 2026 17:37
* 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 dassaf4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fixed and refactored. Please check my changes and tests.

Comment thread core/geometry/src/test/curve/CurveCurveCloseApproachXY.test.ts Fixed
Comment thread core/geometry/src/curve/internalContexts/CurveCurveCloseApproachXY.ts Outdated
@saeeedtorabi saeeedtorabi enabled auto-merge (squash) April 13, 2026 15:18
@saeeedtorabi saeeedtorabi merged commit dcedec3 into master Apr 13, 2026
18 checks passed
@saeeedtorabi saeeedtorabi deleted the saeed-torabi/spiral-close-approach branch April 13, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants