Bitbybit Docs
    Preparing search index...

    Class CrossSectionTransforms

    Moving, turning, scaling, mirroring and warping Manifold cross-sections in the XY plane. Angles are in degrees and rotations turn about the origin; every method returns a new cross-section.

    Index

    Constructors

    matrix

    transforms

    • Moves every point of a cross-section with a function of your own that changes the point in place, then fuses the result so any crossings the move introduced are cleaned up.

      Parameters

      Returns Promise<CrossSectionPointer>

      The warped cross-section

      const wavy = await bitbybit.manifold.crossSection.transforms.warp({
      crossSection: square,
      warpFunc: (vert) => { vert[1] += Math.sin(vert[0]) * 0.5; },
      });