Operation::SelfUnion

Converts a supersolid mesh into a guaranteed solid mesh by removing internal overlaps

Returns the union of "inMesh" with itself, i.e. a solid mesh that does not contain surfaces inside the object.

Note:
this operation has no effect on meshes that are already strictly solid. Only if internal components or some kind of surface intersections are allowed will this actually compute something different.
Note:
a self-union is NOT the same thing as an outer hull. A hollow sphere is already solid (consisting of two sphere surfaces, the inner one oriented towards the center) and the self-union has no effect. The outer hull would remove the inner part.
Note:
this operation is useful to make supersolid meshes guaranteed solid.

Signature

class Operation:
    // Converts a supersolid mesh into a guaranteed solid mesh by removing internal overlaps
    fun selfUnion(
        inMesh: MeshOperand,
    ) -> MeshOperand