nx_mesh_sculpt.nx
buildroot/runtime/nx_mesh_sculpt.nx
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
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
| 20 | func nx_mesh_vert_radius(m: *NxMesh, idx: i64) -> i64 |
| 30 | func nx_mesh_make_octahedron(radius_q14: i64, color: i64) -> *NxMesh called by 5: mainmainnx_mesh_make_icospheremainmain calls 3: nx_mesh_allocnx_mesh_set_vertexnx_mesh_set_triangle |
| 58 | func nx_mesh_project_to_sphere(m: *NxMesh, radius_q14: i64) -> i64 |
| 80 | func nx_mesh_make_icosphere(radius_q14: i64, subdiv: i64, color: i64) -> *NxMesh |
| 99 | func nx_mesh_sculpt_brush(m: *NxMesh, cx: i64, cy: i64, cz: i64, |