3D modeling, CAD design, and STL file analysis. Generate 3D-printable models from text descriptions, analyze/inspect STL files, render previews, modify parametric designs, and convert between 3D formats.
Full 3D modeling pipeline: generate models from descriptions, analyze STL files, render previews, and export for 3D printing.
Write .scad code, then compile:
python3 {baseDir}/scripts/generate.py --code '<openscad_code>' --name 'part_name' --format stl
python3 {baseDir}/scripts/generate.py --code '<openscad_code>' --name 'part_name' --params 'width=50,height=30,wall=2'
python3 {baseDir}/scripts/generate.py --code '<openscad_code>' --name 'part_name' --format png --camera '0,0,0,45,0,35,200'
python3 {baseDir}/scripts/generate.py --code '<openscad_code>' --name 'part_name' --format both
python3 {baseDir}/scripts/analyze.py '<path_to_stl>'
Returns: dimensions, volume, surface area, triangle count, watertight check, printability assessment, PLA cost estimate.
python3 {baseDir}/scripts/convert.py '<input_file>' --to <stl|3mf|obj|off|ply|glb>
For complex models, write a Python script using SolidPython2:
python3 {baseDir}/scripts/solidpy_gen.py --script '<python_code>' --name 'part_name'
The Python code must assign the result to a variable called model.
cube([x,y,z]) or cube(size, center=true)sphere(r=5) or sphere(d=10)cylinder(h=10, r=5) or cylinder(h=10, r1=5, r2=3)polyhedron(points, faces)translate([x,y,z]), rotate([x,y,z]), scale([x,y,z])mirror([1,0,0]), color("red")linear_extrude(height) — extrude 2D to 3Drotate_extrude(angle) — lathe/revolveunion() { ... } — combine shapesdifference() { ... } — subtract (first minus rest)intersection() { ... } — keep overlap onlysquare([x,y]), circle(r=5), polygon(points)text("string", size=10), import("file.svg")for (i = [0:n]) { ... } — loopmodule name() { ... } — reusable component$fn = 100; — curve smoothness/root/openclaw-workspace/3d-models/
$fn for curved surfaces (50-100)module for reusable componentsdifference() for holes, cutouts, recesseslinear_extrude() + 2D shapes for complex profilesEdit PDFs with natural-language instructions using the nano-pdf CLI.