The unfortunate combination of using static_cast to promote board items
to module items then using the assignment operator without any thought as
to what would happen in MODULE::Add() caused the board objects to not be
added to the module. This is expected because board items cannot be in
modules. Did this ever work or did someone have a colossal brain cramp?
If it did work, who ever changed it did not test it because in debug
builds, you would have gotten and assertion on every object imported. On
release builds nothing is imported silently.
Add module object types to the DXF importer and code to choose which type
of object to import.
Remove offending static casts and assignment operator and pass the correct
object directly to the MODULE::Add() function when importing DXF in the
footprint editor.
The usual coding policy fixes.
The attached patch makes the following changes to import DXF:
1. correctly implements scaling based on DXF $INSUNITS -
at least where INSUNITS is sensible. I ignore units like miles,
gigameters, AU, lightyear, parsec ...
2. correctly implements LWPolylines, adding an ARC segment
rather than a line segment when bulge != 0. A number of users
have been complaining about getting the wrong board shape
(chamfered corners rather than rounded corners) on DXF Import,
now they shouldn't complain.
- DIALOG_DXF_IMPORT works with PCB_BASE_FRAME instead of PCB_EDIT_FRAME
- imported items are not immediately added to a BOARD
- imported items are held in a list, instead of vector
- imported items are instantly visible in GAL view
- added DIALOG_DXF_IMPORT::GetImportedItems()
- code formatting