Bitbybit Docs
    Preparing search index...

    Class CrossSectionEvaluate

    Measuring Manifold cross-sections: area, emptiness, vertex and contour counts and the bounding rectangle. Nothing here changes the cross-section.

    Index

    Constructors

    basic

    • Measures the area of a cross-section, in square model units, holes excluded.

      Parameters

      Returns Promise<number>

      The area

      const area = await bitbybit.manifold.crossSection.evaluate.area({ crossSection: outline });
      
    • Tells whether a cross-section has no contours at all.

      Parameters

      Returns Promise<boolean>

      True when the cross-section is empty

      const empty = await bitbybit.manifold.crossSection.evaluate.isEmpty({ crossSection: outline });
      
    • Counts the vertices of a cross-section over all its contours.

      Parameters

      Returns Promise<number>

      The number of vertices

      const vertices = await bitbybit.manifold.crossSection.evaluate.numVert({ crossSection: outline });
      
    • Counts the contours of a cross-section: its outer outlines and its holes.

      Parameters

      Returns Promise<number>

      The number of contours

      const contours = await bitbybit.manifold.crossSection.evaluate.numContour({ crossSection: plate });
      
    • Finds the rectangle around a cross-section as two 2D points: the minimum corner, then the maximum corner.

      Parameters

      Returns Promise<Vector2[]>

      The minimum corner and the maximum corner

      const [min, max] = await bitbybit.manifold.crossSection.evaluate.bounds({ crossSection: outline });