ExecuteResult

Reports non-critical errors detected during operation execution

Enum for reporting non-critical errors during Operation execution.

Note:
0 is always Success, non-0 is always Failure

For ExecuteResult, Failure means that the input data is likely wrong (e.g. a mesh was defined without self-intersections, but actually has them). If Operation::Execute returns Result::Ok but a failing ExecuteResult, then the mesh is still produced in a best-effort manner. It will be flagged as being potentially wrong though.

Signature

// Reports non-critical errors detected during operation execution
enum ExecuteResult:
    Ok = 0
    HardError = 6000
    InputIsNotSupersolid = 7001
    InputIsNonFinite = 7002
    InputIsNotWellDefined = 7003
    InputIsOutOfBounds = 7004
    InputIsNotSolid = 7005
    InputHasNestedComponents = 7006
    InputHasSelfIntersections = 7007
    InputHasSurfaceIntersections = 7008

Ok

No error occurred.

HardError

A hard error occurred and the resulting data cannot be trusted at all. This always means that the returned Result is not Result::Ok.

InputIsNotSupersolid

During execution, evidence that the provided input mesh is not supersolid was encountered. This usually means that the input has holes.

See MeshBuilder::AllowNonSupersolid and Operation::Heal for how to handle non-supersolid meshes.

Note:
ExecuteResult::InputIsNonSupersolid means that the Mesh is declared supersolid but we found evidence that it is not. Result::OperandMustBeSupersolid means that the Mesh is declared non-supersolid but passed to an operation that requires supersolid meshes. The former is usually bad data while the latter indicates a programming error (wrong use of API).

InputIsNonFinite

Some input vertices are not finite (aka infinite or NaN).

Note:
this is only reliably checked with ExecutionMode::Debug. It can cause undefined behavior in other modes.

InputIsNotWellDefined

Some input mesh is not well-defined (e.g. index-out-of-bounds).

Note:
this is only reliably checked with ExecutionMode::Debug. It can cause undefined behavior in other modes.

InputIsOutOfBounds

The ExactArithmetic has a maximum supported coordinate, i.e. a bounding box that all meshes must be inside of. This error indicates that some floating point inputs are out of this bounding box.

InputIsNotSolid

Without any flags, an input mesh must be a solid mesh: Its faces must enclose a solid volume, without any holes, and without overlapping each other. All triangles must also consistently point into the volume, or away from it. Sometimes, input that violates these assumptions can be detected, in which case this error is returned.

Should a more complex mesh setup be necessary, see MeshBuilder::AllowSurfaceIntersections, MeshBuilder::AllowNestedComponents, and SurfaceBuilder::AllowSelfIntersections. This can ease the requirement to allow for supersolid meshes as well.

This error is common in three cases:

  • the input has complex internal structure such as self-intersections (solution: allow the appropriate mesh configurations)
  • the input has holes (the mesh is not supersolid and error-tolerant booleans or preprocessing is necessary)
  • the input has inwards-oriented normals (flip the winding order of all faces)

InputHasNestedComponents

An input mesh without MeshBuilder::AllowNestedComponents or MeshType::Supersolid was found to actually have nested components. This usually indicates that the mesh was not imported properly.

Note:
this is only reliably checked with ExecutionMode::Debug. It can yield unexpected results in other modes.

InputHasSelfIntersections

An input mesh without SurfaceBuilder::AllowSelfIntersections or MeshType::Supersolid was found to actually have a surface where primitives intersect each other (or overlap). This usually indicates that the mesh was not imported properly.

Note:
this is only reliably checked with ExecutionMode::Debug. It can yield unexpected results in other modes.

InputHasSurfaceIntersections

An input mesh without MeshBuilder::AllowSurfaceIntersections or MeshType::Supersolid was found to actually have two different surfaces that intersect each other. This usually indicates that the mesh was not imported properly.

Note:
this is only reliably checked with ExecutionMode::Debug. It can yield unexpected results in other modes.