关于坐标数组格式的说明
/*
z元素是可选的(如果z没有指定,则z==0)
单个点: 一维数组
单个环: 二维数组,注意:坐标点索引需要按顺时针或者逆时针排列
单个Part:三维数组
多个Part:四维数组
*/
let z = 0;
//1个Part, 无内环
let c1 = [[1, 1, z], [2, 2, z], [3, 3, z]];
//1个Part, 1到多个内环
let c2 = [
[[1, 1, z], [2, 2, z], [3, 3, z]], //第一个元素是外环
[[1, 1, z], [2, 2, z], [3, 3, z]], //其他元素是内环
[[1, 1, z], [2, 2, z], [3, 3, z]],
[[1, 1, z], [2, 2, z], [3, 3, z]]
];
//多个Part,有的Part有内环,有的没有内环
let c3 = [
//没有内环的Part
[
[[1, 1, z], [2, 2, z], [3, 3, z]]
],
//有内环的Part
[
[[1, 1, z], [2, 2, z], [3, 3, z]], //第一个元素是外环
[[1, 1, z], [2, 2, z], [3, 3, z]], //其他元素是内环
[[1, 1, z], [2, 2, z], [3, 3, z]],
[[1, 1, z], [2, 2, z], [3, 3, z]]
],
//没有内环的Part
[
[[1, 1, z], [2, 2, z], [3, 3, z]]
]
];
//多个Part,每个Part有内环
let c4 = [
[ //Part1
[[1, 1, z], [2, 2, z], [3, 3, z]], //第一个元素是外环
[[1, 1, z], [2, 2, z], [3, 3, z]], //其他元素是内环
[[1, 1, z], [2, 2, z], [3, 3, z]],
[[1, 1, z], [2, 2, z], [3, 3, z]]
],
[ //Part2
[[1, 1, z], [2, 2, z], [3, 3, z]], //第一个元素是外环
[[1, 1, z], [2, 2, z], [3, 3, z]], //其他元素是内环
[[1, 1, z], [2, 2, z], [3, 3, z]],
[[1, 1, z], [2, 2, z], [3, 3, z]]
],
[ //Part3
[[1, 1, z], [2, 2, z], [3, 3, z]], //第一个元素是外环
[[1, 1, z], [2, 2, z], [3, 3, z]], //其他元素是内环
[[1, 1, z], [2, 2, z], [3, 3, z]],
[[1, 1, z], [2, 2, z], [3, 3, z]]
],
];