3d hull from an array of solids // AngelCAD code. shape@ main_shape(as_args@ args) { array<solid@> spheres; for(int i=-1; i<=1; i+=2) for(int j=-1; j<=1; j+=2) for(int k=-1; k<=1; k+=2) spheres.push_back(translate(10*i,10*j,10*k)*sphere(1.0)); return hull3d(spheres); } void main() { shape@ obj = main_shape(GetArgs()); obj.write_xcsg(GetInputFullPath(),secant_tolerance:0.002); } $ xcsg --stl hull_array.xcsg xcsg processing: hull_array.xcsg processing solid: hull3d ...completed CSG tree: 1 boolean operations to process. ...starting boolean operations ...completed boolean operations in 0.032 [sec] ...result model contains 1 lump. ...lump 1: 744 vertices, 1484 polygon faces. ...Polyhedron is water-tight (edge use-count check OK) ...Polyhedron has no degenerated faces (face area check OK) ...Polyhedron has 0 non-triangular faces ...Exporting results Created STL file : hull_array.stl xcsg finished using 0h 0m 0.053s