3#include <NDEVR/SoftwareService.h>
4#include <NDEVR/GeometryVertices.h>
5#include <NDEVR/Model.h>
6#include <NDEVR/Buffer.h>
7#include <NDEVR/GenericOption.h>
20 class DesignObjectLookup;
42 const void*
lock =
nullptr;
The equivelent of std::vector but with a bit more control.
A core class where all Design Objects including models, materials, and geometries are stored.
A simple structure for storing a collection of data.
A hash-based key-value store, useful for quick associative lookups.
GenericOptionGroup()=default
Default constructor.
const String & BooleanID() const
Returns the internal string identifier of this boolean engine.
static void ClearAllBoolean(Geometry &geo, InfoPipe *log, const void *lock)
Clears all boolean-related data from the given geometry.
virtual bool runBoolean(GeometryBooleanParameters ¶meters)=0
Executes the boolean operation defined by this engine on the given parameters.
String m_id
The internal string identifier of this boolean engine.
GeometryBoolean(const GeometryBoolean &filter)=delete
Copy constructor is deleted; boolean engines are not copyable.
static Buffer< BooleanDescription > GetAvailableDescriptions()
Retrieves the list of all available BooleanDescription options from registered engines.
GeometryBoolean(const GeometryBoolean &&filter)=delete
Move constructor is deleted; boolean engines are not movable.
virtual bool canRunBoolean(const GeometryBooleanParameters &)
Returns whether or not the boolean operation can be applied given the target parameters.
virtual Buffer< BooleanDescription > defaultBooleanArguments()
Returns the default set of BooleanDescription arguments for this engine.
GeometryBoolean(const TranslatedString &name, const String &id)
Constructs a GeometryBoolean engine with the given display name and identifier.
static void AddAvailableBooleanEngine(GeometryBoolean *filter)
Registers a GeometryBoolean engine so it becomes available for boolean operations.
TranslatedString m_name
The user-facing translated display name of this boolean engine.
static const Dictionary< String, GeometryBoolean * > & AvailableBoolean()
Returns the dictionary of all registered GeometryBoolean engines keyed by their string ID.
static Dictionary< String, GeometryBoolean * > s_global_available_boolean_engines
Global registry of all available boolean engines keyed by string ID.
static String ToCommandString(const Buffer< BooleanDescription > &descriptions)
Serializes a buffer of BooleanDescription objects into a command string representation.
static void ExecuteBoolean(const JSONNode &active_filters, GeometryBooleanParameters ¶ms, Model &target_surface_location)
Executes boolean operations using pre-populated parameters, writing results into the target model.
static uint04 AvailableBooleanDescriptionCount()
Returns the number of available boolean description entries across all registered engines.
virtual ~GeometryBoolean()=default
Virtual destructor for proper cleanup of derived classes.
static void ExecuteBoolean(const JSONNode &active_filters, const Buffer< Model > &models_to_surface, Model &target_surface_location, InfoPipe *log, const void *lock)
Executes boolean operations on a buffer of Models, writing results into the target model.
static void FinishBoolean(const Matrix< fltp08 > &transform, Geometry &geo, const GeometryBooleanParameters ¶ms)
Writes boolean operation results back into the geometry, applying the inverse transform.
static void ExecuteBoolean(const JSONNode &active_filters, const DesignSelection &selection_to_surface, Model &target_surface_location, DesignObjectLookup *lookup, InfoPipe *log, const void *lock)
Executes boolean operations on a DesignSelection, writing results into the target model.
static void PrepareForBoolean(const Matrix< fltp08 > &transform, const Geometry &geo, GeometryBooleanParameters ¶ms)
Prepares geometry data for a boolean operation by transforming and extracting mesh data.
static void SetupDefaultSurfaceObject(Model &target_surface_location, const void *lock)
Configures a Model as a default surface object suitable for receiving boolean operation results.
const TranslatedString & BooleanName() const
Returns the user-facing translated name of this boolean engine.
A core class within the model hierarchy containing vertex-based data (Usually 3D data) within a set c...
A light-weight base class for Log that allows processes to update, without the need for additional in...
JavaScript Object Notation or JSON is an open - standard file format that uses human - readable text ...
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
Templated logic for doing matrix multiplication.
A core class that represents a node on model hierarchy.
Software Service Managers take a Software service to modify the behavior of the software.
Base interface for services that extend or modify software behavior through modules.
The core String class for the NDEVR API.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
The primary namespace for the NDEVR SDK.
GeometryBooleanOperation
Types of GeometryBoolean operations supported natively by the NDEVR engine.
@ e_subtract
Subtracts one geometry volume from another.
@ e_cut
Cuts geometry along an intersection boundary.
@ e_concatinate
Concatenates (unions) geometry from multiple sources into one mesh.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
BooleanDescription(const TranslatedString &filter_name, const String &filter_id)
Constructs a BooleanDescription with the given display name and identifier.
Stores a groups of options for performing GeometryBoolean operations.
Buffer< Buffer< uint04 > > surface_polygons
Buffer of polygon index lists for non-triangulated surface faces.
Buffer< RGBColor > surface_colors
Buffer of per-vertex colors for the resulting surface.
Buffer< Vector< 3, uint04 > > surface_triangles
Buffer of triangle index triplets defining the resulting surface mesh.
const void * lock
Optional mutex or lock pointer used to synchronize access during the boolean operation.
Buffer< Vertex< 3, fltp04 > > surface_positions
Buffer of 3D vertex positions for the resulting surface.
GeometryBooleanParameters()
Constructs default GeometryBooleanParameters with empty buffers and null lock.
LogPtr log
Logger for reporting progress and errors during the boolean operation.
Buffer< Ray< 3, fltp04 > > surface_normals
Buffer of 3D surface normals for the resulting surface.
A container for storing vertex data associated with geometry, including positions,...