Dxf export: fix an issue in exported arcs. Update libdfx.
Pcbnew:, libedit, Save lib as...: the new .pretty lib format is the default, instead of legacy .mod format. The legacy format is still selectable in the file selection dialog.
This commit is contained in:
@@ -386,7 +386,7 @@ void DXF_PLOTTER::ThickSegment( const wxPoint& aStart, const wxPoint& aEnd, int
|
||||
}
|
||||
}
|
||||
|
||||
/** Plot an arc in DXF format
|
||||
/* Plot an arc in DXF format
|
||||
* Filling is not supported
|
||||
*/
|
||||
void DXF_PLOTTER::Arc( const wxPoint& centre, double StAngle, double EndAngle, int radius,
|
||||
@@ -397,6 +397,14 @@ void DXF_PLOTTER::Arc( const wxPoint& centre, double StAngle, double EndAngle, i
|
||||
if( radius <= 0 )
|
||||
return;
|
||||
|
||||
// In DXF, arcs are drawn CCW.
|
||||
// In Kicad, arcs are CW or CCW
|
||||
// If StAngle > EndAngle, it is CW. So transform it to CCW
|
||||
if( StAngle > EndAngle )
|
||||
{
|
||||
EXCHG( StAngle, EndAngle );
|
||||
}
|
||||
|
||||
DPOINT centre_dev = userToDeviceCoordinates( centre );
|
||||
double radius_dev = userToDeviceSize( radius );
|
||||
|
||||
@@ -425,6 +433,7 @@ void DXF_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double
|
||||
EXCHG( size.x, size.y );
|
||||
orient = AddAngles( orient, 900 );
|
||||
}
|
||||
|
||||
sketchOval( pos, size, orient, -1 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user