code wiki / (root) / nx_cad.nx

nx_cad.nx

buildroot/runtime/nx_cad.nx

5106 B140 linesdepth 5pulls 6 transitivereach 6 importersview sourcekind librarytopic cad
docsdependenciesstructsconstsfunctions

about

nx_cad.nx -- parametric solid modeling (AutoCAD / Fusion / Siemens-class), the "sketch -> extrude" core, sovereign. Takes a 2D profile (a sketch) in the XY plane and extrudes it +Z into a closed solid: two end caps (fan-triangulated) plus a ring of side quads. Convex profiles only in v1 (fan triangulation); concave/holed profiles need ear-clipping + CSG (the next CAD rungs). Output is a pipeline-native Q14-mm NxMesh -> flows straight to nx_stl_write_mesh -> slicer, exactly like the DCC tools. Reuses nx_mesh + nx_trig (for round profiles). No dup: grepped, no nx_cad/extrude/revolve existed. license_tier: ORIGINAL.

dependencies 3 imports · 5 importers

nx_syscalls.nx nx_mesh.nx nx_trig.nx nx_cad.nx nx_cad_exceed.nx nx_cad_page.nx nx_cad_prims2_test.nx nx_cad_test.nx nx_mesh_qem_gate.nx

imports: nx_syscalls.nxnx_mesh.nxnx_trig.nx

imported by: nx_cad_exceed.nxnx_cad_page.nxnx_cad_prims2_test.nxnx_cad_test.nxnx_mesh_qem_gate.nx

structs

none

consts

none

functions

20func nx_cad_extrude(px: *i64, py: *i64, n: i64, height_q14: i64, color: i64) -> *NxMesh
68func nx_cad_make_box(wx_q14: i64, wy_q14: i64, wz_q14: i64, color: i64) -> *NxMesh
called by 2: mainmain calls 2: sys_mmapnx_cad_extrude
84func nx_cad_make_cylinder(radius_q14: i64, height_q14: i64,
106func nx_cad_make_cone(radius_q14: i64, height_q14: i64,