| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Project principal-point displacement onto the common normal of unit directions, with a scalar perpendicular-distance fallback for parallel lines. Cover intersecting, coincident and skew lines, direction rescaling, operand reversal and the parallel tolerance. AI assistance: prepared with Codex; validation executed locally.
|
I rebased this PR onto current master (2de7801), so it is no longer behind the target branch. On the new head (9600087), the complete local test suite passes with 368 passed and 3 skipped; the changed-file pre-commit hooks and git diff --check also pass. The new GitHub Actions CI run is marked action_required and needs approval from a repository maintainer before it can execute. Could someone approve that run and review the fix when convenient? Thank you. |
Sorry, something went wrong.
|
⚠️ Please install the Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Sorry, something went wrong.
|
Thank you for your interest in SMTB, and for the nice, well-tested fix! I dug into this a bit further and independently confirmed both bugs it fixes are real: the parallel branch on master actually raises NameError (calls a bare dot(...) that isn't defined anywhere in the module — only np.dot is), and the skew branch's norm(cross(...)) ** 2 denominator gives wrong distances at any angle other than 90° between the lines' directions — the one existing test happened to use perpendicular lines, which is exactly the case where that bug is invisible. Your new tests (parametrized across geometry × scale, including the tiny 1e-8 factors) catch both nicely. I've filed #231 to track a related, out-of-scope issue: isparallel()/__or__ have the same non-unit-direction scale-dependency, just without the crash. Not blocking this PR. Approving — thanks again for the contribution! |
Sorry, something went wrong.
|
Thank you for reviewing and approving the fix. I checked the remaining red sphinx / sphinx job on 9600087: make html succeeded (22 warnings), and the failure occurred only when the workflow tried to push the generated site to gh-pages. GitHub returned HTTP 403: github-actions[bot] cannot write to the upstream repository from this fork PR. All 10 unittest matrix jobs, the aggregate test check, and Codecov passed. This PR changes only the geometry code and its tests. The repository's CI invokes the reusable Sphinx workflow for pull requests, and that workflow currently publishes unconditionally. A maintainer-side adjustment that builds docs on PRs but publishes only from trusted pushes would keep the documentation check without requiring write access from a fork PR. I updated the PR description with the current CI results; no additional commit was added to the approved patch. Prepared with Codex on behalf of @Doribelove. |
Sorry, something went wrong.
|
I've approved this. CI fails because of an unmerged PR #222, not your code. There's a big backlog of PRs for RAI to merge, including a lot of my own PRs :( |
Sorry, something went wrong.
|
Thanks for clarifying, @petercorke. Understood that the remaining CI failure is covered by #222 and the merge is waiting on the RAI backlog. I appreciate the review and the independent checks. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Line3.distance() raises NameError for parallel lines and can return incorrect distances for skew or intersecting lines. For example:
The old expression divides by the squared cross-product norm and uses a reciprocal product that mixes unit directions with unnormalized moments. Scaling directions can therefore change the result; a translated intersecting pair can also return a nonzero distance.
Compute the displacement between principal points and project it onto the common normal of the unit directions. For parallel directions, use the perpendicular component of that displacement and return a scalar. Apply the existing tol parameter to the parallel-direction test.
Initial validation on base f6a572c6e75e2a7e3c06e632bc34153941e00404:
The branch is now rebased onto upstream 2de7801 (current head 9600087). On this updated tree, the complete tests suite passes with 368 passed, 3 skipped on Python 3.10.12, and the four pre-commit hooks on both changed files and git diff --check pass. The newer upstream commit adds a separate spatial-vector regression, accounting for one more passing test than the initial run. GitHub Actions has since run: all 10 platform/Python unittest jobs, the aggregate test check, and Codecov passed. The Sphinx documentation build succeeded with 22 warnings, but its final gh-pages push failed with HTTP 403 because github-actions[bot] lacks write permission for this fork PR. This patch changes only spatialmath/geom3d.py and tests/test_geom3d.py.
AI assistance: the implementation, tests and this description were prepared with Codex; the local validation commands were executed locally, and the multi-platform results above come from GitHub Actions.