|
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. | |
| const std::vector< std::string > | GetFileExtensions () const override |
| Return a vector of the file extensions handled by this plugin. | |
| bool | Load (const wxString &aFileName) override |
| Load file for import. | |
| bool | LoadFromMemory (const wxMemoryBuffer &aMemBuffer) override |
| Set memory buffer with content for import. | |
| bool | Import () override |
| Actually imports the file. | |
| double | GetImageWidth () const override |
| Return image width from original imported file. | |
| double | GetImageHeight () const override |
| Return image height from original imported file. | |
| BOX2D | GetImageBBox () const override |
| Return image bounding box from original imported file. | |
| std::vector< wxString > | GetSourceLayers () const |
| void | updateImageLimits (const VECTOR2D &aPoint) |
| virtual void | SetImporter (GRAPHICS_IMPORTER *aImporter) override |
| Set the receiver of the imported shapes. | |
| void | ImportAsFootprintGraphic (bool aImportAsFootprintGraphic) |
| Allow the import DXF items converted to board graphic items or footprint graphic items. | |
| void | SetUnit (DXF_IMPORT_UNITS aUnit) |
| Set the default units when importing DXFs. | |
| void | SetDefaultLineWidthMM (double aWidth) |
| Set the default line width when importing dxf items like lines to Pcbnew. | |
| void | SetLineWidthMM (double aWidth) override |
| void | SetOffset (double aOffsetX, double aOffsetY) |
| Set the coordinate offset between the imported dxf items and Pcbnew. | |
| void | SetBrdLayer (int aBrdLayer) |
| Set the layer number to import dxf items. | |
| bool | ImportDxfFile (const wxString &aFile) |
| Implementation of the method used for communicate with this filter. | |
| bool | ImportDxfFile (const wxMemoryBuffer &aMemBuffer) |
| Implementation of the method used for communicate with this filter. | |
| const wxString & | GetMessages () const override |
| void | ReportMsg (const wxString &aMessage) override |
| wxString | GetWildcards () const |
| Return a list of wildcards that contains the file extensions handled by this plugin, separated with a semi-colon. | |
Protected Attributes | |
| GRAPHICS_IMPORTER * | m_importer |
| Importer used to create objects representing the imported shapes. | |
Private Member Functions | |
| double | mapX (double aDxfCoordX) |
| double | mapY (double aDxfCoordY) |
| double | mapDim (double aDxfValue) |
| double | lineWeightToWidth (int lw, DXF_IMPORT_LAYER *aLayer) |
| double | getCurrentUnitScale () |
| wxString | getDxfLayerName (const std::string &aLayerName) const |
| MATRIX3x3D | getArbitraryAxis (DL_Extrusion *aData) |
| VECTOR3D | wcsToOcs (const MATRIX3x3D &arbitraryAxis, VECTOR3D point) |
| Convert a given world coordinate point to object coordinate using the given arbitrary axis vectors. | |
| VECTOR3D | ocsToWcs (const MATRIX3x3D &arbitraryAxis, VECTOR3D point) |
| Convert a given object coordinate point to world coordinate using the given arbitrary axis vectors. | |
| DXF_IMPORT_LAYER * | getImportLayer (const std::string &aLayerName) |
| Return the import layer data. | |
| DXF_IMPORT_BLOCK * | getImportBlock (const std::string &aBlockName) |
| Return the import layer block. | |
| DXF_IMPORT_STYLE * | getImportStyle (const std::string &aStyleName) |
| Return the import style. | |
| 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. | |
| virtual void | setVariableInt (const std::string &key, int value, int code) override |
| Called for every int variable in the DXF file (e.g. | |
| virtual void | setVariableDouble (const std::string &key, double value, int code) override |
| Called for every double variable in the DXF file (e.g. | |
| 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. | |
| 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. | |
| virtual void | addMTextChunk (const std::string &text) override |
| virtual void | addMText (const DL_MTextData &aData) override |
| virtual void | endEntity () override |
| virtual void | addSpline (const DL_SplineData &aData) override |
| Called for every spline. | |
| virtual void | addControlPoint (const DL_ControlPointData &aData) override |
| Called for every spline control point. | |
| virtual void | addFitPoint (const DL_FitPointData &aData) override |
| Called for every spline fit point. | |
| virtual void | addKnot (const DL_KnotData &aData) override |
| Called for every spline knot value. | |
| virtual void | addXLine (const DL_XLineData &) override |
| virtual void | addRay (const DL_RayData &) override |
| virtual void | addArcAlignedText (const DL_ArcAlignedTextData &) 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 | addHatchLoop (const DL_HatchLoopData &) override |
| virtual void | addHatchEdge (const DL_HatchEdgeData &) 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 | addAttribute (const DL_AttributeData &) 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. | |
| static wxString | toNativeString (const wxString &aData) |
| Convert a DXF encoded string into a native Unicode string. | |
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 |
| std::string | m_mtextContent |
| 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 DEFAULT, 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 533 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
overrideprivatevirtual |
Definition at line 598 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddArc(), ANGLE_0, ANGLE_180, ANGLE_360, center, DEGREES_T, getArbitraryAxis(), getDxfLayerName(), getImportLayer(), MATRIX3x3< T >::GetScale(), lineWeightToWidth(), m_currentBlock, m_internalImporter, mapDim(), mapX(), mapY(), ocsToWcs(), RotatePoint(), GRAPHICS_IMPORTER_BUFFER::SetCurrentSourceLayer(), updateImageLimits(), VECTOR2< T >::x, VECTOR3< T >::x, VECTOR2< T >::y, and VECTOR3< T >::y.
Referenced by addEllipse().
|
inlineoverrideprivatevirtual |
Definition at line 474 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
inlineoverrideprivatevirtual |
Definition at line 550 of file dxf_import_plugin.h.
|
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 521 of file dxf_import_plugin.cpp.
References m_blocks, m_currentBlock, and name.
|
overrideprivatevirtual |
Definition at line 576 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddCircle(), center, getArbitraryAxis(), getDxfLayerName(), getImportLayer(), lineWeightToWidth(), m_currentBlock, m_internalImporter, mapDim(), mapX(), mapY(), ocsToWcs(), GRAPHICS_IMPORTER_BUFFER::SetCurrentSourceLayer(), updateImageLimits(), VECTOR3< T >::x, and VECTOR3< T >::y.
Referenced by addEllipse().
|
overrideprivatevirtual |
Called for every spline control point.
Definition at line 277 of file dxf_import_plugin.cpp.
References m_curr_entity.
|
inlineoverrideprivatevirtual |
Definition at line 479 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
inlineoverrideprivatevirtual |
Definition at line 499 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
inlineoverrideprivatevirtual |
Definition at line 504 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
inlineoverrideprivatevirtual |
Definition at line 494 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
inlineoverrideprivatevirtual |
Definition at line 484 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
inlineoverrideprivatevirtual |
Definition at line 509 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
inlineoverrideprivatevirtual |
Definition at line 489 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
overrideprivate |
Definition at line 645 of file dxf_import_plugin.cpp.
References std::abs(), addArc(), addCircle(), GRAPHICS_IMPORTER_BUFFER::AddEllipse(), GRAPHICS_IMPORTER_BUFFER::AddEllipseArc(), ANGLE_360, EDA_ANGLE::AsDegrees(), center, circle(), VECTOR2< T >::EuclideanNorm(), getArbitraryAxis(), getDxfLayerName(), getImportLayer(), lineWeightToWidth(), m_currentBlock, m_internalImporter, mapX(), mapY(), ocsToWcs(), RADIANS_T, radius, GRAPHICS_IMPORTER_BUFFER::SetCurrentSourceLayer(), updateImageLimits(), VECTOR3< T >::x, and VECTOR3< T >::y.
|
overrideprivatevirtual |
Called for every spline fit point.
Definition at line 284 of file dxf_import_plugin.cpp.
References m_curr_entity.
|
inlineoverrideprivatevirtual |
Definition at line 520 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
inlineoverrideprivatevirtual |
Definition at line 526 of file dxf_import_plugin.h.
|
inlineoverrideprivatevirtual |
Definition at line 525 of file dxf_import_plugin.h.
|
inlineoverrideprivatevirtual |
Definition at line 543 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
overrideprivatevirtual |
Definition at line 539 of file dxf_import_plugin.cpp.
References DEG2RAD(), getArbitraryAxis(), getDxfLayerName(), 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 292 of file dxf_import_plugin.cpp.
References m_curr_entity.
|
overrideprivatevirtual |
Definition at line 299 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 514 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
inlineoverrideprivatevirtual |
Definition at line 518 of file dxf_import_plugin.h.
|
overrideprivatevirtual |
Definition at line 412 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddLine(), end, getDxfLayerName(), getImportLayer(), lineWeightToWidth(), m_currentBlock, m_internalImporter, mapX(), mapY(), GRAPHICS_IMPORTER_BUFFER::SetCurrentSourceLayer(), and updateImageLimits().
|
overrideprivatevirtual |
Definition at line 314 of file dxf_import_plugin.cpp.
References From_UTF8(), and name.
|
overrideprivatevirtual |
Definition at line 889 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddText(), getArbitraryAxis(), getDxfLayerName(), 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, m_currentBlock, m_internalImporter, m_mtextContent, M_PI, DXF_IMPORT_STYLE::m_widthFactor, mapDim(), mapX(), mapY(), ocsToWcs(), GRAPHICS_IMPORTER_BUFFER::SetCurrentSourceLayer(), text, toNativeString(), updateImageLimits(), VECTOR2< T >::x, VECTOR3< T >::x, VECTOR2< T >::y, and VECTOR3< T >::y.
|
overrideprivatevirtual |
Definition at line 879 of file dxf_import_plugin.cpp.
References m_mtextContent, and text.
|
overrideprivatevirtual |
Definition at line 1395 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddCircle(), center, getArbitraryAxis(), getDxfLayerName(), m_currentBlock, m_internalImporter, mapDim(), mapX(), mapY(), ocsToWcs(), SCALE_FACTOR, GRAPHICS_IMPORTER_BUFFER::SetCurrentSourceLayer(), updateImageLimits(), VECTOR3< T >::x, and VECTOR3< T >::y.
|
overrideprivatevirtual |
Definition at line 431 of file dxf_import_plugin.cpp.
References getDxfLayerName(), and m_curr_entity.
|
inlineoverrideprivatevirtual |
Definition at line 469 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
inlineoverrideprivatevirtual |
Definition at line 538 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
overrideprivatevirtual |
Called for every spline.
Definition at line 258 of file dxf_import_plugin.cpp.
References getDxfLayerName(), and m_curr_entity.
|
overrideprivatevirtual |
Definition at line 722 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddText(), getArbitraryAxis(), getDxfLayerName(), 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, m_currentBlock, m_internalImporter, M_PI, DXF_IMPORT_STYLE::m_widthFactor, mapDim(), mapX(), mapY(), ocsToWcs(), GRAPHICS_IMPORTER_BUFFER::SetCurrentSourceLayer(), text, toNativeString(), updateImageLimits(), VECTOR2< T >::x, VECTOR3< T >::x, VECTOR2< T >::y, and VECTOR3< T >::y.
|
overrideprivatevirtual |
Definition at line 1384 of file dxf_import_plugin.cpp.
|
inlineoverrideprivatevirtual |
Definition at line 528 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
overrideprivatevirtual |
Called for every polyline vertex.
Definition at line 447 of file dxf_import_plugin.cpp.
References std::abs(), getArbitraryAxis(), getImportLayer(), insertArc(), insertLine(), lineWeightToWidth(), m_curr_entity, mapX(), mapY(), MIN_BULGE, ocsToWcs(), VECTOR3< T >::x, and VECTOR3< T >::y.
|
inlineoverrideprivatevirtual |
Definition at line 556 of file dxf_import_plugin.h.
|
inlineoverrideprivatevirtual |
Definition at line 559 of file dxf_import_plugin.h.
|
inlineoverrideprivatevirtual |
Definition at line 558 of file dxf_import_plugin.h.
|
inlineoverrideprivatevirtual |
Definition at line 557 of file dxf_import_plugin.h.
|
inlineoverrideprivatevirtual |
Definition at line 464 of file dxf_import_plugin.h.
References _, and ReportMsg().
|
inlineoverrideprivatevirtual |
Definition at line 551 of file dxf_import_plugin.h.
|
inlineoverrideprivatevirtual |
Definition at line 555 of file dxf_import_plugin.h.
|
inlineoverrideprivatevirtual |
Definition at line 554 of file dxf_import_plugin.h.
|
inlineoverrideprivatevirtual |
Definition at line 553 of file dxf_import_plugin.h.
|
inlineoverrideprivatevirtual |
Definition at line 552 of file dxf_import_plugin.h.
|
overrideprivatevirtual |
Definition at line 534 of file dxf_import_plugin.cpp.
References m_currentBlock.
|
overrideprivatevirtual |
Definition at line 490 of file dxf_import_plugin.cpp.
References std::abs(), getImportLayer(), insertArc(), insertLine(), insertSpline(), lineWeightToWidth(), m_curr_entity, and MIN_BULGE.
|
private |
Definition at line 1633 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 1036 of file dxf_import_plugin.cpp.
References ANGSTROMS, CM, DECIMETERS, FEET, INCH, m_currentUnit, METERS, MICROINCHES, MICRONS, MILS, MM, NANOMETERS, scale, and YARDS.
|
private |
Definition at line 359 of file dxf_import_plugin.cpp.
Referenced by addArc(), addCircle(), addEllipse(), addInsert(), addLine(), addMText(), addPoint(), addPolyline(), addSpline(), and addText().
|
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 bounding box from original imported file.
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 181 of file dxf_import_plugin.cpp.
References m_maxX, m_maxY, m_minX, m_minY, BOX2< Vec >::SetEnd(), and BOX2< Vec >::SetOrigin().
|
overridevirtual |
Return image height from original imported file.
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 175 of file dxf_import_plugin.cpp.
|
overridevirtual |
Return image width from original imported file.
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 169 of file dxf_import_plugin.cpp.
|
private |
Return the import layer block.
| aBlockName | is the raw string from dxflib. |
Definition at line 370 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 338 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 391 of file dxf_import_plugin.cpp.
References m_styles.
Referenced by addMText(), and addText().
|
inlineoverridevirtual |
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 324 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.
|
inline |
Definition at line 241 of file dxf_import_plugin.h.
References m_internalImporter.
Referenced by BOOST_AUTO_TEST_CASE(), and DIALOG_IMPORT_GRAPHICS::TransferDataFromWindow().
|
inlineinherited |
Return a list of wildcards that contains the file extensions handled by this plugin, separated with a semi-colon.
Definition at line 65 of file graphics_import_plugin.h.
References formatWildcardExt(), and GetFileExtensions().
|
overridevirtual |
Actually imports the file.
It is necessary to have loaded the file beforehand.
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 160 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORT_PLUGIN::m_importer, and m_internalImporter.
Referenced by BOOST_AUTO_TEST_CASE().
|
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 253 of file dxf_import_plugin.h.
References m_importAsFPShapes.
| bool DXF_IMPORT_PLUGIN::ImportDxfFile | ( | const wxMemoryBuffer & | aMemBuffer | ) |
Implementation of the method used for communicate with this filter.
| aMemBuffer | is the memory bufferr. |
Definition at line 236 of file dxf_import_plugin.cpp.
| 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 218 of file dxf_import_plugin.cpp.
Referenced by Load(), and LoadFromMemory().
|
private |
Definition at line 1436 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddArc(), center, m_curr_entity, m_currentBlock, m_internalImporter, M_PI, RADIANS_T, radius, SCALE_FACTOR, GRAPHICS_IMPORTER_BUFFER::SetCurrentSourceLayer(), updateImageLimits(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by addVertex(), and endEntity().
|
private |
Definition at line 1420 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORTER_BUFFER::AddLine(), end, m_curr_entity, m_currentBlock, m_internalImporter, SCALE_FACTOR, GRAPHICS_IMPORTER_BUFFER::SetCurrentSourceLayer(), updateImageLimits(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by addVertex(), and endEntity().
|
private |
Definition at line 1521 of file dxf_import_plugin.cpp.
References _, GRAPHICS_IMPORTER_BUFFER::AddSpline(), end, m_curr_entity, m_currentBlock, m_internalImporter, mapX(), mapY(), ReportMsg(), GRAPHICS_IMPORTER_BUFFER::SetCurrentSourceLayer(), and updateImageLimits().
Referenced by endEntity().
|
private |
Definition at line 323 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 547 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 _, ImportDxfFile(), m_blocks, m_internalImporter, m_layers, m_styles, and ReportMsg().
Referenced by BOOST_AUTO_TEST_CASE().
|
overridevirtual |
Set memory buffer with content for import.
It is necessary to have the GRAPHICS_IMPORTER object set before.
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 140 of file dxf_import_plugin.cpp.
References _, ImportDxfFile(), m_blocks, m_internalImporter, m_layers, m_styles, and ReportMsg().
|
private |
Definition at line 212 of file dxf_import_plugin.cpp.
References getCurrentUnitScale(), and SCALE_FACTOR.
Referenced by addArc(), addCircle(), addMText(), addPoint(), and addText().
|
private |
Definition at line 200 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 206 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 |
Convert a given object coordinate point to world coordinate using the given arbitrary axis vectors.
Definition at line 1659 of file dxf_import_plugin.cpp.
References wcsToOcs().
Referenced by addArc(), addCircle(), addEllipse(), addInsert(), addMText(), addPoint(), addText(), and addVertex().
|
overridevirtual |
Implements GRAPHICS_IMPORT_PLUGIN.
Definition at line 250 of file dxf_import_plugin.cpp.
References m_messages.
Referenced by add3dFace(), addArcAlignedText(), addDimAlign(), addDimAngular(), addDimAngular3P(), addDimDiametric(), addDimLinear(), addDimOrdinate(), addDimRadial(), addHatch(), addImage(), addLeader(), addRay(), addSolid(), addTrace(), addXLine(), insertSpline(), Load(), and LoadFromMemory().
|
inline |
Set the layer number to import dxf items.
The layer should be a technical layer, not a copper layer.
Definition at line 305 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 278 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 191 of file dxf_import_plugin.cpp.
References GRAPHICS_IMPORT_PLUGIN::m_importer, SetDefaultLineWidthMM(), and GRAPHICS_IMPORT_PLUGIN::SetImporter().
Referenced by BOOST_AUTO_TEST_CASE().
|
inlineoverridevirtual |
Reimplemented from GRAPHICS_IMPORT_PLUGIN.
Definition at line 283 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 294 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 265 of file dxf_import_plugin.h.
References m_currentUnit.
Referenced by BOOST_AUTO_TEST_CASE(), and DIALOG_IMPORT_GRAPHICS::TransferDataFromWindow().
|
inlineoverrideprivatevirtual |
Called for every double variable in the DXF file (e.g.
"$DIMEXO").
Definition at line 405 of file dxf_import_plugin.h.
|
overrideprivatevirtual |
Called for every int variable in the DXF file (e.g.
"$ACADMAINTVER").
Definition at line 1073 of file dxf_import_plugin.cpp.
References ANGSTROMS, CM, DECIMETERS, DEFAULT, FEET, INCH, m_codePage, m_currentUnit, m_importAnglePrecision, m_importCoordinatePrecision, METERS, MICROINCHES, MICRONS, MILS, MM, NANOMETERS, and YARDS.
|
overrideprivatevirtual |
Called for every string variable in the DXF file (e.g.
"$ACADVER").
Definition at line 1133 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 1140 of file dxf_import_plugin.cpp.
References res.
|
staticprivate |
Convert a DXF encoded string into a native Unicode string.
Definition at line 1194 of file dxf_import_plugin.cpp.
Referenced by addMText(), and addText().
| void DXF_IMPORT_PLUGIN::updateImageLimits | ( | const VECTOR2D & | aPoint | ) |
Definition at line 1623 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 |
Convert a given world coordinate point to object coordinate using the given arbitrary axis vectors.
Definition at line 1653 of file dxf_import_plugin.cpp.
Referenced by ocsToWcs().
|
private |
|
private |
|
private |
Definition at line 605 of file dxf_import_plugin.h.
Referenced by addBlock(), getImportBlock(), Load(), and LoadFromMemory().
|
private |
Definition at line 583 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), and SetBrdLayer().
|
private |
Definition at line 585 of file dxf_import_plugin.h.
Referenced by setVariableInt().
|
private |
Definition at line 590 of file dxf_import_plugin.h.
Referenced by addControlPoint(), addFitPoint(), addKnot(), addPolyline(), addSpline(), addVertex(), endEntity(), insertArc(), insertLine(), and insertSpline().
|
private |
Definition at line 607 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 597 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), getCurrentUnitScale(), SetUnit(), and setVariableInt().
|
private |
Definition at line 582 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), lineWeightToWidth(), and SetDefaultLineWidthMM().
|
private |
Definition at line 599 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), and setVariableInt().
|
private |
Definition at line 586 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), and ImportAsFootprintGraphic().
|
private |
Definition at line 598 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 138 of file graphics_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN::Import(), SVG_IMPORT_PLUGIN::Import(), SVG_IMPORT_PLUGIN::Load(), SVG_IMPORT_PLUGIN::LoadFromMemory(), DXF_IMPORT_PLUGIN::SetImporter(), and SetImporter().
|
private |
Definition at line 601 of file dxf_import_plugin.h.
Referenced by addArc(), addCircle(), addEllipse(), addInsert(), addLine(), addMText(), addPoint(), addText(), GetSourceLayers(), Import(), insertArc(), insertLine(), insertSpline(), Load(), and LoadFromMemory().
|
private |
Definition at line 604 of file dxf_import_plugin.h.
Referenced by addLayer(), DXF_IMPORT_PLUGIN(), getImportLayer(), Load(), and LoadFromMemory().
|
private |
Definition at line 594 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), GetImageBBox(), GetImageWidth(), and updateImageLimits().
|
private |
Definition at line 595 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), GetImageBBox(), GetImageHeight(), and updateImageLimits().
|
private |
Definition at line 588 of file dxf_import_plugin.h.
Referenced by GetMessages(), and ReportMsg().
|
private |
Definition at line 594 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), GetImageBBox(), GetImageWidth(), and updateImageLimits().
|
private |
Definition at line 595 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), GetImageBBox(), GetImageHeight(), and updateImageLimits().
|
private |
Definition at line 592 of file dxf_import_plugin.h.
Referenced by addMText(), and addMTextChunk().
|
private |
Definition at line 606 of file dxf_import_plugin.h.
Referenced by addTextStyle(), getImportStyle(), Load(), and LoadFromMemory().
|
private |
Definition at line 584 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN().
|
private |
Definition at line 580 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), mapX(), and SetOffset().
|
private |
Definition at line 581 of file dxf_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN(), mapY(), and SetOffset().