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. For normal usage, call castShape() without a dimension (it defaults to '3D') or castShape3D, which does the same.

      Type Parameters

      Parameters

      • ocShape: any
      • Optionaldim: D

      Returns AnyShape<D>