cad_visible_faces — CADMAP visibility op

Data kinds: meshindices

Call: import cadmap; cadmap.cad_visible_faces(mesh, K=None, R=None, t=None, width=64, height=64, cull_backfaces=True, strict=True) (or opscadmap.get("cad_visible_faces"))

Usage

IDs of the faces actually visible from this camera (ascending, `indices` sort).

> The detailed description below is the original text — the summary and the headings are translated.

画像格子(`width x height`、画素中心は整数座標)へ光線を撃ち、最も

手前に来た面を集める。裏面(法線がカメラを向いていない)と、手前の面に

完全に隠れた面は入らない。検査カバレッジ — 「この視点で CAD のどの面を

見たことになるか」— をそのまま返す量で、`mesh_area` と組み合わせれば

「未検査の面積」が出る。

格子の分解能より小さく写る面は取りこぼす(標本化なので当然)。**取りこぼし

を「隠れている」と言い換えない**ために、返るのは「見えた面」であって

「見えない面の補集合」ではない。

★ここだけ `strict の既定が True(他の 3 つは False`)。返りが素の

添字配列なので、巻きを直したという事実を載せる先が無いからで、

「黙って直す」を避けるにはここは拒否するしかない。`cull_backfaces=True`

のまま内向きの閉メッシュを渡すと `ValueError` になる。自動修正が欲しい

ときは `strict=False` を呼び出し側で明示すること — そのときは利用者が

修正を要求したのだから、返り値に載らなくても黙ってはいない。

`cull_backfaces=False` なら巻き方向は結果に効かないので検査もしない。

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

defect_to_cadpy -3.11 examples/defect_to_cad.py

Ops the type connects to (they accept indices as input)

Same category (visibility)


*Provenance: cadmap.py — CADMAP operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.