render_organic.py: hardcoded samples/ path, fails on tests/fixtures/ scans #28

Closed
opened 2026-06-20 20:04:17 +00:00 by Mark · 0 comments
Owner

Render script /tmp/render_organic.py only looks in samples/, fails on tests/fixtures/ scans

What

render_organic.py (the comparison-shot generator used to produce
input-vs-reconstruction side-by-sides for organic sample assessment)
hardcodes its input lookup to Path("/home/b/Projects/pc2cad/samples") / f"{name}.ply". When given the name of a real scan that lives in
tests/fixtures/ (e.g. Merge_01_pc.ply, a Revopoint 3D capture
committed in 10fa297 for pc2cad#16), open3d.io.read_point_cloud
fails with Read PLY failed: unable to open file and the script
crashes on the pts.min(0) call with a zero-size array.

Reproduction

cd ~/Projects/pc2cad
./.venv/bin/python /tmp/render_organic.py Merge_01_pc

Expected

The script should look in tests/fixtures/ (and any other standard
project location for fixture data) in addition to samples/, so
real-scan fixtures committed for issue-driven testing can be rendered
the same way as the curated sample set.

Actual

RPly: Unable to open file
=== Merge_01_pc ===
  loading /home/b/Projects/pc2cad/samples/Merge_01_pc.ply
[Open3D WARNING] Read PLY failed: unable to open file: .../Merge_01_pc.ply
Traceback (most recent call last):
  ...
ValueError: zero-size array to reduction operation minimum which has no identity

Suggested fix (not for me to implement)

Add a multi-path resolver that tries samples/, tests/fixtures/,
and the repo root before failing. This is a render-tooling bug, not
a pipeline bug — does not affect pc2cad output.

Filed as part of the 2026-06-20 assessment cycle that produced
pc2cad#24, #26.

# Render script `/tmp/render_organic.py` only looks in `samples/`, fails on `tests/fixtures/` scans ## What `render_organic.py` (the comparison-shot generator used to produce input-vs-reconstruction side-by-sides for organic sample assessment) hardcodes its input lookup to `Path("/home/b/Projects/pc2cad/samples") / f"{name}.ply"`. When given the name of a real scan that lives in `tests/fixtures/` (e.g. `Merge_01_pc.ply`, a Revopoint 3D capture committed in `10fa297` for pc2cad#16), `open3d.io.read_point_cloud` fails with `Read PLY failed: unable to open file` and the script crashes on the `pts.min(0)` call with a zero-size array. ## Reproduction ```bash cd ~/Projects/pc2cad ./.venv/bin/python /tmp/render_organic.py Merge_01_pc ``` ## Expected The script should look in `tests/fixtures/` (and any other standard project location for fixture data) in addition to `samples/`, so real-scan fixtures committed for issue-driven testing can be rendered the same way as the curated sample set. ## Actual ``` RPly: Unable to open file === Merge_01_pc === loading /home/b/Projects/pc2cad/samples/Merge_01_pc.ply [Open3D WARNING] Read PLY failed: unable to open file: .../Merge_01_pc.ply Traceback (most recent call last): ... ValueError: zero-size array to reduction operation minimum which has no identity ``` ## Suggested fix (not for me to implement) Add a multi-path resolver that tries `samples/`, `tests/fixtures/`, and the repo root before failing. This is a render-tooling bug, not a pipeline bug — does not affect pc2cad output. ## Related Filed as part of the 2026-06-20 assessment cycle that produced pc2cad#24, #26.
Mark 2026-06-20 20:04:36 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/pc2cad#28
No description provided.