32 data.
extrusion = (transform * up).normalized<fltp08>();
94 if (primitive_count == 0)
117 if (model.isScene() && model.hasMetaData(
"is_cad_core") && model.metaData(
"is_cad_core").getAs<
bool>())
127 if (write_modifier->canHandleBlock(model))
128 return write_modifier->handleBlock(model, *
this);
130 if (model.childCount() > 0 && !model.getGeometry().isValid())
142 if(model.getGeometry().isValid())
191 name.
replace(
"_Deployment_Linework",
"",
true);
192 name.
replace(
"_Deployment",
"_DEPL",
true);
193 name.
replace(
"Boretrak",
"TRAK",
true);
194 name.
replace(
"Station",
"STN",
true);
195 name.
replace(
"Linework_",
"",
true);
196 name.
replace(
"_Linework",
"",
true);
197 name.
replace(
"Points",
"PTS",
true);
198 name.
replace(
"Mesh",
"MESH",
true);
199 name.
replace(
"CircleScan",
"CIR",
true);
200 name.
replace(
"Scan",
"SCAN",
true);
201 name.
replace(
"Circle",
"CIR",
true);
213 if (!
layers.hasKey(layer_name))
220 layers[layer_name] = layer_data;
225 layer_name = model_name;
226 if (!
layers.hasKey(layer_name))
229 layer_data.
name = layer_name;
231 layers[layer_name] = layer_data;
287 return "."+local_path;
294 dxf_mat.
name = material_name;
397 if (write_modifier->canHandleInsert(model))
401 write_modifier->handleInsert(transform, model, parent_handle, *
this);
442 if (write_modifier->canHandleBlock(model))
453 if (write_modifier->canHandleBlock(model))
454 return write_modifier->handleBlock(model, *
this);
461 for (
const Model& model : children)
463 if (
Geometry geo = model.getGeometry())
478 if (model.isScene() && model.hasMetaData(
"is_cad_core") && model.metaData(
"is_cad_core").getAs<
bool>())
A bitset that stores 8 bits (elements with only two possible values: 0 or 1, true or false,...
Definition BitFlag.hpp:68
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
bool contains(const t_type &element) const
Definition Buffer.hpp:674
constexpr t_index_type size() const
Definition Buffer.hpp:1461
void removeAllOrdered(const t_type &object)
Definition Buffer.hpp:1176
void replaceAll(const t_type &var, const t_type &replacement)
Definition Buffer.hpp:1246
void clear()
Definition Buffer.hpp:572
Definition CADWriteModifier.h:11
Definition DXFBlockWriter.h:368
const FactoryParameters & params
Definition DXFBlockWriter.h:371
void insertObject(const Model &model, uint04 parent_handle=Constant< uint04 >::NaN)
Definition DXFBlockWriter.h:388
ParseResult postProcess(Model &model) final override
Definition DXFBlockWriter.h:447
Buffer< CADWriteModifier * > write_modifiers
Definition DXFBlockWriter.h:374
DXFBlockWriter(Dictionary< UUID, BlockData > &block_data, CADGeometryWriter &geo_options)
Definition DXFBlockWriter.h:375
DXFWriter & writer
Definition DXFBlockWriter.h:372
const Dictionary< UUID, BlockData > & block_data
Definition DXFBlockWriter.h:370
ParseResult process(Model &model) final override
Definition DXFBlockWriter.h:438
CADGeometryWriter & geo_options
Definition DXFBlockWriter.h:373
Definition DXFBlockWriter.h:56
ParseResult process(Model &model, Geometry &geo) final override
Definition DXFBlockWriter.h:106
const FactoryParameters & params
Definition DXFBlockWriter.h:60
Dictionary< String, uint04 > block_names
Definition DXFBlockWriter.h:66
Dictionary< String, LayerData > layers
Definition DXFBlockWriter.h:63
void processTablesSection(Model &model, Geometry &geo)
Definition DXFBlockWriter.h:91
Buffer< CADWriteModifier * > write_modifiers
Definition DXFBlockWriter.h:58
DXFWriter & writer
Definition DXFBlockWriter.h:61
DynamicPointer< CADHandleManager > handle_manager
Definition DXFBlockWriter.h:59
const bool write_materials
Definition DXFBlockWriter.h:70
String processName(const Model &model) const
Definition DXFBlockWriter.h:180
ParseResult process(Model &model) final override
Definition DXFBlockWriter.h:113
uint04 num_of_shapes
Definition DXFBlockWriter.h:69
String getImageFile(const String &image)
Definition DXFBlockWriter.h:272
uint04 getMaterialHandle(const Model &model)
Definition DXFBlockWriter.h:150
Dictionary< UUID, BlockData > block_data
Definition DXFBlockWriter.h:64
String processLayerName(const Model &model, const String &model_name)
Definition DXFBlockWriter.h:204
DXFTableWriteIterator(const FactoryParameters ¶ms, DXFWriter &writer, bool write_materials)
Definition DXFBlockWriter.h:72
const bool flatten_model
Definition DXFBlockWriter.h:71
BlockData convertToBlock(const Model &model)
Definition DXFBlockWriter.h:242
Dictionary< UUID, DXFMaterial > material_data
Definition DXFBlockWriter.h:65
DXFMaterial convertToMaterial(const Material &material)
Definition DXFBlockWriter.h:290
Definition DXFWriter.h:53
void startBlock(const BlockData &data)
Definition DXFWriter.cpp:191
void addInsert(const BlockInsert &insert)
Definition DXFWriter.cpp:1479
void endBlock(const BlockData &data)
Definition DXFWriter.cpp:218
void cleanupCADName(String &name)
Definition DXFWriter.cpp:1503
void addLayer(const LayerData &data)
Definition DXFWriter.cpp:1087
const DynamicPointer< CADHandleManager > & handleManager() const
Definition DXFWriter.h:56
bool isValid() const
Definition DesignObject.h:362
UUID uuid() const
Definition DesignObject.cpp:533
t_type getProperty(DesignProperty property) const
Definition DesignObject.h:263
Matrix< fltp08 > getTransform() const
Definition DesignObject.cpp:593
@ e_name
Definition DesignObject.h:100
@ e_description
Definition DesignObject.h:101
Definition Dictionary.h:48
Definition Pointer.hpp:303
static Matrix< fltp08 > GetOrientation(const Vector< 3, fltp08 > &extrusion)
Definition EntityConverter.h:2418
Definition FactoryOptions.h:46
Buffer< String > exclusion_model_types
Definition FactoryOptions.h:118
UnitManager units
Definition FactoryOptions.h:139
bool useValue(VertexProperty property) const
Definition FactoryOptions.h:89
bool flatten_model
Definition FactoryOptions.h:152
bool ignore_invisible
Definition FactoryOptions.h:167
static NDEVR_BASE_API String PathSepS
Definition File.h:186
NDEVR_BASE_API File getParentDirectory() const
Definition File.cpp:1692
NDEVR_BASE_API bool exists() const
Definition File.cpp:1010
NDEVR_BASE_API File & appendPath(const String &cs)
Definition File.cpp:786
uint04 vertexCount() const
Definition Geometry.h:713
uint04 primitiveCount(PrimitiveProperty property) const
Definition Geometry.h:669
static ImageFactory & DefaultFactory()
void writeToFile(const String &image_id, const File &file)
bool hasImage(const String &image_id)
const File & getFile(const String &image_id)
String optimizedWriteFileName(const String &image_id, const Buffer< String > &optional_extenstions=Buffer< String >())
@ e_gouraud
Definition Material.h:50
t_type getMaterialProperty(MaterialProperties mat_index) const
Definition Material.h:168
bool hasUVIntensity(UVType index) const
Definition Material.cpp:738
@ e_opacity
Definition Material.h:111
@ e_shininess
Definition Material.h:113
String getUVImage(UVType uv_index) const
Definition Material.cpp:883
fltp04 getUVIntensity(UVType uv_index) const
Definition Material.cpp:895
ShadingModel getShadingModel() const
Definition Material.cpp:541
@ e_solid_color
Definition Material.h:70
@ e_color_by_model
Definition Material.h:73
@ e_color_by_layer
Definition Material.h:78
@ e_image
Definition Material.h:77
UVMode getUVMode(UVType uv_index) const
Definition Material.cpp:727
RGBColor getUVColor(UVType uv_index) const
Definition Material.cpp:889
Definition Matrix.hpp:173
constexpr Vector< 3, t_type > decomposeOffset() const
Definition Matrix.hpp:440
constexpr Vector< 3, Angle< t_angle_type > > decomposeRotation() const
Definition Matrix.hpp:454
constexpr Vector< 3, t_type > decomposeScale() const
Definition Matrix.hpp:421
Matrix< fltp08 > getCompleteTransform() const
Definition Model.cpp:117
Geometry getGeometry() const
Definition Model.cpp:427
TranslatedString displayNamePath(const String &seperator=":") const
Definition Model.cpp:1286
bool hasLayer() const
Definition Model.cpp:2328
BitFlag parentMatrixFlags() const
Definition Model.cpp:2053
bool isVisible() const
Definition Model.cpp:1149
Model getLayer() const
Definition Model.cpp:2342
Material getRootMaterial(PrimitiveProperty property) const
Definition Model.cpp:545
t_type getModelProperty(ModelProperty property) const
Definition Model.h:152
@ e_scale_to_camera
Definition Model.h:72
@ e_orient_to_camera
Definition Model.h:70
@ e_follow_camera
Definition Model.h:71
@ e_type
Definition Model.h:100
@ e_export_ignored
Definition Model.h:115
TranslatedString displayName() const
Definition Model.cpp:1258
Definition ModelIterator.h:39
bool post_process_model
Definition ModelIterator.h:74
ParseResult
Definition ModelIterator.h:42
@ e_continue_parsing
Definition ModelIterator.h:43
@ e_do_not_parse_children
Definition ModelIterator.h:44
std::function< bool(const Model &)> model_filter
Definition ModelIterator.h:69
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:53
Definition Vertex.hpp:341
NDEVR_BASE_API String & replace(const String &sub_string, const String &replace_sub_string, bool ignore_case=false)
Definition String.cpp:343
Definition TranslatedString.h:9
NDEVR_BASE_API const String & translation() const
Definition TranslatedString.cpp:104
NDEVR_BASE_API UUID appendUUID(bool offset) const
Definition UUID.cpp:168
Resource< ConstPointer< Unit > > coordinate_space_unit
Definition UnitManager.h:185
A vertex.
Definition Vertex.hpp:54
@ e_background_contrast
Definition CADEntities.h:46
bool DXFShouldExport(FactoryOptions options, const Model &model)
Definition DXFBlockWriter.h:40
void convertToPlacementData(PlacementData &data, Matrix< fltp08 > transform)
Definition DXFBlockWriter.h:28
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
@ YAW
Definition Angle.h:53
CADColorInfo GenerateDXFColorInfo(const Model &model, bool is_flat, bool is_vertex)
Definition CADGeometryWriter.h:22
void FillOutLayerData(const Model &layer, LayerData &data)
Definition CADGeometryWriter.h:108
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
constexpr bool isNaN(const t_type &value)
Query if 'value' is valid or invalid.
Definition BaseFunctions.hpp:200
void FillOutData(const Model &model, EntityData &data)
Definition CADGeometryWriter.h:117
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
Definition CADEntities.h:172
Vertex< 3, fltp08 > offset
Definition CADEntities.h:178
String description
Definition CADEntities.h:179
Definition CADEntities.h:502
String block_name
Definition CADEntities.h:503
ColorMode mode
Definition CADEntities.h:69
RGBColor color
Definition CADEntities.h:70
Definition CADGeometryWriter.h:126
Matrix< fltp08 > transform
Definition CADGeometryWriter.h:131
void setup(const Model &m, const Geometry &geo)
Definition CADGeometryWriter.h:159
void writeGeometry()
Definition CADGeometryWriter.h:424
uint04 parent_handle
Definition CADGeometryWriter.h:138
String layer_name
Definition CADGeometryWriter.h:135
Definition BaseValues.hpp:272
Definition CADEntities.h:970
String description
Definition CADEntities.h:972
MaterialUVOptions ambient
Definition CADEntities.h:973
String name
Definition CADEntities.h:971
MaterialUVImageOptions diffuse
Definition CADEntities.h:974
fltp08 opacity_percent
Definition CADEntities.h:977
Matrix< fltp08 > mat_matrix
Definition CADEntities.h:978
fltp08 specular_gloss_factor
Definition CADEntities.h:976
MaterialUVImageOptions specular
Definition CADEntities.h:975
uint04 material_handle
Definition CADEntities.h:145
CADColorInfo color_info
Definition CADEntities.h:142
String layer
Definition CADEntities.h:140
Vector< 3, fltp08 > extrusion
Definition CADEntities.h:184
Definition IOFactory.h:56
const File & file(const String &name="default") const
Definition IOFactory.h:73
FactoryOptions options
Definition IOFactory.h:90
uint04 parent_handle
Definition CADEntities.h:135
uint04 handle
Definition CADEntities.h:134
Definition CADEntities.h:154
String name
Definition CADEntities.h:167
RGBColor color
Definition CADEntities.h:967
File map_file
Definition CADEntities.h:966
RGBColor color
Definition CADEntities.h:960
fltp08 color_intensity
Definition CADEntities.h:959
bool use_value
Definition CADEntities.h:958
Definition CADEntities.h:496
Vector< 3, fltp08 > scale
Definition CADEntities.h:498
Angle< fltp08 > azimuth
Definition CADEntities.h:499
Vector< 3, fltp08 > offset
Definition CADEntities.h:497