Add support for hatched zones in eagle import
This commit is contained in:
parent
6b031d9b9e
commit
c68b83e1bb
|
@ -1199,12 +1199,15 @@ ZONE_CONTAINER* EAGLE_PLUGIN::loadPolygon( wxXmlNode* aPolyNode )
|
||||||
zone->SetDoNotAllowCopperPour( true );
|
zone->SetDoNotAllowCopperPour( true );
|
||||||
zone->SetHatchStyle( ZONE_CONTAINER::NO_HATCH );
|
zone->SetHatchStyle( ZONE_CONTAINER::NO_HATCH );
|
||||||
}
|
}
|
||||||
|
else if( p.pour == EPOLYGON::HATCH )
|
||||||
|
{
|
||||||
|
int spacing = p.spacing ? p.spacing->ToPcbUnits() : 50 * IU_PER_MILS;
|
||||||
|
|
||||||
// if spacing is set the zone should be hatched
|
zone->SetFillMode( ZFM_HATCH_PATTERN );
|
||||||
// However, use the default hatch step, p.spacing value has no meaning for KiCad
|
zone->SetHatchFillTypeThickness( p.width.ToPcbUnits() );
|
||||||
// TODO: see if this parameter is related to a grid fill option.
|
zone->SetHatchFillTypeGap( spacing - p.width.ToPcbUnits() );
|
||||||
if( p.spacing )
|
zone->SetHatchFillTypeOrientation( 0 );
|
||||||
zone->SetHatch( ZONE_CONTAINER::DIAGONAL_EDGE, zone->GetDefaultHatchPitch(), true );
|
}
|
||||||
|
|
||||||
// We divide the thickness by half because we are tracing _inside_ the zone outline
|
// We divide the thickness by half because we are tracing _inside_ the zone outline
|
||||||
// This means the radius of curvature will be twice the size for an equivalent EAGLE zone
|
// This means the radius of curvature will be twice the size for an equivalent EAGLE zone
|
||||||
|
|
Loading…
Reference in New Issue