code wiki / (root) / nx_mesh_sculpt.nx

nx_mesh_sculpt.nx

buildroot/runtime/nx_mesh_sculpt.nx

5019 B124 linesdepth 6pulls 7 transitivereach 8 importersview sourcekind librarytopic mesh
docsdependenciesstructsconstsfunctions

about

nx_mesh_sculpt.nx -- ZBrush-class curved primitive + sculpt brush, sovereign. Closes the "curved geometry + sculpting" gap on the mesh kernel. Builds an icosphere by subdividing an octahedron and projecting every vertex onto the sphere with integer nx_isqrt (NO trig, NO f64 -- both unreliable here), then a radial "inflate/draw" brush that pushes verts within a brush radius outward along their normal with a smooth (linear) falloff. For an origin-centred primitive the outward radial direction IS the surface normal, so this is a correct draw brush on the sphere; general per-vertex normals are a follow-up. Reuses nx_mesh_subdivide (nx_mesh_edit) + nx_isqrt. No dup: grepped, none existed. Output is pipeline-native Q14-mm -> flows to nx_stl_write_mesh. license_tier: ORIGINAL.

dependencies 4 imports · 7 importers

nx_syscalls.nx nx_mesh.nx nx_mesh_edit.nx nx_isqrt.nx nx_mesh_sculpt.nx nx_cad_exceed.nx nx_cad_page.nx nx_dcc_slice_probe.nx nx_dcc_slice_watertight_gate.nx nx_dcc_to_print_test.nx nx_mesh_sculpt_test.nx nx_slice_layer_probe.nx

imports: nx_syscalls.nxnx_mesh.nxnx_mesh_edit.nxnx_isqrt.nx

imported by: nx_cad_exceed.nxnx_cad_page.nxnx_dcc_slice_probe.nxnx_dcc_slice_watertight_gate.nxnx_dcc_to_print_test.nxnx_mesh_sculpt_test.nxnx_slice_layer_probe.nx

structs

none

consts

none

functions

20func nx_mesh_vert_radius(m: *NxMesh, idx: i64) -> i64
30func nx_mesh_make_octahedron(radius_q14: i64, color: i64) -> *NxMesh
58func nx_mesh_project_to_sphere(m: *NxMesh, radius_q14: i64) -> i64
called by 1: nx_mesh_make_icosphere calls 1: nx_isqrt
80func nx_mesh_make_icosphere(radius_q14: i64, subdiv: i64, color: i64) -> *NxMesh
99func nx_mesh_sculpt_brush(m: *NxMesh, cx: i64, cy: i64, cz: i64,
called by 3: mainmainmain calls 1: nx_isqrt