CADSTAR PCB: Reverse anticlockwise arcs before adding to the chain
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9533
This commit is contained in:
parent
8314251fa1
commit
6aa7602c32
|
@ -2948,8 +2948,10 @@ SHAPE_POLY_SET CADSTAR_PCB_ARCHIVE_LOADER::getPolySetFromCadstarShape( const SHA
|
||||||
polySet.ClearArcs();
|
polySet.ClearArcs();
|
||||||
|
|
||||||
if( aLineThickness > 0 )
|
if( aLineThickness > 0 )
|
||||||
|
{
|
||||||
polySet.Inflate( aLineThickness / 2, 32,
|
polySet.Inflate( aLineThickness / 2, 32,
|
||||||
SHAPE_POLY_SET::CORNER_STRATEGY::ROUND_ALL_CORNERS );
|
SHAPE_POLY_SET::CORNER_STRATEGY::ROUND_ALL_CORNERS );
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
for( int i = 0; i < polySet.OutlineCount(); ++i )
|
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;
|
FP_SHAPE* fp_shape = (FP_SHAPE*) shape;
|
||||||
SHAPE_ARC arc( fp_shape->GetCenter0(), fp_shape->GetStart0(), fp_shape->GetArcAngle() / 10.0 );
|
SHAPE_ARC arc( fp_shape->GetCenter0(), fp_shape->GetStart0(), fp_shape->GetArcAngle() / 10.0 );
|
||||||
|
|
||||||
|
if( shape->EndsSwapped() )
|
||||||
|
arc.Reverse();
|
||||||
|
|
||||||
lineChain.Append( arc );
|
lineChain.Append( arc );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SHAPE_ARC arc( shape->GetCenter(), shape->GetStart(), shape->GetArcAngle() / 10.0 );
|
SHAPE_ARC arc( shape->GetCenter(), shape->GetStart(), shape->GetArcAngle() / 10.0 );
|
||||||
|
|
||||||
|
if( shape->EndsSwapped() )
|
||||||
|
arc.Reverse();
|
||||||
|
|
||||||
lineChain.Append( arc );
|
lineChain.Append( arc );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue