← 返回函数库

geometry.boundaryLength

Geometry 内置函数 已实现

语法

geometry.boundaryLength(...)

示例

attr x = geometry.boundaryLength(...)

🎨 3D 预览 — 边界长度

@StartRule
Lot --> primitiveQuad(6, 4)
        extrude(geometry.boundaryLength * 0.3)
        comp(f) { top: Roof | side: Wall }

Roof --> color(0.5, 0.25, 0.15)
Wall --> color(0.75, 0.72, 0.68)