Skip to content

Conversation

@saeeedtorabi
Copy link
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.
}
return undefined;
}
/** Low level dispatch of curve collection. */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This block of of code has just moved below to increase code readability and consistency. No changes except one change in handleLineSegment3d (adding an if statement for spirals)

}
/** Double dispatch handler for strongly typed linestring. */
public override handleLineString3d(lsA: LineString3d): any {
if (this._geometryB instanceof LineString3d) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Swapped if statements for line segment and line string to make it consistent with other Handler functions.

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
Base automatically changed from saeed-torabi/spiral-intersection-modify to master December 3, 2025 19:08
@mergify
Copy link
Contributor

mergify bot commented Dec 3, 2025

This pull request is now in conflicts. Could you fix it @saeeedtorabi? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

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.

3 participants