语法

  • shapeU(frontWidth, rightWidth, leftWidth) { selector operator operations |  }

参数

  1. frontWidth – 浮点型
    前翼的深度。
  2. rightWidth – 浮点型
    右翼的宽度。
  3. leftWidth – 浮点型
    左翼的宽度。
  4. selector – 选择器
    • shape – 退缩面。
    • remainder – 选择面的其余部分。
  5. operator – 浮点型

    运算符用于定义如何使用退缩面生成后续形状。 这同样适用于具有多个面的形状。 有效运算符如下:

    • : – 将每个面放入新形状。
    • = – 与选择器对应的所有面将合并成一个新形状。
  6. operations – 浮点型
    要执行的一系列 CGA 操作。

说明

shapeU 操作会根据预定义的空间选择器选择多条边,并使其退缩用户定义的距离。

注:

该操作是应用退缩的另一种方式。

shapeU(frontWidth, rightWidth, leftWidth) { selector operator operations | … }

也可以使用 setback 操作和 comp 函数实现:

setback( comp(fe) { front=frontWidth | left=leftWidth | rigth=rightWidth} ) { selector operator operations | … }

相关内容

示例

使用 U 形状填充的区块:

GUID-BE2DA47C-196D-4927-929A-553501598907-web

attr myFrontDepth = 5
attr myRightWidth = 3
attr myLeftWidth = 11

LotInner -->
    Lot
		
Lot -->
    offset(-3, inside)
    shapeU(myFrontDepth,myRightWidth,myLeftWidth) { shape     : Footprint 
                                                  | remainder : NIL }
	
Footprint -->
    extrude(rand(10,20)) 
	color(1,0,0)