KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dxf_import_plugin.h File Reference
#include "graphics_import_plugin.h"
#include "graphics_importer_buffer.h"
#include "wx/translation.h"
#include <wx/arrstr.h>
#include <dl_creationadapter.h>
#include <dl_dxf.h>
#include <math/vector3.h>
#include <math/matrix3x3.h>
#include <wildcards_and_files_ext.h>
#include <list>

Go to the source code of this file.

Classes

struct  SPLINE_CTRL_POINT
 A helper class to store a spline control point (in X,Y plane only) More...
 
class  DXF2BRD_ENTITY_DATA
 A helper class to parse a DXF entity (polyline and spline) More...
 
class  DXF_IMPORT_LAYER
 A helper class to hold layer settings temporarily during import. More...
 
class  DXF_IMPORT_BLOCK
 A helper class to hold layer settings temporarily during import. More...
 
class  DXF_IMPORT_STYLE
 A helper class to hold style settings temporarily during import. More...
 
class  DXF_IMPORT_PLUGIN
 

Macros

#define DXF_IMPORT_LINEWEIGHT_BY_LAYER   -1
 
#define DXF_IMPORT_LINEWEIGHT_BY_BLOCK   -2
 
#define DXF_IMPORT_LINEWEIGHT_BY_LW_DEFAULT   -3
 
#define ON_UNSUPPORTED(error_msg)
 This class import DXF ASCII files and convert basic entities to board entities.
 

Enumerations

enum class  DXF_IMPORT_UNITS {
  DEFAULT = 0 , INCH = 1 , FEET = 2 , MM = 4 ,
  CM = 5 , METERS = 6 , MICROINCHES = 8 , MILS = 9 ,
  YARDS = 10 , ANGSTROMS = 11 , NANOMETERS = 12 , MICRONS = 13 ,
  DECIMETERS = 14 , DECAMETERS = 15 , HECTOMETERS = 16 , GIGAMETERS = 17 ,
  ASTRONOMICAL = 18 , LIGHTYEARS = 19 , PARSECS = 20
}
 DXF Units enum with values as specified in DXF 2012 Specification. More...
 

Functions

wxArrayString GetDxfImportUnitChoices ()
 
DXF_IMPORT_UNITS DxfImportUnitFromChoice (int aSelection)
 

Macro Definition Documentation

◆ DXF_IMPORT_LINEWEIGHT_BY_BLOCK

#define DXF_IMPORT_LINEWEIGHT_BY_BLOCK   -2

Definition at line 117 of file dxf_import_plugin.h.

◆ DXF_IMPORT_LINEWEIGHT_BY_LAYER

#define DXF_IMPORT_LINEWEIGHT_BY_LAYER   -1

◆ DXF_IMPORT_LINEWEIGHT_BY_LW_DEFAULT

#define DXF_IMPORT_LINEWEIGHT_BY_LW_DEFAULT   -3

◆ ON_UNSUPPORTED

#define ON_UNSUPPORTED ( error_msg)
Value:
reportMessage( wxString::Format( _( "%s is not supported." ), \
error_msg ) )
#define _(s)

This class import DXF ASCII files and convert basic entities to board entities.

It depends on the dxflib library.

Definition at line 223 of file dxf_import_plugin.h.

Enumeration Type Documentation

◆ DXF_IMPORT_UNITS

enum class DXF_IMPORT_UNITS
strong

DXF Units enum with values as specified in DXF 2012 Specification.

Enumerator
DEFAULT 
INCH 
FEET 
MM 
CM 
METERS 
MICROINCHES 
MILS 
YARDS 
ANGSTROMS 
NANOMETERS 
MICRONS 
DECIMETERS 
DECAMETERS 
HECTOMETERS 
GIGAMETERS 
ASTRONOMICAL 
LIGHTYEARS 
PARSECS 

Definition at line 182 of file dxf_import_plugin.h.

Function Documentation

◆ DxfImportUnitFromChoice()

DXF_IMPORT_UNITS DxfImportUnitFromChoice ( int aSelection)
Returns
the unit at aSelection in GetDxfImportUnitChoices(), or DXF_IMPORT_UNITS::DEFAULT when aSelection is wxNOT_FOUND or otherwise out of range.

Definition at line 1089 of file dxf_import_plugin.cpp.

References DEFAULT, and dxfImportUnitChoices().

Referenced by DIALOG_IMPORT_GFX_SCH::TransferDataFromWindow(), and DIALOG_IMPORT_GRAPHICS::TransferDataFromWindow().

◆ GetDxfImportUnitChoices()

wxArrayString GetDxfImportUnitChoices ( )
Returns
the translated names of the units offered for a DXF file without $INSUNITS, in the order used by DxfImportUnitFromChoice().

Definition at line 1078 of file dxf_import_plugin.cpp.

References dxfImportUnitChoices().

Referenced by DIALOG_IMPORT_GFX_SCH::DIALOG_IMPORT_GFX_SCH(), and DIALOG_IMPORT_GRAPHICS::DIALOG_IMPORT_GRAPHICS().