No matching definitions.

sdf/transforms

src/sdf/transforms.tur

spatial and morphological modifiers for SdfExpr trees.

Since: Phase 1

defn

sdf-translate

(sdf-translate [e :int tx :float ty :float tz :float] :int)

translate an SDF by vector (tx,ty,tz).

echild SdfExpr handle
tx ty tz -- translation vector

Transformed SdfExpr handle.

(sdf-translate (sdf-sphere 0.0 0.0 0.0 1.0) 2.0 0.0 0.0)

Since: Phase 1

defn

sdf-offset

(sdf-offset [e :int d :float] :int)

expand (d > 0) or shrink (d < 0) a shape by a constant.

echild SdfExpr handle
doffset distance (positive = grow, negative = shrink)

Modified SdfExpr handle.

(sdf-offset (sdf-box -0.5 -0.5 -0.5  0.5 0.5 0.5) 0.1)  ; rounded box

Since: Phase 1

defn

sdf-shell

(sdf-shell [e :int thickness :float] :int)

keep only a `thickness`-wide shell around the surface.

echild SdfExpr handle
thicknessshell half-thickness (> 0)

Modified SdfExpr handle.

(sdf-shell (sdf-sphere 0.0 0.0 0.0 1.0) 0.05)

Since: Phase 1