CityEngine Cloud
v0.1.0Text-to-3D city buildings: natural language to CGA rules to rendered glTF models.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
parse_cga
用 CityEngine 引擎解析 CGA 规则源码,生成三维模型(glTF/glb)。 Args: cga_source: CGA 规则源码全文(手写或 generate_cga 的产物)。 attributes: CGA attr 覆盖,如 {"height": 30};键必须在规则的 attr 声明内。 initial_shape: 初始地块多边形 {"type":"Polygon","pts":[[x,z],...]},米制; 缺省用 30m x 20m 调试地块。 seed: 随机种子,固定后可复现结果。 download_glb: 是否把 glb 下载到本地(默认 True)。 output_dir: glb 落盘目录(é»…
| Parameter | Type | Description |
|---|---|---|
cga_source * | string | |
attributes | ||
download_glb | boolean | |
initial_shape | ||
output_dir | ||
seed | ||
timeout_s | number |
generate_cga
自然语言一句话 → NL2CGA → CGA 规则源码(不渲染,同步返回)。 两种模式二选一: 1. text:自然语言描述,如「三层小楼,坡屋顶,底层商铺」。 2. base_cga + instruction:在既有 CGA 上按指令修改(如「把立面材质改成红砖」)。 LLM 兜底模式最长约 90s,属正常现象。 Returns: cga_source(可喂给 parse_cga / generate_model 的 cga_edit 回传)、 engine_path(self/kimi_fallback/hybrid)、warnings、usage。
| Parameter | Type | Description |
|---|---|---|
base_cga | ||
instruction | ||
text |
generate_model
自然语言一句话 → 直接生成三维模型(NL2CGA + 引擎解析一键串联)。 两种模式二选一: 1. text:自然语言描述,如「生成一栋 12 层现代玻璃幕墙办公楼」。 2. base_cga + instruction:回传既有 CGA + 修改指令,二次生成再出模型。 Args:(其余参数同 parse_cga) Returns: cga_source(供后续 cga_edit 回传)、模型统计、glb 本地路径、 签名下载地址、sha256、usage、warnings。
| Parameter | Type | Description |
|---|---|---|
attributes | ||
base_cga | ||
download_glb | boolean | |
initial_shape | ||
instruction | ||
output_dir | ||
seed | ||
text | ||
timeout_s | number |
list_demos
列出 CityEngine 官网首页的 demo 案例(id、名称、引擎、来源日期、属性个数)。 返回条目可传给 get_demo 查看属性面板细节。
get_demo
查看某个官网 demo 案例的详情:属性面板定义、材质数、节点数、引擎耗时。 注意:demo 的 CGA 源码属付费内容(官网商城),本工具返回公开快照信息 (属性 schema / 规模 / 引擎指标),适合做参数设计参考。 Args: demo_id: list_demos 返回的 id,如 building-glass-20260928。
| Parameter | Type | Description |
|---|---|---|
demo_id * | string |
get_quota
查询当前 API key 的套餐、额度用量(generate/NL2CGA)与限流参数。