code wiki / (root) / nx_vessel_csg.nx

nx_vessel_csg.nx

buildroot/runtime/nx_vessel_csg.nx

2170 B45 linesdepth 7pulls 10 transitivereach 5 importersview sourcekind librarytopic vessel
docsdependenciesstructsconstsfunctions

about

nx_vessel_csg.nx -- C1 of the VESSEL-DESIGN ladder: the printable VESSEL SOLID, as constructive solid geometry. A fermentation cup is an outer cylinder MINUS an inner cavity (raised off the floor to leave a base, extended past the rim to leave the top open) -- a watertight SDF solid, pipeline-native to nx_csg_extract_scene -> nx_stl_write_mesh -> slicer. Per the under-ridge lesson, geometry is PROVEN by cheap field-sampling + nx_csg_scene_count_inside (a hollow cup has strictly less material than the solid cylinder), NOT by an OOM-prone high-res mesh. The mesh emit is a separate, low-res manufacturing step. Composes the existing sovereign CAD stack (nx_sdf primitives + nx_csg booleans + nx_csg_scene fold); adds no geometry math. genealogy_id: constructive_solid_geometry + nishi_csg_scene_2026

dependencies 4 imports · 3 importers

nx_syscalls.nx nx_sdf.nx nx_csg.nx nx_csg_scene.nx nx_vessel_csg.nx nx_vessel_csg_test.nx nx_vessel_emit.nx nx_vessel_gcode.nx

imports: nx_syscalls.nxnx_sdf.nxnx_csg.nxnx_csg_scene.nx

imported by: nx_vessel_csg_test.nxnx_vessel_emit.nxnx_vessel_gcode.nx

structs

none

consts

22const NX_VC_Q14: i64 = 16384 // 1 mm in Q14-mm

functions

28func nx_vessel_csg_build(outer_r_mm: i64, wall_mm: i64,