Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

geometry.solidify

Give a surface thickness: a front shell and a back shell, thickness apart along the normals, the back one wound the other way, with every border edge bridged, so an open surface comes back closed. It is geometry.extrude of the whole surface (or the faces of group) with cap on, started from where the back shell sits.

Inputs

  • geometry (Surface). The surface given a thickness.
  • thickness (Float, default 0.1, above 0). The distance between the two shells. A thickness of 0 or less is refused.
  • direction (String, default "inward", one of "both", "inward", "outward"). Where the material sits: "inward" leaves the front shell on the surface and drops the back one thickness against the normals; "outward" leaves the back shell on the surface and raises the front one thickness along them; "both" straddles the surface with half the thickness each way.
  • group (String, default ""). Names a 0/1 attribute on class holding the faces to thicken; left empty, the whole surface is thickened. The faces outside it stay in place as a single sheet.
  • class (String, default "primitive", one of "point", "primitive", "vertex"). The class group lives on. A "primitive" group is read once per face; a "point" or "vertex" group selects a face only when every one of its corners is above threshold.
  • threshold (Float, default 0.5). The value a group element must exceed to count as a member.
  • epsilon (Float, default 0.00001, above 0). Points this close together are treated as one while border edges are paired and normals averaged, which lets a triangle soup thicken as the connected surface it looks like.

Outputs

  • geometry (Geometry). The closed solid.
local panel = g.geometry.solidify({ geometry = g.mesh.grid({ size = { x = 2, z = 1 } }), thickness = 0.05, direction = "both" })