for(int i=0; i<10; i++){
vector pos = {0,0,0};
pos = set(i,i,0);
addpoint(0,pos);
}
Detail层级,为了创建一排点
vector pos = {0,0,0};
pos = set(@P.x,@P.y+1,@P.z);
if(@ptnum != @numpt-1){
int p0 = addpoint(0, pos);
}
Points层级,为了在这排点的上方创建一排点
之后的sort会重新排序所有的点
int ptnum = @numpt;
int pointlen = chi("pointlen");
int p0 = 0;
for(int i=0; i<ptnum; i++){
vector newpos = {0,0,0};
vector pos = point(0, "P", i);
newpos = set(pos.x,pos.y,pos.z+pointlen);
p0 = addpoint(0, newpos);
if(i!=ptnum-1){
addprim(0, "poly", p0, i, i+1, p0+1);
}
}
Detail层级,创建横向的一排点,并且创建面
最后挤出,得到最终效果