Bitbybit Docs
    Preparing search index...

    Class ManifoldBitByBit

    The entry point to the Manifold kernel, a fast mesh-based solid modeler: manifold builds and changes solids, crossSection handles the flat outlines they are extruded and revolved from, and mesh reads the triangle data. Manifold works on triangle meshes rather than exact curves, so booleans are quick and always watertight, and it keeps its own Z axis as up: extrusions grow along Z and slices are parallel to the XY plane. The methods on the service itself turn solids and cross-sections into plain mesh data for drawing.

    Index

    Constructors

    Properties

    manifold: Bit.Manifold
    crossSection: ManifoldCrossSection
    mesh: Bit.Mesh

    cleanup

    • Frees the memory a solid or a cross-section holds inside the kernel; the object cannot be used afterwards. Call it for results a script no longer needs, so long sessions do not run out of memory.

      Parameters

      Returns Promise<void>

      await bitbybit.manifold.deleteManifoldOrCrossSection({ manifoldOrCrossSection: cube });
      
    • Frees the memory several solids or cross-sections hold inside the kernel; they cannot be used afterwards. Call it for results a script no longer needs, so long sessions do not run out of memory.

      Parameters

      Returns Promise<void>

      await bitbybit.manifold.deleteManifoldsOrCrossSections({ manifoldsOrCrossSections: [cube, sphere] });
      

    decompose

    • Turns a solid into a list of triangles, each three points, the same form shapes.fromPolygonPoints reads back.

      An empty solid gives an empty list.

      Parameters

      Returns Promise<Mesh3>

      One list of three points per triangle

      const triangles = await bitbybit.manifold.toPolygonPoints({ manifold: cube });
      

    meshing