-
Notifications
You must be signed in to change notification settings - Fork 231
Implemented spirals close approach #8803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
| } | ||
| return undefined; | ||
| } | ||
| /** Low level dispatch of curve collection. */ |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
core/geometry/src/curve/internalContexts/CurveCurveCloseApproachXY.ts
Outdated
Show resolved
Hide resolved
core/geometry/src/curve/internalContexts/CurveCurveCloseApproachXY.ts
Outdated
Show resolved
Hide resolved
- 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
core/geometry/src/curve/internalContexts/CurveCurveCloseApproachXY.ts
Outdated
Show resolved
Hide resolved
|
This pull request is now in conflicts. Could you fix it @saeeedtorabi? 🙏 |
No description provided.