center(axes)
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
axes | selector | xyz | 要对齐的轴:x、y、z 的组合,如 xy、xz、xyz。 |
将当前形状的 scope 中心与几何体中心对齐。会同时移动几何体顶点和 scope 原点,使几何体在指定轴上居中于 scope。
在 XY 平面上居中:
Mass --> center(xy) Centered
CGA.js 中的 center 实现基于 CityEngine 2025.1 官方文档。
@StartRule\nLot --> primitiveCube(4, 4, 4)\n t(2, 0, 0)\n center(xyz)\n color(0.5, 0.5, 1)
center( 时,补全列表显示带轴组合的条目: