API Documentation
Loading...
Searching...
No Matches
DXFFactory.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: IOFactory
28File: DXFFactory
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
38
39namespace NDEVR
40{
41 class DXFWriter;
42 struct BlockData;
43 class Geometry;
44 class Model;
45 class GenericOptionGroup;
46 struct BlockData;
47 struct DXFMaterial;
48 class DXFTableWriteIterator;
49 struct CADGeometryWriter;
50 class CADWriteModifier;
51 class DXFFactory : public IOFactory
52 {
53 public:
57 NDEVR_CAD_API virtual void getSupportedFormats(Buffer<FileFormat>& formats, bool is_read) override;
58 NDEVR_CAD_API virtual bool readFile(FactoryParameters& file) override;
59 NDEVR_CAD_API virtual bool writeFile(FactoryParameters& file) override;
60 NDEVR_CAD_API bool determineExtension(const File& file, String& extension) override;
63 NDEVR_CAD_API FactoryFeatures factoryFeatures(const FactoryParameters& file, bool is_import) const override;
65 static constexpr const char* CustomOptionsLabel() { return "dxf_options"; }
66 static constexpr const char* CustomOptionsAutoName() { return "auto_name_objects"; }
67 static constexpr const char* CustomOptionsTextFaceCamera() { return "text_face_camera"; }
68 static constexpr const char* CustomOptionsGroupImport() { return "group_import"; }
69
70 static constexpr const char* CustomOptionsDXFVersion() { return "dxf_version"; }
71 static constexpr const char* CustomOptionsDXFBinary() { return "dxf_binary"; }
72 static constexpr const char* CustomOptionsDXFDefaultMeshFormat() { return "default_mesh_format"; }
73 static constexpr const char* CustomOptionsDXFHideGridlines() { return "hide_gridlines"; }
74 static constexpr const char* CustomOptionsDXFClearHandleManager() { return "clear_handle_manager"; }
75 protected:
76 static void setupFromCustomOptions(DXFWriter& writer, const GenericOptionGroup& group, CADGeometryWriter& options);
77 bool writeDXFNoBlocks(DXFWriter& writer, Dictionary<UUID, BlockData> block_data, FactoryParameters& params, CADGeometryWriter& geo_write_options);
78 bool writeDXFBlocks(DXFWriter& writer, Dictionary<UUID, BlockData> block_data, FactoryParameters& params, CADGeometryWriter& geo_write_options);
79 protected:
82 };
83}
84
#define NDEVR_CAD_API
Definition DLLInfo.h:79
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:59
Definition CADWriteModifier.h:11
Definition DXFFactory.h:52
virtual NDEVR_CAD_API void getSupportedFormats(Buffer< FileFormat > &formats, bool is_read) override
Buffer< CADWriteModifier * > m_write_modifiers
Definition DXFFactory.h:81
NDEVR_CAD_API FactoryOptions defaultReadOptions(const FactoryParameters &file) const override
static void setupFromCustomOptions(DXFWriter &writer, const GenericOptionGroup &group, CADGeometryWriter &options)
NDEVR_CAD_API void addWriteModifier(CADWriteModifier *modifier)
Definition DXFFactory.h:64
static NDEVR_CAD_API FileFormat AutodeskDXF()
static constexpr const char * CustomOptionsDXFVersion()
Definition DXFFactory.h:70
static constexpr const char * CustomOptionsDXFDefaultMeshFormat()
Definition DXFFactory.h:72
NDEVR_CAD_API FactoryOptions defaultWriteOptions(const FactoryParameters &file) const override
DynamicPointer< CADHandleManager > m_handle_manager
Definition DXFFactory.h:80
virtual NDEVR_CAD_API bool writeFile(FactoryParameters &file) override
static NDEVR_CAD_API FileFormat FlatDXF()
bool writeDXFNoBlocks(DXFWriter &writer, Dictionary< UUID, BlockData > block_data, FactoryParameters &params, CADGeometryWriter &geo_write_options)
static constexpr const char * CustomOptionsGroupImport()
Definition DXFFactory.h:68
NDEVR_CAD_API FactoryFeatures factoryFeatures(const FactoryParameters &file, bool is_import) const override
static constexpr const char * CustomOptionsDXFHideGridlines()
Definition DXFFactory.h:73
NDEVR_CAD_API bool determineExtension(const File &file, String &extension) override
bool writeDXFBlocks(DXFWriter &writer, Dictionary< UUID, BlockData > block_data, FactoryParameters &params, CADGeometryWriter &geo_write_options)
virtual NDEVR_CAD_API bool readFile(FactoryParameters &file) override
static constexpr const char * CustomOptionsDXFClearHandleManager()
Definition DXFFactory.h:74
static constexpr const char * CustomOptionsDXFBinary()
Definition DXFFactory.h:71
NDEVR_CAD_API DXFFactory()
static constexpr const char * CustomOptionsAutoName()
Definition DXFFactory.h:66
static constexpr const char * CustomOptionsLabel()
Definition DXFFactory.h:65
static constexpr const char * CustomOptionsTextFaceCamera()
Definition DXFFactory.h:67
Definition DXFWriter.h:53
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:59
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:319
Allows IOFactories to report what features they support to make the import/export dialogs.
Definition FactoryFeatures.h:44
User-defined options that define preferences for importing and exporting using IOFactory objects.
Definition FactoryOptions.h:49
Data that describes a particular file format and how to use the format.
Definition FileFormat.h:42
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
Definition GenericOptions.h:149
A service that provides Import/Export functionality for a model heirarchy. These can be.
Definition IOFactory.h:106
The core String class for the software.
Definition String.h:47
Definition ACIColor.h:37
Definition CADGeometryWriter.h:126
A container of input information that is to be filled with output information by an IOFactory.
Definition IOFactory.h:61