ExecuteMode

Selects how Solidean executes Boolean operations, balancing performance, threading, and validation

The ExecuteMode enum controls the strategy used when running Boolean operations. It determines whether Solidean executes single-threaded, uses multithreading across all available CPU cores, or enables a debug mode with additional validation. By choosing an appropriate mode, users can trade off between maximum performance, deterministic execution, and strong input verification.

Signature

// Selects how Solidean executes Boolean operations, balancing performance, threading, and validation
enum ExecuteMode:
    Singlethreaded = 100
    Multithreaded = 200
    Debug = 300

Singlethreaded

Singlethreaded execution. Context::Execute will block the current thread and only use the current thread for execution.

Multithreaded

Multithreaded execution mode distributes the Boolean workload across all available hardware threads. This is the default mode and generally provides the best throughput for large and complex meshes. Future releases may expose configuration options for limiting or pinning the number of threads, making it possible to tune performance in multi-tenant environments.

Debug

In debug mode, execution will attempt to verify and detect all required input constraints.

Most noteworthy, it will attempt to verify all input constraints. If a mesh was declared self-intersection-free but actually has self-intersection, the execution will fail with an appropriate ExecuteResult.

This mode has a non-trivial performance penalty as the whole reason for declaring the input mesh type is that the whole Boolean operation is often faster than the required checks.

Note:
not all checks are fully implemented here, which can lead to spurious NotImplemented results.