概要
shapeL(frontWidth, leftWidth) { selectoroperator operations | selector operator operations }
shapeU(frontWidth, rightWidth, leftWidth) { selector operator operations |selector operator operations }
shapeO(frontWidth, rightWidth, backWidth, leftWidth) { selector operatoroperations | selector operator operations }
参数
frontWidth (float):前侧深度
leftWidth (float):左侧宽度
rightWidth (float):右侧宽度
backWidth (float):后侧深度
selector (keyword):选择符,有两个取值shape和remainder,shape代表后退的那个面,remainder代表剩余的面
operator:运算符,定义如何创建新的形状有两个取值
1. : :每个多边形都产生一个新的形状
2. =:所有选择符相一致的多边形组合成一个新的形状
operations:执行在新产生的模型上的一系列操作
示例
shapeL
设置frontWidth =10,leftWidth =20
Lot--> shapeL(10,20) { shape :A | remainder: B. } A--> extrude(20) color("#ff0000")
![]()
![]()
shapeU
设置frontWidth =10,rightWidth =5,leftWidth =20
Lot--> shapeU(10,5,20) { shape : A | remainder: B. } A--> extrude(20) color("#ff0000")
![]()
![]()
shapeU
设置frontWidth =10,rightWidth =5,backWidth =1,leftWidth =20
Lot--> shapeU(10,5,1,20) { shape : A | remainder: B. } A--> extrude(20) color("#ff0000")