brepjs API Reference
    Preparing search index...

    Function castShape

    • Wrap a raw kernel shape into a properly branded type. Performs a downcast and wraps in a disposable handle.

      Note: When D is '2D', Shell/Solid/CompSolid are not valid members of AnyShape<'2D'>. If the kernel shape happens to be one of these types, they will be cast unsoundly. Prefer castShape3D for shapes known to be 3D, and use the default castShape() (which defaults to '3D') for normal usage.

      Type Parameters

      Parameters

      • ocShape: any
      • Optionaldim: D

      Returns AnyShape<D>