Repository navigation
fix(geom3d): accept array-like volume bounds - #274
Doribelove wants to merge 2 commits into
Conversation
Signed-off-by: 李永祺 <doribelove@gmail.com>
Signed-off-by: 李永祺 <doribelove@gmail.com>
|
Merged current master ( Validation: 587 passed / 3 skipped on Python 3.12.14, 95 geometry tests passed on Python 3.10.12, and the repository pre-commit hooks plus |
|
Thank you for your interest in SMTB, and for another careful fix! Routing the bounds through 1.1.19 is now released, and this PR currently has merge conflicts with |
Line3.intersect_volume()documents six array-like bounds, but passing a Python list or tuple raisesAttributeErroratbounds.reshape(...). Row and column NumPy vectors also fail later because the face loop indexes the unflattened bounds.Normalize the bounds once with
base.getvector(bounds, 6), asLine3.plot()already does. This accepts lists, tuples, flat arrays, and row/column vectors, and validates their length before the face loop. Correct the bounds type field and the reshape comment. The intersection algorithm and return structure are unchanged.Add 21 regression cases for axis-aligned and oblique intersections, a line outside the volume, all five input formats, and invalid lengths. Check intersection coordinates, point-array shape and line parameters.
Validation against upstream
41e0a4d:git diff --checkpass.Update after upstream 1.1.19
Merged current
master(25b19b3) to resolve the overlapping additions intests/test_geom3d.py. Both the line-intersection regressions merged in #273 and all 21 volume-bounds cases from this PR are retained. The diff against current master remains the bounds normalization and its tests.Validation of the updated branch:
git diff --check: passed.