NDEVR
API Documentation
DXFBlockWriter.h
1#pragma once
2#include "../Headers/DXFFactory.h"
3#include "../Headers/CADGeometryWriter.h"
4#include "../Headers/EntityConverter.h"
5#include "../Headers/DXFReader.h"
6#include "../Headers/DXFWriter.h"
7#include "../Headers/CADWriteModifier.h"
8#include "../Headers/CADHandleManager.h"
9
10#include <NDEVR/FactoryFeatures.h>
11
12#include <NDEVR/Text.h>
13#include <NDEVR/Material.h>
14#include <NDEVR/Project.h>
15#include <NDEVR/Model.h>
16#include <NDEVR/Geometry.h>
17#include <NDEVR/ImageFactory.h>
18#include <NDEVR/DesignObjectLookup.h>
19
20#include <NDEVR/Exception.h>
21#include <NDEVR/Pointer.h>
22#include <NDEVR/JSONNode.h>
23#include <NDEVR/FileFormat.h>
24#include <NDEVR/ACIColor.h>
25#include <NDEVR/MatrixFunctions.h>
26namespace NDEVR
27{
32 class DXFTableWriteIterator : public ModelIterator
33 {
34 public:
39
45 const bool write_materials;
46 const bool flatten_model;
47
48 DXFTableWriteIterator(const FactoryParameters& params, DXFWriter& writer, bool write_materials);
49 void processTablesSection(Model& model, Geometry& geo);
50 ParseResult process(Model& model, Geometry& geo) final override;
51 ParseResult process(Model& model) final override;
52 uint04 getMaterialHandle(const Model& model);
53 String processName(const Model& model) const;
54 String processLayerName(const Model& model, const String& model_name);
55 BlockData convertToBlock(const Model& model);
56 File getImageFile(const StringView& image);
57 DXFMaterial convertToMaterial(const Material& material);
58
59 };
60
89
90
91}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Streams NDEVR Geometry entities as CAD objects.
ParseResult postProcess(Model &model) final override
Post-processes a model after child iteration.
DXFWriter & writer
The DXF writer for output.
CADGeometryWriter & geo_options
The geometry writer for raw geometry output.
const FactoryParameters & params
The factory parameters.
const Dictionary< UUID, BlockData > & block_data
Block definitions from the table-write phase.
Buffer< CADWriteModifier * > write_modifiers
Custom write modifiers.
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 process(Model &model) final override
Processes a model during iteration.
ParseResult process(Model &model, Geometry &geo) final override
Called for each geometry associated with a model.
Buffer< CADWriteModifier * > write_modifiers
Custom write modifiers that intercept specific entity types.
Dictionary< UUID, BlockData > block_data
Block definitions keyed by model UUID.
Dictionary< String, uint04 > block_names
Block name to handle index mapping.
const bool flatten_model
Whether to flatten model hierarchy into layers.
uint04 num_of_shapes
Total number of shapes to write.
Dictionary< UUID, DXFMaterial > material_data
Material definitions keyed by material UUID.
DynamicPointer< CADHandleManager > handle_manager
Manages handle-to-UUID mapping during writing.
Dictionary< String, LayerData > layers
Layer definitions discovered during iteration.
ParseResult process(Model &model) final override
Called for each model node during traversal.
DXFWriter & writer
The DXF writer used for output.
const FactoryParameters & params
The factory parameters for this export.
const bool write_materials
Whether to write material definitions.
Handles writing data to a CAD entity stream.
Definition DXFWriter.h:60
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:64
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:356
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Definition File.h:53
A core class within the model hierarchy containing vertex-based data (Usually 3D data) within a set c...
Definition Geometry.h:143
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR ...
Definition Material.h:153
ParseResult
The result returned by process functions to control iteration flow.
ModelIterator()
Default constructor.
A core class that represents a node on model hierarchy.
Definition Model.h:292
The core String View class for the NDEVR API.
Definition StringView.h:58
The core String class for the NDEVR API.
Definition String.h:95
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
A block structure (Similar to a Model) used to share data with CAD.
A DXF friendly material class which contains UV properties similar to a Material object.
A container of input information that is to be filled with output information by an IOFactory.
Definition IOFactory.h:105