polyhedron_clip_halfspace — DRIVE polygrav op

• Data kinds: any × any × any → any

• Call: import fullseye as fs; fs.ledger.polyhedron_clip_halfspace(mesh, point, normal) (to call the implementation directly, import polygrav; polygrav.polyhedron_clip_halfspace(mesh, point, normal); from the registry, opsdrive.get("polyhedron_clip_halfspace"))

• GPU: none (CPU reference implementation only)

Usage

Cut a closed mesh with a plane and return the side (x − point)·normal ≥ 0 as a closed solid → (vertices, faces).

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

切り口(平面上の多角形)は point からの扇の三角形で塞ぐ。切り口が非凸でも、point が切り口の外でも、扇の三角形は向き付きで重なって打ち消し合うので、面について線形な量(polyhedron_gravity の重力・ mesh_volume の体積・重心)はそのまま正しい(見た目の三角形は重なることがある)。辺と平面の交点は辺ごとに 1 回だけ作るので、返りのメッシュは有向辺がちょうど打ち消す(閉じている)。平面の上にちょうど乗る頂点は残す側に数える。

Parameters

mesh : (vertices (N,3), faces (M,3))

閉じた三角形メッシュ(外向きの巻き)。

point : (3,)

平面上の 1 点(切り口の扇の中心にもなる)。

normal : (3,)

残す側を向く平面の法線(正規化する)。

Returns

(vertices (N',3), faces (M',3))

残した側の閉じたメッシュ(使わない頂点は落とす)。切り口の三角形は末尾に並ぶ。

平面がメッシュに交わらない(全部が片側)ときは、残す側に全部あればそのまま、全部が反対側なら ValueError。メッシュが閉じていない・非有限・範囲外の索引も ValueError。空の入力(mesh の面が 0 個)は ValueError で拒否する。

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)

• itokawa_gravity_tour — py -3.11 examples/itokawa_gravity_tour.py

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

course_crank · course_s_curve · course_turnaround · course_slope · course_intersection · course_parallel_parking · course_crossing · course_road

Same category (polygrav)

polyhedron_gravity


*Provenance: polygrav.py — DRIVE 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.