Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitaecc11a5b2

README.md

geometry

Composing and measuring meshes: transform, append, join, merge, triangulate, voxelize, measure.

The definitions live in proc.ops.geometry; this pack is what puts them in the op registry, so procgen.searchNodes("", { pack = "geometry" }) lists the family and procgen.describeNode("op.<id>") describes any one of them.

Ops

  • geometry.transform — Apply translate/rotate/scale to a Geometry (positions + normals)
  • geometry.append — Concatenate Geometry into a single Geometry: the parts wired to a..h, then every part in parts, each part's points, vertices and primitives after the ones before it, carrying every attribute any part carries
  • geometry.join — Lay geometries end to end on the device: each part's live elements after those of the parts before it, every column any part carries, and the union of the parts' detail
  • geometry.triangulate — Return the Geometry in canonical triangulated form
  • geometry.merge — Weld coincident vertices (matching position + normal) and reindex
  • geometry.measure — Measure a Geometry into a Data table: vertexCount, triangleCount, bounds (the axis-aligned box), centroid (the mean of the vertex positions, so a finely tessellated region pulls it), surfaceArea (the triangl...
  • geometry.voxelize — Sample a Geometry onto a voxel grid → the occupied voxel centers as points (surface only, or the solid interior when solid=true; carries voxelSize + grid-coordinate attributes)
  • geometry.set_material — Attach a material reference to a Geometry (Material input or ref string)
  • geometry.set_position — Displace or set each point's position by a per-point Vec3 field