测量 Manifold 横截面:面积、是否为空、顶点和轮廓数量以及边界矩形。这里没有任何方法会更改横截面。
测量横截面的面积,以平方模型单位表示,不含孔。
横截面
面积
const area = await bitbybit.manifold.crossSection.evaluate.area({ crossSection: outline }); Copy
const area = await bitbybit.manifold.crossSection.evaluate.area({ crossSection: outline });
判断横截面是否完全没有轮廓。
当横截面为空时为 true
const empty = await bitbybit.manifold.crossSection.evaluate.isEmpty({ crossSection: outline }); Copy
const empty = await bitbybit.manifold.crossSection.evaluate.isEmpty({ crossSection: outline });
统计横截面所有轮廓的顶点。
顶点数量
const vertices = await bitbybit.manifold.crossSection.evaluate.numVert({ crossSection: outline }); Copy
const vertices = await bitbybit.manifold.crossSection.evaluate.numVert({ crossSection: outline });
统计横截面的轮廓:其外轮廓和孔。
轮廓数量
const contours = await bitbybit.manifold.crossSection.evaluate.numContour({ crossSection: plate }); Copy
const contours = await bitbybit.manifold.crossSection.evaluate.numContour({ crossSection: plate });
以两个 2D 点找出围绕横截面的矩形:最小角点,然后是最大角点。
最小角点和最大角点
const [min, max] = await bitbybit.manifold.crossSection.evaluate.bounds({ crossSection: outline }); Copy
const [min, max] = await bitbybit.manifold.crossSection.evaluate.bounds({ crossSection: outline });
Namespace: Bit
Other top-level symbols:
API reference home · Full symbol index · Tutorials and guides · Platform
测量 Manifold 横截面:面积、是否为空、顶点和轮廓数量以及边界矩形。这里没有任何方法会更改横截面。