KiCad PCB EDA Suite
|
#include <dxf_import_plugin.h>
Public Member Functions | |
DXF_IMPORT_PLUGIN () | |
~DXF_IMPORT_PLUGIN () | |
const wxString | GetName () const override |
Return the plugin name. More... | |
const std::vector< std::string > | GetFileExtensions () const override |
Return a vector of the file extensions handled by this plugin. More... | |
bool | Load (const wxString &aFileName) override |
Load file for import. More... | |
bool | Import () override |
Actually imports the file. More... | |
double | GetImageWidth () const override |
Return image width from original imported file. More... | |
double | GetImageHeight () const override |
Return image height from original imported file. More... | |
void | updateImageLimits (const VECTOR2D &aPoint) |
virtual void | SetImporter (GRAPHICS_IMPORTER *aImporter) override |
Set the receiver of the imported shapes. More... | |
void | ImportAsFootprintGraphic (bool aImportAsFootprintGraphic) |
Allow the import DXF items converted to board graphic items or footprint graphic items. More... | |
void | SetUnit (DXF_IMPORT_UNITS aUnit) |
Set the default units when importing DXFs. More... | |
void | SetDefaultLineWidthMM (double aWidth) |
Set the default line width when importing dxf items like lines to Pcbnew. More... | |
void | SetLineWidthMM (double aWidth) override |
void | SetOffset (double aOffsetX, double aOffsetY) |
Set the coordinate offset between the imported dxf items and Pcbnew. More... | |
void | SetBrdLayer (int aBrdLayer) |
Set the layer number to import dxf items. More... | |
bool | ImportDxfFile (const wxString &aFile) |
Implementation of the method used for communicate with this filter. More... | |
const wxString & | GetMessages () const override |
wxString | GetWildcards () const |
Return a list of wildcards that contains the file extensions handled by this plugin, separated with a semi-colon. More... | |
Protected Attributes | |
GRAPHICS_IMPORTER * | m_importer |
< Importer used to create objects representing the imported shapes. More... | |
Private Member Functions | |
void | reportMsg (const wxString &aMessage) |
double | mapX (double aDxfCoordX) |
double | mapY (double aDxfCoordY) |
double | mapDim (double aDxfValue) |
double | lineWeightToWidth (int lw, DXF_IMPORT_LAYER *aLayer) |
double | getCurrentUnitScale () |
MATRIX3x3D | getArbitraryAxis (DL_Extrusion *aData) |
VECTOR3D | wcsToOcs (const MATRIX3x3D &arbitraryAxis, VECTOR3D point) |
Converts a given world coordinate point to object coordinate using the given arbitrary axis vectors. More... | |
VECTOR3D | ocsToWcs (const MATRIX3x3D &arbitraryAxis, VECTOR3D point) |
Converts a given object coordinate point to world coordinate using the given arbitrary axis vectors. More... | |
DXF_IMPORT_LAYER * | getImportLayer (const std::string &aLayerName) |
Return the import layer data. More... | |
DXF_IMPORT_BLOCK * | getImportBlock (const std::string &aBlockName) |
Return the import layer block. More... | |
DXF_IMPORT_STYLE * | getImportStyle (const std::string &aStyleName) |
Return the import style. More... | |
void | insertLine (const VECTOR2D &aSegStart, const VECTOR2D &aSegEnd, double aWidth) |
void | insertArc (const VECTOR2D &aSegStart, const VECTOR2D &aSegEnd, double aBulge, double aWidth) |
void | insertSpline (double aWidth) |
virtual void | setVariableString (const std::string &key, const std::string &value, int code) override |
Called for every string variable in the DXF file (e.g. More... | |
virtual void | setVariableInt (const std::string &key, int value, int code) override |
Called for every int variable in the DXF file (e.g. More... | |
virtual void | setVariableDouble (const std::string &key, double value, int code) override |
Called for every double variable in the DXF file (e.g. More... | |
virtual void | addLayer (const DL_LayerData &aData) override |
virtual void | addLine (const DL_LineData &aData) override |
virtual void | addLinetype (const DL_LinetypeData &data) override |
virtual void | addBlock (const DL_BlockData &) override |
Called for each BLOCK in the DXF file. More... | |
virtual void | endBlock () override |
virtual void | addTextStyle (const DL_StyleData &aData) override |
virtual void | addPoint (const DL_PointData &aData) override |
virtual void | addCircle (const DL_CircleData &aData) override |
virtual void | addArc (const DL_ArcData &aData) override |
void | addEllipse (const DL_EllipseData &aData) override |
virtual void | addText (const DL_TextData &aData) override |
virtual void | addPolyline (const DL_PolylineData &aData) override |
virtual void | addInsert (const DL_InsertData &aData) override |
virtual void | addVertex (const DL_VertexData &aData) override |
Called for every polyline vertex. More... | |
virtual void | addMText (const DL_MTextData &aData) override |
virtual void | endEntity () override |
virtual void | addSpline (const DL_SplineData &aData) override |
Called for every spline. More... | |
virtual void | addControlPoint (const DL_ControlPointData &aData) override |
Called for every spline control point. More... | |
virtual void | addFitPoint (const DL_FitPointData &aData) override |
Called for every spline fit point. More... | |
virtual void | addKnot (const DL_KnotData &aData) override |
Called for every spline knot value. More... | |
virtual void | addXLine (const DL_XLineData &) override |
virtual void | addRay (const DL_RayData &) override |
virtual void | addArcAlignedText (const DL_ArcAlignedTextData &) override |
virtual void | addAttribute (const DL_AttributeData &) override |
virtual void | addDimAlign (const DL_DimensionData &, const DL_DimAlignedData &) override |
virtual void | addDimLinear (const DL_DimensionData &, const DL_DimLinearData &) override |
virtual void | addDimRadial (const DL_DimensionData &, const DL_DimRadialData &) override |
virtual void | addDimDiametric (const DL_DimensionData &, const DL_DimDiametricData &) override |
virtual void | addDimAngular (const DL_DimensionData &, const DL_DimAngular2LData &) override |
virtual void | addDimAngular3P (const DL_DimensionData &, const DL_DimAngular3PData &) override |
virtual void | addDimOrdinate (const DL_DimensionData &, const DL_DimOrdinateData &) override |
virtual void | addLeader (const DL_LeaderData &) override |
virtual void | addLeaderVertex (const DL_LeaderVertexData &) override |
virtual void | addHatch (const DL_HatchData &) override |
virtual void | addTrace (const DL_TraceData &) override |
virtual void | add3dFace (const DL_3dFaceData &) override |
virtual void | addSolid (const DL_SolidData &) override |
virtual void | addImage (const DL_ImageData &) override |
virtual void | linkImage (const DL_ImageDefData &) override |
virtual void | addHatchLoop (const DL_HatchLoopData &) override |
virtual void | addHatchEdge (const DL_HatchEdgeData &) override |
virtual void | addXRecord (const std::string &) override |
virtual void | addXRecordString (int, const std::string &) override |
virtual void | addXRecordReal (int, double) override |
virtual void | addXRecordInt (int, int) override |
virtual void | addXRecordBool (int, bool) override |
virtual void | addXDataApp (const std::string &) override |
virtual void | addXDataString (int, const std::string &) override |
virtual void | addXDataReal (int, double) override |
virtual void | addXDataInt (int, int) override |
void | writeLine () |
void | writeMtext () |
Static Private Member Functions | |
static wxString | toDxfString (const wxString &aStr) |
Convert a native Unicode string into a DXF encoded string. More... | |
static wxString | toNativeString (const wxString &aData) |
Convert a DXF encoded string into a native Unicode string. More... | |
Private Attributes | |
double | m_xOffset |
double | m_yOffset |
double | m_defaultThickness |
int | m_brdLayer |
int | m_version |
std::string | m_codePage |
bool | m_importAsFPShapes |
wxString | m_messages |
DXF2BRD_ENTITY_DATA | m_curr_entity |
double | m_minX |
double | m_maxX |
double | m_minY |
double | m_maxY |
DXF_IMPORT_UNITS | m_currentUnit |
int | m_importCoordinatePrecision |
int | m_importAnglePrecision |
GRAPHICS_IMPORTER_BUFFER | m_internalImporter |
std::vector< std::unique_ptr< DXF_IMPORT_LAYER > > | m_layers |
std::vector< std::unique_ptr< DXF_IMPORT_BLOCK > > | m_blocks |
std::vector< std::unique_ptr< DXF_IMPORT_STYLE > > | m_styles |
DXF_IMPORT_BLOCK * | m_currentBlock |
Definition at line 216 of file dxf_import_plugin.h.
DXF_IMPORT_PLUGIN::DXF_IMPORT_PLUGIN | ( | ) |
Definition at line 92 of file dxf_import_plugin.cpp.
References Dwgs_User, DXF_IMPORT_LINEWEIGHT_BY_LW_DEFAULT, m_brdLayer, m_currentBlock, m_currentUnit, m_defaultThickness, m_importAnglePrecision, m_importAsFPShapes, m_importCoordinatePrecision, m_layers, m_maxX, m_maxY, m_minX, m_minY, m_version, m_xOffset, and m_yOffset.
DXF_IMPORT_PLUGIN::~DXF_IMPORT_PLUGIN | ( | ) |
Definition at line 115 of file dxf_import_plugin.cpp.
|
inlineoverrideprivatevirtual |
Definition at line 484 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
overrideprivatevirtual |
Definition at line 534 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddArc(), ANGLE_0, ANGLE_360, DEGREES_T, getArbitraryAxis(), getImportLayer(), lineWeightToWidth(), DXF_IMPORT_BLOCK::m_buffer, m_currentBlock, m_internalImporter, mapDim(), mapX(), mapY(), ocsToWcs(), RotatePoint(), updateImageLimits(), VECTOR2< T >::x, VECTOR3< T >::x, VECTOR2< T >::y, and VECTOR3< T >::y.
Referenced by addEllipse().
|
inlineoverrideprivatevirtual |
Definition at line 454 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 457 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
overrideprivatevirtual |
Called for each BLOCK in the DXF file.
These are re-usable elements that may be placed into the model space. The elements are dereferenced to the model, so we just need to skip the re-parsing for the block elements.
Definition at line 464 of file dxf_import_plugin.cpp.
References m_blocks, m_currentBlock, and name.
|
overrideprivatevirtual |
Definition at line 514 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddCircle(), getArbitraryAxis(), getImportLayer(), lineWeightToWidth(), DXF_IMPORT_BLOCK::m_buffer, m_currentBlock, m_internalImporter, mapDim(), mapX(), mapY(), ocsToWcs(), updateImageLimits(), VECTOR3< T >::x, and VECTOR3< T >::y.
Referenced by addEllipse().
|
overrideprivatevirtual |
Called for every spline control point.
Definition at line 232 of file dxf_import_plugin.cpp.
References m_curr_entity, and DXF2BRD_ENTITY_DATA::m_SplineControlPointList.
|
inlineoverrideprivatevirtual |
Definition at line 460 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 468 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 470 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 466 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 462 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 472 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 464 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
overrideprivate |
Definition at line 572 of file dxf_import_plugin.cpp.
References addArc(), addCircle(), GRAPHICS_IMPORTER_BUFFER::AddSpline(), ANGLE_360, EDA_ANGLE::AsDegrees(), VECTOR2< T >::EuclideanNorm(), getArbitraryAxis(), getImportLayer(), lineWeightToWidth(), DXF_IMPORT_BLOCK::m_buffer, m_currentBlock, m_internalImporter, mapX(), mapY(), ocsToWcs(), RADIANS_T, TransformEllipseToBeziers(), updateImageLimits(), VECTOR3< T >::x, and VECTOR3< T >::y.
|
overrideprivatevirtual |
Called for every spline fit point.
Definition at line 240 of file dxf_import_plugin.cpp.
References m_curr_entity, and DXF2BRD_ENTITY_DATA::m_SplineFitPointList.
|
inlineoverrideprivatevirtual |
Definition at line 481 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 496 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 491 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 488 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
overrideprivatevirtual |
Definition at line 482 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddShape(), getArbitraryAxis(), getImportBlock(), GRAPHICS_IMPORTER_BUFFER::GetShapes(), DXF_IMPORT_BLOCK::m_baseX, DXF_IMPORT_BLOCK::m_baseY, DXF_IMPORT_BLOCK::m_buffer, m_internalImporter, mapX(), mapY(), ocsToWcs(), scale, MATRIX3x3< T >::SetRotation(), VECTOR3< T >::x, and VECTOR3< T >::y.
|
overrideprivatevirtual |
Called for every spline knot value.
Definition at line 248 of file dxf_import_plugin.cpp.
References m_curr_entity, and DXF2BRD_ENTITY_DATA::m_SplineKnotsList.
|
overrideprivatevirtual |
Definition at line 255 of file dxf_import_plugin.cpp.
References DXF_IMPORT_LINEWEIGHT_BY_LAYER, DXF_IMPORT_LINEWEIGHT_BY_LW_DEFAULT, m_layers, and name.
|
inlineoverrideprivatevirtual |
Definition at line 475 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 478 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
overrideprivatevirtual |
Definition at line 360 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddLine(), getImportLayer(), lineWeightToWidth(), DXF_IMPORT_BLOCK::m_buffer, m_currentBlock, m_internalImporter, mapX(), mapY(), and updateImageLimits().
|
overrideprivatevirtual |
Definition at line 272 of file dxf_import_plugin.cpp.
References FROM_UTF8(), and name.
|
overrideprivatevirtual |
Definition at line 792 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddText(), getArbitraryAxis(), getImportStyle(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, DXF_IMPORT_BLOCK::m_buffer, m_currentBlock, m_internalImporter, DXF_IMPORT_STYLE::m_widthFactor, mapDim(), mapX(), mapY(), ocsToWcs(), text, toNativeString(), updateImageLimits(), VECTOR2< T >::x, VECTOR3< T >::x, VECTOR2< T >::y, and VECTOR3< T >::y.
|
overrideprivatevirtual |
Definition at line 1273 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddCircle(), getArbitraryAxis(), DXF_IMPORT_BLOCK::m_buffer, m_currentBlock, m_internalImporter, mapDim(), mapX(), mapY(), ocsToWcs(), SCALE_FACTOR, updateImageLimits(), VECTOR3< T >::x, and VECTOR3< T >::y.
|
overrideprivatevirtual |
Definition at line 377 of file dxf_import_plugin.cpp.
References DXF2BRD_ENTITY_DATA::Clear(), m_curr_entity, DXF2BRD_ENTITY_DATA::m_EntityFlag, DXF2BRD_ENTITY_DATA::m_EntityParseStatus, and DXF2BRD_ENTITY_DATA::m_EntityType.
|
inlineoverrideprivatevirtual |
Definition at line 452 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 486 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
overrideprivatevirtual |
Called for every spline.
Definition at line 214 of file dxf_import_plugin.cpp.
References DXF2BRD_ENTITY_DATA::Clear(), m_curr_entity, DXF2BRD_ENTITY_DATA::m_EntityFlag, DXF2BRD_ENTITY_DATA::m_EntityParseStatus, DXF2BRD_ENTITY_DATA::m_EntityType, DXF2BRD_ENTITY_DATA::m_SplineControlCount, DXF2BRD_ENTITY_DATA::m_SplineDegree, DXF2BRD_ENTITY_DATA::m_SplineFitCount, DXF2BRD_ENTITY_DATA::m_SplineKnotsCount, DXF2BRD_ENTITY_DATA::m_SplineTangentEndX, DXF2BRD_ENTITY_DATA::m_SplineTangentEndY, DXF2BRD_ENTITY_DATA::m_SplineTangentStartX, and DXF2BRD_ENTITY_DATA::m_SplineTangentStartY.
|
overrideprivatevirtual |
Definition at line 638 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddText(), getArbitraryAxis(), getImportStyle(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, DXF_IMPORT_BLOCK::m_buffer, m_currentBlock, m_internalImporter, DXF_IMPORT_STYLE::m_widthFactor, mapDim(), mapX(), mapY(), ocsToWcs(), text, toNativeString(), updateImageLimits(), VECTOR2< T >::x, VECTOR3< T >::x, VECTOR2< T >::y, and VECTOR3< T >::y.
|
overrideprivatevirtual |
Definition at line 1262 of file dxf_import_plugin.cpp.
|
inlineoverrideprivatevirtual |
Definition at line 483 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
overrideprivatevirtual |
Called for every polyline vertex.
Definition at line 392 of file dxf_import_plugin.cpp.
References std::abs(), getArbitraryAxis(), getImportLayer(), insertArc(), insertLine(), lineWeightToWidth(), DXF2BRD_ENTITY_DATA::m_BulgeVertex, m_curr_entity, DXF2BRD_ENTITY_DATA::m_EntityParseStatus, DXF2BRD_ENTITY_DATA::m_LastCoordinate, DXF2BRD_ENTITY_DATA::m_PolylineStart, mapX(), mapY(), MIN_BULGE, ocsToWcs(), VECTOR2< T >::x, VECTOR3< T >::x, VECTOR2< T >::y, and VECTOR3< T >::y.
|
inlineoverrideprivatevirtual |
Definition at line 512 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 519 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 518 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 513 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 450 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 501 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 510 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 509 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 508 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
inlineoverrideprivatevirtual |
Definition at line 503 of file dxf_import_plugin.h.
References ON_UNSUPPORTED.
|
overrideprivatevirtual |
Definition at line 477 of file dxf_import_plugin.cpp.
References m_currentBlock.
|
overrideprivatevirtual |
Definition at line 435 of file dxf_import_plugin.cpp.
References std::abs(), DXF2BRD_ENTITY_DATA::Clear(), getImportLayer(), insertArc(), insertLine(), insertSpline(), lineWeightToWidth(), DXF2BRD_ENTITY_DATA::m_BulgeVertex, m_curr_entity, DXF2BRD_ENTITY_DATA::m_EntityFlag, DXF2BRD_ENTITY_DATA::m_EntityType, DXF2BRD_ENTITY_DATA::m_LastCoordinate, DXF2BRD_ENTITY_DATA::m_PolylineStart, and MIN_BULGE.
|
private |
Definition at line 1508 of file dxf_import_plugin.cpp.
References VECTOR3< T >::Cross(), VECTOR3< T >::Normalize(), VECTOR3< T >::x, and VECTOR3< T >::y.
Referenced by addArc(), addCircle(), addEllipse(), addInsert(), addMText(), addPoint(), addText(), and addVertex().
|
private |
Definition at line 960 of file dxf_import_plugin.cpp.
References m_currentUnit, and scale.
|
inlineoverridevirtual |
Return a vector of the file extensions handled by this plugin.
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 227 of file dxf_import_plugin.h.
|
overridevirtual |
Return image height from original imported file.
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 155 of file dxf_import_plugin.cpp.
|
overridevirtual |
Return image width from original imported file.
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 149 of file dxf_import_plugin.cpp.
|
private |
Return the import layer block.
aBlockName | is the raw string from dxflib. |
Definition at line 321 of file dxf_import_plugin.cpp.
References m_blocks.
Referenced by addInsert().
|
private |
Return the import layer data.
aLayerName | is the raw string from dxflib getLayer(). |
Definition at line 300 of file dxf_import_plugin.cpp.
References m_layers.
Referenced by addArc(), addCircle(), addEllipse(), addLine(), addVertex(), and endEntity().
|
private |
Return the import style.
aStyleName | is the raw string from dxflib. |
Definition at line 342 of file dxf_import_plugin.cpp.
References m_styles.
Referenced by addMText(), and addText().
|
inlineoverridevirtual |
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 313 of file dxf_import_plugin.h.
References m_messages.
|
inlineoverridevirtual |
Return the plugin name.
This string will be used as the description in the file dialog.
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 222 of file dxf_import_plugin.h.
|
inlineinherited |
Return a list of wildcards that contains the file extensions handled by this plugin, separated with a semi-colon.
Definition at line 69 of file graphics_import_plugin.h.
References formatWildcardExt(), and GRAPHICS_IMPORT_PLUGIN::GetFileExtensions().
|
overridevirtual |
Actually imports the file.
It is necessary to have loaded the file beforehand.
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 140 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::ImportTo(), GRAPHICS_IMPORT_PLUGIN::m_importer, and m_internalImporter.
|
inline |
Allow the import DXF items converted to board graphic items or footprint graphic items.
aImportAsFootprintGraphic | use true to import in a footprint or false to import on a board. |
Definition at line 249 of file dxf_import_plugin.h.
References m_importAsFPShapes.
bool DXF_IMPORT_PLUGIN::ImportDxfFile | ( | const wxString & | aFile | ) |
Implementation of the method used for communicate with this filter.
aFile | is the full filename. |
Definition at line 188 of file dxf_import_plugin.cpp.
Referenced by Load().
|
private |
Definition at line 1313 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddArc(), DXF_IMPORT_BLOCK::m_buffer, m_currentBlock, m_internalImporter, M_PI_2, RADIANS_T, SCALE_FACTOR, updateImageLimits(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by addVertex(), and endEntity().
|
private |
Definition at line 1298 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddLine(), DXF_IMPORT_BLOCK::m_buffer, m_currentBlock, m_internalImporter, SCALE_FACTOR, updateImageLimits(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by addVertex(), and endEntity().
|
private |
Definition at line 1395 of file dxf_import_plugin.cpp.
References _, GRAPHICS_IMPORTER_BUFFER::AddLine(), GRAPHICS_IMPORTER_BUFFER::AddSpline(), DXF_IMPORT_BLOCK::m_buffer, m_curr_entity, m_currentBlock, m_internalImporter, DXF2BRD_ENTITY_DATA::m_SplineControlPointList, DXF2BRD_ENTITY_DATA::m_SplineDegree, DXF2BRD_ENTITY_DATA::m_SplineFitPointList, DXF2BRD_ENTITY_DATA::m_SplineKnotsList, mapX(), mapY(), reportMsg(), and updateImageLimits().
Referenced by endEntity().
|
private |
Definition at line 281 of file dxf_import_plugin.cpp.
References DXF_IMPORT_LINEWEIGHT_BY_LAYER, m_defaultThickness, DXF_IMPORT_LAYER::m_lineWeight, and SCALE_FACTOR.
Referenced by addArc(), addCircle(), addEllipse(), addLine(), addVertex(), and endEntity().
|
inlineoverrideprivatevirtual |
Definition at line 489 of file dxf_import_plugin.h.
|
overridevirtual |
Load file for import.
It is necessary to have the GRAPHICS_IMPORTER object set before.
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 120 of file dxf_import_plugin.cpp.
References _, GRAPHICS_IMPORTER_BUFFER::ClearShapes(), ImportDxfFile(), m_blocks, m_internalImporter, m_layers, m_styles, and reportMsg().
|
private |
Definition at line 182 of file dxf_import_plugin.cpp.
References getCurrentUnitScale(), and SCALE_FACTOR.
Referenced by addArc(), addCircle(), addMText(), addPoint(), and addText().
|
private |
Definition at line 170 of file dxf_import_plugin.cpp.
References getCurrentUnitScale(), m_xOffset, and SCALE_FACTOR.
Referenced by addArc(), addCircle(), addEllipse(), addInsert(), addLine(), addMText(), addPoint(), addText(), addVertex(), and insertSpline().
|
private |
Definition at line 176 of file dxf_import_plugin.cpp.
References getCurrentUnitScale(), m_yOffset, and SCALE_FACTOR.
Referenced by addArc(), addCircle(), addEllipse(), addInsert(), addLine(), addMText(), addPoint(), addText(), addVertex(), and insertSpline().
|
private |
Converts a given object coordinate point to world coordinate using the given arbitrary axis vectors.
Definition at line 1538 of file dxf_import_plugin.cpp.
References wcsToOcs().
Referenced by addArc(), addCircle(), addEllipse(), addInsert(), addMText(), addPoint(), addText(), and addVertex().
|
private |
Definition at line 206 of file dxf_import_plugin.cpp.
References m_messages.
Referenced by insertSpline(), and Load().
|
inline |
Set the layer number to import dxf items.
The layer should be a technical layer, not a copper layer.
Definition at line 301 of file dxf_import_plugin.h.
References m_brdLayer.
|
inline |
Set the default line width when importing dxf items like lines to Pcbnew.
DXF files have no line width explicit parameter, it will be most of time the line width of imported lines. f
aWidth | is the line width in mm. |
Definition at line 274 of file dxf_import_plugin.h.
References m_defaultThickness.
Referenced by SetImporter(), and SetLineWidthMM().
|
overridevirtual |
Set the receiver of the imported shapes.
Reimplemented from GRAPHICS_IMPORT_PLUGIN.
Definition at line 161 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER::GetLineWidthMM(), GRAPHICS_IMPORT_PLUGIN::m_importer, SetDefaultLineWidthMM(), and GRAPHICS_IMPORT_PLUGIN::SetImporter().
|
inlineoverridevirtual |
Reimplemented from GRAPHICS_IMPORT_PLUGIN.
Definition at line 279 of file dxf_import_plugin.h.
References SetDefaultLineWidthMM().
|
inline |
Set the coordinate offset between the imported dxf items and Pcbnew.
DXF files have the Y axis from bottom to top aOffsetX = 0, and aOffsetY = - vertical page size to import a full page.
aOffsetX | is the X offset in mm. |
aOffsetY | is the Y offset in mm. |
Definition at line 290 of file dxf_import_plugin.h.
|
inline |
Set the default units when importing DXFs.
DXFs can lack units by design which requires the importing software to make the decision.
aUnits | is the default unit of the DXF to assume. |
Definition at line 261 of file dxf_import_plugin.h.
References m_currentUnit.
|
inlineoverrideprivatevirtual |
Called for every double variable in the DXF file (e.g.
"$DIMEXO").
Definition at line 393 of file dxf_import_plugin.h.
|
overrideprivatevirtual |
Called for every int variable in the DXF file (e.g.
"$ACADMAINTVER").
Definition at line 1033 of file dxf_import_plugin.cpp.
References m_codePage, m_currentUnit, m_importAnglePrecision, and m_importCoordinatePrecision.
|
overrideprivatevirtual |
Called for every string variable in the DXF file (e.g.
"$ACADVER").
Definition at line 1127 of file dxf_import_plugin.cpp.
|
staticprivate |
Convert a native Unicode string into a DXF encoded string.
DXF encoding includes the following special sequences:
Definition at line 1134 of file dxf_import_plugin.cpp.
References res.
|
staticprivate |
Convert a DXF encoded string into a native Unicode string.
Definition at line 1188 of file dxf_import_plugin.cpp.
References res.
Referenced by addMText(), and addText().
void DXF_IMPORT_PLUGIN::updateImageLimits | ( | const VECTOR2D & | aPoint | ) |
Definition at line 1498 of file dxf_import_plugin.cpp.
References m_maxX, m_maxY, m_minX, m_minY, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by addArc(), addCircle(), addEllipse(), addLine(), addMText(), addPoint(), addText(), insertArc(), insertLine(), and insertSpline().
|
private |
Converts a given world coordinate point to object coordinate using the given arbitrary axis vectors.
Definition at line 1532 of file dxf_import_plugin.cpp.
Referenced by ocsToWcs().
|
private |
|
private |
|
private |
Definition at line 563 of file dxf_import_plugin.h.
Referenced by addBlock(), getImportBlock(), and Load().
|
private |
Definition at line 543 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), and SetBrdLayer().
|
private |
Definition at line 545 of file dxf_import_plugin.h.
Referenced by setVariableInt().
|
private |
Definition at line 550 of file dxf_import_plugin.h.
Referenced by addControlPoint(), addFitPoint(), addKnot(), addPolyline(), addSpline(), addVertex(), endEntity(), and insertSpline().
|
private |
Definition at line 565 of file dxf_import_plugin.h.
Referenced by addArc(), addBlock(), addCircle(), addEllipse(), addLine(), addMText(), addPoint(), addText(), DXF_IMPORT_PLUGIN(), endBlock(), insertArc(), insertLine(), and insertSpline().
|
private |
Definition at line 555 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), getCurrentUnitScale(), SetUnit(), and setVariableInt().
|
private |
Definition at line 542 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), lineWeightToWidth(), and SetDefaultLineWidthMM().
|
private |
Definition at line 557 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), and setVariableInt().
|
private |
Definition at line 546 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), and ImportAsFootprintGraphic().
|
private |
Definition at line 556 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), and setVariableInt().
|
protectedinherited |
< Importer used to create objects representing the imported shapes.
Definition at line 126 of file graphics_import_plugin.h.
Referenced by Import(), SVG_IMPORT_PLUGIN::Import(), SVG_IMPORT_PLUGIN::Load(), GRAPHICS_IMPORT_PLUGIN::SetImporter(), and SetImporter().
|
private |
Definition at line 559 of file dxf_import_plugin.h.
Referenced by addArc(), addCircle(), addEllipse(), addInsert(), addLine(), addMText(), addPoint(), addText(), Import(), insertArc(), insertLine(), insertSpline(), and Load().
|
private |
Definition at line 562 of file dxf_import_plugin.h.
Referenced by addLayer(), DXF_IMPORT_PLUGIN(), getImportLayer(), and Load().
|
private |
Definition at line 552 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), GetImageWidth(), and updateImageLimits().
|
private |
Definition at line 553 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), GetImageHeight(), and updateImageLimits().
|
private |
Definition at line 548 of file dxf_import_plugin.h.
Referenced by GetMessages(), and reportMsg().
|
private |
Definition at line 552 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), GetImageWidth(), and updateImageLimits().
|
private |
Definition at line 553 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), GetImageHeight(), and updateImageLimits().
|
private |
Definition at line 564 of file dxf_import_plugin.h.
Referenced by addTextStyle(), getImportStyle(), and Load().
|
private |
Definition at line 544 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN().
|
private |
Definition at line 540 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), mapX(), and SetOffset().
|
private |
Definition at line 541 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), mapY(), and SetOffset().