← 返回函数库

shapeU

Geometry Subdivision Shape 部分实现

CityEngine 官方语法

shapeU(frontWidth, rightWidth, leftWidth)

参数说明

参数类型默认值说明
frontWidthfloat前侧臂宽度。
rightWidthfloat右侧臂宽度。
leftWidthfloat左侧臂宽度。

描述

将当前矩形形状分割为 U 形。常用于生成 U 形建筑平面或地块。

当前实现为简化版本。

官方示例

生成分割 U 形:

Lot --> shapeU(5, 3, 3) UShape

实现说明

CGA.js 中的 shapeU 实现基于 CityEngine 2025.1 官方文档。

🎨 3D 预览 — U 形

@StartRule\nLot --> primitiveCube(6, 0.2, 6)\n        // shapeU(3, 3, 3)\n        color(0.7, 0.8, 0.7)