Handle DXF files with out of bounds values

First, ensure that we calculate the bbox of the imported elements.

If the total BBOX is outside our allowed value, refused to import.  This
needs to be scaled or addressed in an external editor

If the bbox fits, then make sure that we clamp it such that the largest
element is still within our bounds

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18523
This commit is contained in:
Seth Hillbrand
2024-08-14 13:06:18 -07:00
parent 41ff744f1e
commit a724b3d8b1
11 changed files with 199 additions and 33 deletions
+3 -2
View File
@@ -163,8 +163,9 @@ void COMMIT::makeEntry( EDA_ITEM* aItem, CHANGE_TYPE aType, EDA_ITEM* aCopy, BAS
ent.m_copy = aCopy;
ent.m_screen = aScreen;
wxASSERT( m_changedItems.find( aItem ) == m_changedItems.end() );
// N.B. Do not throw an assertion for multiple changed items. An item can be changed multiple times
// in a single commit such as when importing graphics and grouping them.
m_changedItems.insert( aItem );
m_changes.push_back( ent );
}