mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
GenCAD export: fix arcs winding and layers.
This commit is contained in:
parent
71a6231bb8
commit
26674ceec3
@ -976,13 +976,20 @@ void GENCAD_EXPORTER::createRoutesSection()
|
||||
}
|
||||
else if( track->Type() == PCB_ARC_T )
|
||||
{
|
||||
if( old_layer != track->GetLayer() )
|
||||
{
|
||||
old_layer = track->GetLayer();
|
||||
fprintf( m_file, "LAYER %s\n",
|
||||
genCADLayerName( cu_count, track->GetLayer() ).c_str() );
|
||||
}
|
||||
|
||||
VECTOR2I start = track->GetStart();
|
||||
VECTOR2I end = track->GetEnd();
|
||||
|
||||
const PCB_ARC* arc = static_cast<const PCB_ARC*>( track );
|
||||
|
||||
// GenCAD arcs are always drawn counter-clockwise.
|
||||
if( !arc->IsCCW() )
|
||||
// GenCAD arcs are always drawn counter-clockwise (IsCCW works backwards because Y-axis is up in GenCAD).
|
||||
if( arc->IsCCW() )
|
||||
std::swap( start, end );
|
||||
|
||||
VECTOR2I center = arc->GetCenter();
|
||||
|
Loading…
x
Reference in New Issue
Block a user