![]() |
NDEVR
API Documentation
|
A ModelIterator that iterates over each object in the model hierarchy turning them into nested BlockData objects. More...
Public Member Functions | |
| DXFBlockWriter (Dictionary< UUID, BlockData > &block_data, CADGeometryWriter &geo_options) | |
| Constructs a block writer with the given block data and geometry writer. | |
| void | insertObject (const Model &model, uint04 parent_handle=Constant< uint04 >::Invalid) |
| Writes a model as a DXF INSERT entity. | |
| ParseResult | postProcess (Model &model) final override |
| Post-processes a model after child iteration. | |
| ParseResult | process (Model &model) final override |
| Processes a model during iteration. | |
| Public Member Functions inherited from ModelIterator | |
| ModelIterator () | |
| Default constructor. | |
| ModelIterator (Buffer< Model > models) | |
| Constructs an iterator initialized with multiple root models. | |
| ModelIterator (const Model &model) | |
| Constructs an iterator initialized with a single root model. | |
| void | addToStack (const Model &model) |
| Adds a model to the internal traversal stack without starting iteration. | |
| Model | currentModel () const |
| Returns the model currently at the top of the traversal stack. | |
| void | parseAll () |
| Parses all models currently on the internal stack and their descendants. | |
| void | parseAll (const Model &model) |
| Parses the given model and all of its descendants. | |
| void | parseAllChildren (const Model &parent) |
| Parses all children of the given parent model, but not the parent itself. | |
| void | parseAllModels (const Buffer< Model > &models) |
| Parses all models in the given buffer and their descendants. | |
| ParseResult | parseNext () |
| Parses the next model on the stack, processing it and optionally its geometry and material. | |
Public Attributes | |
| const Dictionary< UUID, BlockData > & | block_data |
| Block definitions from the table-write phase. | |
| CADGeometryWriter & | geo_options |
| The geometry writer for raw geometry output. | |
| const FactoryParameters & | params |
| The factory parameters. | |
| Buffer< CADWriteModifier * > | write_modifiers |
| Custom write modifiers. | |
| DXFWriter & | writer |
| The DXF writer for output. | |
| Public Attributes inherited from ModelIterator | |
| bool | depth_first = true |
| Whether to traverse depth-first (true) or breadth-first (false). | |
| std::function< bool(const Model &, const Geometry &)> | geo_filter |
| Optional filter predicate for geometry processing. Returns true to include. | |
| bool | is_recursive = true |
| Whether to recurse into child models. | |
| std::function< bool(const Model &, const Material &)> | material_filter |
| Optional filter predicate for material processing. Returns true to include. | |
| std::function< bool(const Model &)> | model_filter |
| Optional filter predicate for model processing. Returns true to include. | |
| bool | post_process_model = false |
| Whether to invoke postProcess() after a model's children have been parsed. | |
| bool | process_geometry = true |
| Whether to invoke process() for each Geometry on a model. | |
| bool | process_material = false |
| Whether to invoke process() for each Material on a model. | |
| bool | process_model = true |
| Whether to invoke process() for the model itself. | |
| bool | use_unit = false |
| Whether to apply unit conversions during processing. | |
Additional Inherited Members | |
| Public Types inherited from ModelIterator | |
| enum | ParseResult { e_continue_parsing , e_do_not_parse_children , e_finish_parsing } |
| The result returned by process functions to control iteration flow. More... | |
| Protected Member Functions inherited from ModelIterator | |
| virtual void | _parseAllModels () |
| Internal method that drives the main parsing loop over all stacked models. | |
| Model | popNextModel () |
| Pops and returns the next model from the traversal stack. | |
| virtual ParseResult | process (Model &model, Geometry &geo) |
| Called for each geometry associated with a model. | |
| virtual ParseResult | process (Model &model, Material &mat) |
| Called for each material associated with a model. | |
| void | removeFromPostProcessStack () |
| Removes the current model from the post-process stack. | |
| Protected Attributes inherited from ModelIterator | |
| uint04 | m_forward_position = 0U |
| Current forward index position used in breadth-first traversal. | |
| Buffer< std::pair< Model, uint04 > > | m_model_parent_stack |
| Stack tracking parent models and their child indices for post-processing. | |
| Buffer< Model > | m_model_stack |
| The stack of models pending traversal. | |
A ModelIterator that iterates over each object in the model hierarchy turning them into nested BlockData objects.
Definition at line 64 of file DXFBlockWriter.h.
| DXFBlockWriter::DXFBlockWriter | ( | Dictionary< UUID, BlockData > & | block_data, |
| CADGeometryWriter & | geo_options ) |
Constructs a block writer with the given block data and geometry writer.
| [in] | block_data | The block definitions. |
| [in] | geo_options | The geometry writer. |
References block_data, and geo_options.
| void DXFBlockWriter::insertObject | ( | const Model & | model, |
| uint04 | parent_handle = Constant< uint04 >::Invalid ) |
Writes a model as a DXF INSERT entity.
| [in] | model | The model to insert. |
| [in] | parent_handle | The parent entity handle. |
|
finaloverridevirtual |
Post-processes a model after child iteration.
| [in] | model | The model to post-process. |
Reimplemented from ModelIterator.
|
finaloverridevirtual |
Processes a model during iteration.
| [in] | model | The model to process. |
Reimplemented from ModelIterator.