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.
Wrap a raw kernel shape into a properly branded type. Performs a downcast and wraps in a disposable handle.
Note: When
Dis'2D', Shell/Solid/CompSolid are not valid members ofAnyShape<'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 defaultcastShape()(which defaults to'3D') for normal usage.