全部的cityengine学习步骤(3)

2019-04-17 00:12

创建孔洞:

Lot-->extrude(10)

split(x){ { ~1 : X | ~1 : NIL }* | ~1 : X }

创建孔洞:

Lot-->extrude(10)

split(x){ { ~1 : X | ~1 : NIL }* | ~1 : X } 注:删除分割对象(Leaf)的挂接。

终止递归:

attr minheight = 10 attr maxheight = 30 attr ErkerFact = 0.8 attr ErkerDepth = 0.8 attr ErkerStop = 2 Lot--> extrude(10) X

comp(f) { top : Erker } Erker-->

case(scope.sx > ErkerStop) : s('ErkerFact, 'ErkerFact, 0) center(xy)

alignScopeToGeometry(yUp, 0) extrude(ErkerDepth) X

comp(f){top : Erker} else: NIL

Offset

attr red = \attr green = \Lot -->

offset(-3) A //注:默认选择是all。 A -->

comp(f) { inside: I | border: O } I --> color(red) extrude(15) O --> color(green) extrude(10)

attr red = \attr green = \Lot -->

offset(-3,inside) A A -->

extrude (10) color(red)

(这里的正负号指的都是方向)

attr red = \attr green = \Lot -->

offset(-3,border) A A -->

extrude (10) color(green)

Report

概要:定义关键字生成报告

report(key, value)

参数:key (string)

报告收集的关键字,关键字可以使用“.”分组。Keys can be grouped with the name sparator ''.'' value (float | bool | string)

Value (or variable / shape attribute) to add to the collection.

示例

version \ Lot --> extrude(30)

comp(f) { side : Facade | top : Roof } Facade -->

report(\, 1) //注:统计侧面个数 split(y) { ~5 : Floor | ~0.5 : Ledge }* Floor -->

split(x) { ~1 : Tile | 2 : Window | ~1 : Tile}* Window --> 40%:

report(\, geometry.area())// 注: 统计窗口面积 report(\, 1) //注:统计窗户敞开的个数 NIL else:

report(\, geometry.area()) //注:统计窗口面积 report(\, 1)// 注:统计窗户关闭的个数 color(\)


全部的cityengine学习步骤(3).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:论述中国古代科技落后的原因一

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: