34#include "EntityCodes.h"
35#include "CADEntityStreamer.h"
36#include <NDEVR/String.h>
37#include <NDEVR/DynamicPointer.h>
38#include <NDEVR/LineSegment.h>
39#include <NDEVR/Polyline.h>
59 class NDEVR_CAD_API DXFWriter
67 void writeAPPIDTable();
68 void writeDimStyleTable();
69 void writeViewTable();
70 void writeStyleTable();
73 void writeLTypeTable();
81 void writeDictionaries();
82 void writeViewStyleObject();
83 void writeReactors(
uint04 dictionary_handle);
84 void writeVariableValue(
const CADVariable& variable);
86 static bool getFileLine(
String& s, std::ifstream& in,
bool stripSpace =
true);
87 void writeAttributesFast(
const EntityData& data);
88 bool addColorInfo(
const CADColorInfo& data,
bool is_off =
false);
89 void writeLabel(
uint02 value_index);
90 void writeInteger(
uint02 value_index);
91 void writeIntegerL(
uint04 value_index);
92 void writeIntegerL(
sint04 value_index);
93 void writeIntegerS(
uint01 value_index);
94 void writeInteger(
sint02 value_index);
95 void writeDouble(
fltp08 value_index);
96 void writeValue(
uint02 value_index,
const String& value);
97 void writeHandle(
uint02 value_index,
const uint04& value);
98 void writeValue(
uint02 value_index,
const char*
const value);
110 void startLayers(
uint04 max_layer_count);
113 void addAttribute(
const Attrib& attrib);
114 void startFastPoints();
115 void addFastPoint(
const PointData& face);
116 void endFastPoints();
137 void addTrace(
bool is_solid,
const TraceData& face);
139 void add3dFace(
bool is_solid,
const TraceData& face);
141 void startFast3DFaces(
bool is_solid);
142 void addFast3dFace(
bool is_solid,
const TraceData& face);
143 void endFast3DFaces();
147 void addMText(
const TextData& data);
148 uint04 generateTempHandleIndex();
155 void addDimDiametric();
156 void addDimAngular();
157 void addDimAngular3P();
158 void addDimOrdinate();
169 void addMaterialObject(
const DXFMaterial& material);
170 void setBinary(
bool is_binary) { m_is_binary = is_binary; }
171 bool handleMTextData();
172 bool handleLWPolylineData();
173 bool handleLinetypeData();
175 void setDecimalPlaces(
uint04 decimals) { m_decimal_places = decimals; }
179 bool writePointers()
const {
return m_write_pointers; }
193 VertexMode m_vertex_mode;
211 bool m_write_pointers =
true;
212 bool m_write_parent_pointers =
true;
213 bool m_write_classes =
true;
214 bool m_write_general_view_style =
true;
215 bool m_write_viewports =
true;
216 bool m_write_dim_style =
true;
217 bool m_has_block_data =
false;
218 bool m_is_binary =
false;
220 uint04 m_decimal_places = 4;
The equivelent of std::vector but with a bit more control.
Handles converting NDEVR API UUID objects into CAD HANDLE IDs.
DXF streams store data in a large numbered index structure.
Handles writing data to a CAD entity stream.
A hash-based key-value store, useful for quick associative lookups.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
A sequence of connected line segments defined by ordered vertices along a path.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
A three-vertex polygon representing a triangle in N-dimensional space.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
A point in N-dimensional space, used primarily for spatial location information.
Stores extended data (XData) that can be written out as part of a DXF entity, using a custom write fu...
std::function< void(DXFWriter &dxf)> write_function
The function that writes the XData content.
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
int16_t sint02
-Defines an alias representing a 2 byte, signed integer.
int32_t sint04
-Defines an alias representing a 4 byte, signed integer.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
DXFVersion
Versions of the DXF we support writing out.
@ file
The source file path associated with this object.
@ name
The display name of the object.
Logic for storing attribute data in a CAD-friendly way for exporting and importing.
A block structure (Similar to a Model) used to share data with CAD.
Information for how to place a CAD block within a scene (Similar to Model).
Stores color information for interfacing with CAD.
A container for information pointing to a CAD dictionary in CAD memory.
Stores mesh data in a way optimized for CAD.
A variable shared between NDEVR and CAD.
A DXF friendly material class which contains UV properties similar to a Material object.
A CAD measurement similar to AngleMeasurementModel.
Dimensional measurements stored in a CAD-friendly way.
An entity in CAD which has a layer and other handle information.
A handle used to reference an object in CAD.
Layer information shared with CAD.
A CAD-friendly way to store line segment information.
Point data stored in a friendly way for interfacing with CAD.
logic for storing a polyline data in a CAD-friendly way for exporting and importing.
logic for storing a text data in a CAD-friendly way for exporting and importing.
logic for storing a trace data in a CAD-friendly way for exporting and importing.
logic for storing a viewport in a CAD-friendly way for exporting and importing.