CADSTAR PCB: Reverse anticlockwise arcs before adding to the chain

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9533
This commit is contained in:
Roberto Fernandez Bautista 2021-11-05 17:12:13 +00:00
parent 8314251fa1
commit 6aa7602c32
1 changed files with 10 additions and 0 deletions

View File

@ -2948,8 +2948,10 @@ SHAPE_POLY_SET CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape( const SHA
polySet.ClearArcs();
if( aLineThickness > 0 )
{
polySet.Inflate( aLineThickness / 2, 32,
SHAPE_POLY_SET::CORNER_STRATEGY::ROUND_ALL_CORNERS );
}
#ifdef DEBUG
for( int i = 0; i < polySet.OutlineCount(); ++i )
@ -2981,11 +2983,19 @@ SHAPE_LINE_CHAIN CADSTAR_PCB_ARCHIVE_LOADER::getLineChainFromShapes( const std::
{
FP_SHAPE* fp_shape = (FP_SHAPE*) shape;
SHAPE_ARC arc( fp_shape->GetCenter0(), fp_shape->GetStart0(), fp_shape->GetArcAngle() / 10.0 );
if( shape->EndsSwapped() )
arc.Reverse();
lineChain.Append( arc );
}
else
{
SHAPE_ARC arc( shape->GetCenter(), shape->GetStart(), shape->GetArcAngle() / 10.0 );
if( shape->EndsSwapped() )
arc.Reverse();
lineChain.Append( arc );
}
}