CADSTAR PCB Archive Importer: Fix arc and filled shapes in footprints

- Need to call the PCB_SHAPE version of SetAngle in order to set the global coordinates for m_ThirdPoint
- Fill shapes also if in a footprint
This commit is contained in:
Roberto Fernandez Bautista 2020-12-03 00:24:45 +00:00 committed by Ian McInerney
parent 236ab16ddb
commit 260219b0e6
2 changed files with 4 additions and 3 deletions

View File

@ -142,9 +142,10 @@ void FP_SHAPE::SetAngle( double aAngle, bool aUpdateEnd )
{
// Mark as depreciated.
// m_Angle does not define the arc anymore
// m_Angle must be >= -360 and <= +360 degrees
m_angle = NormalizeAngle360Max( aAngle );
// Update the parent class (updates the global m_ThirdPoint)
PCB_SHAPE::SetAngle( aAngle, aUpdateEnd );
// Also update the local m_ThirdPoint0 if requested
if( aUpdateEnd )
{
m_ThirdPoint0 = m_End0;

View File

@ -1949,9 +1949,9 @@ void CADSTAR_PCB_ARCHIVE_LOADER::drawCadstarShape( const SHAPE& aCadstarShape,
{
shape = new PCB_SHAPE( aContainer );
shape->SetShape( S_POLYGON );
shape->SetFilled( true );
}
shape->SetFilled( true );
shape->SetPolyShape( getPolySetFromCadstarShape( aCadstarShape, -1, aContainer, aMoveVector,
aRotationAngle, aScalingFactor, aTransformCentre, aMirrorInvert ) );
shape->SetWidth( aLineThickness );