solid nodes

7 node types in the solid category.

boolean#

aliases: csg bool difference union intersect

Robust mesh boolean (union / subtract / intersect) of closed solids. Each input’s overlapping pieces are unioned first; without B, the result is that union of A.

Either input may be a merge of pieces that overlap: each input is first made one solid, the union of its pieces (the inner wall of a hollow piece stays with it, so the hollow is kept), and the operation runs on those two solids, so subtracting a merge of cutters removes everything any of them covers. The result is a closed solid made of polygons: each input face that survives the cut comes out as one polygon (a face the cut leaves with a hole as a few polygons sharing flat edges), so a bevel or inset after the boolean sees the real edges, and edges shorter than "tolerance" are collapsed so no slivers are left. Inside-out input pieces (a mirror without a winding flip) are turned outward first, with a warning.

Inputs

#namedescription
0asolid A: closed pieces, which may overlap (unioned first)
1bsolid B (optional): closed pieces, which may overlap (unioned first, so a merge of cutters cuts as one); its faces become the cut faces when subtracting (optional)

Parameters

nametypedefaultrangedescription
operationenum"subtract"A ∪ B, A − B, or A ∩ B
options: union subtract intersect
aliases: op mode
outputenum"polygons"polygons = each surviving input face as one polygon (or a few around a hole); triangles = the kernel triangles as they come
options: polygons triangles
tolerancefloat0.000010..after the cut, collapse edges shorter than this and flatten slivers thinner than it, keeping the solid closed (0 = rounding only)
aliases: simplify sliver

Writes: prim groups from_a, from_b (cut faces come from B when subtracting); each face keeps the prim attributes of the input face it comes from (a cut face B’s material); float point/vertex attributes interpolated

Example

{
  "nodes": {
    "box": { "type": "box" },
    "ball": {
      "type": "sphere",
      "params": { "type": "ico", "level": 3, "radius": 0.65 }
    },
    "cut": {
      "type": "boolean",
      "in": ["box", "ball"],
      "params": { "operation": "subtract" }
    }
  },
  "output": "cut"
}

Used in the example machined_bracket.

clip#

aliases: cut slice_plane trim

Cut geometry with a plane; keep one side or both. Works on any polygons; can cap closed solids.

Inputs

#namedescription
0geogeometry

Parameters

nametypedefaultrangedescription
originvec3[0,0,0]point on the plane
normalvec3[0,1,0]plane normal; "above" = the side it points to
aliases: dir direction
keepenum"below"which side to keep (both = split, groups above/below)
options: below above both
capboolfalseclose the cut with faces (prim group "cap")

Writes: prim groups above/below (keep=both), cap

Example

{
  "type": "clip",
  "params": {
    "origin": [0, 0.2, 0],
    "normal": [0, 1, 0],
    "keep": "below",
    "cap": true
  }
}

convex_hull#

aliases: hull shrinkwrap

Convex hull of all points (watertight triangles).

Inputs

#namedescription
0geopoints or geometry

Parameters

None.

Example

{
  "nodes": {
    "pts": {
      "type": "point_grid",
      "params": {
        "counts": [6, 4, 6],
        "size": [2, 1, 2],
        "jitter": 0.8,
        "seed": 2
      }
    },
    "hull": { "type": "convex_hull", "in": ["pts"] }
  },
  "output": "hull"
}

minkowski#

aliases: minkowski_sum dilate_solid

Minkowski sum of two solids (e.g. A ⊕ small sphere = rounded/dilated A). Slow for large non-convex inputs.

Inputs

#namedescription
0asolid
1bbrush solid (e.g. a small sphere centred at the origin)

Parameters

nametypedefaultrangedescription
operationenum"sum"sum grows A by B; difference erodes A by B
options: sum difference

Example

{
  "nodes": {
    "box": { "type": "box" },
    "ball": {
      "type": "sphere",
      "params": { "type": "ico", "level": 1, "radius": 0.1 }
    },
    "rounded": { "type": "minkowski", "in": ["box", "ball"] }
  },
  "output": "rounded"
}

slice#

aliases: contour section cross_section

Contour a closed solid with parallel planes (closed polygons per level) — e.g. topographic lines, layers.

Inputs

#namedescription
0solidclosed mesh

Parameters

nametypedefaultrangedescription
countint101..100000number of slices across the bounding box
axisenum"y"slicing axis
options: y x z
marginfloat0.0010..keep slices this far inside the bbox ends

Writes: prim float height, int slice

Example

{ "type": "slice", "params": { "count": 12, "axis": "y" } }

smooth_solid#

aliases: refine round smooth_out subdivide_solid

Smooth a closed mesh into curved surfaces and refine it (manifold smoothOut + refine); sharp edges above an angle stay crisp.

Inputs

#namedescription
0solidclosed mesh

Parameters

nametypedefaultrangedescription
refineint41..32split every edge into this many segments
sharp_anglefloat600..180edges with a dihedral angle sharper than this stay sharp (180 = smooth everything)
smoothnessfloat00..1smoothness kept on sharp edges (0 = crisp)

Example

{ "type": "smooth_solid", "params": { "refine": 4, "sharp_angle": 80 } }

voronoi_fracture#

aliases: fracture shatter voronoi

Shatter a closed solid into convex Voronoi pieces (sites from input 2 or scattered inside). Pieces get name/class; inner faces group "inside".

Inputs

#namedescription
0solidclosed mesh to fracture
1sitesoptional fracture points (optional)

Parameters

nametypedefaultrangedescription
countint121..10000number of pieces when no site points are given
seedfloat0random seed
gapfloat00..shrink each piece toward its centre by this distance (visual separation)
neighborsint244..1024nearest sites that cut each cell first; farther sites that can still reach the cell cut it too, so cells are exact and pieces never overlap

Writes: prim name ("piece0"...), class (int), group inside; point/prim attributes from the source

Example

{
  "type": "voronoi_fracture",
  "params": { "count": 20, "gap": 0.02, "seed": 4 }
}

Used in the example fracture_settle.