Fix arc formatting in Fabmaster import.
This commit is contained in:
parent
341b0a5652
commit
5b9519da6c
|
@ -2117,27 +2117,19 @@ bool FABMASTER::loadFootprints( BOARD* aBoard )
|
||||||
|
|
||||||
FP_SHAPE* arc = new FP_SHAPE( fp, SHAPE_T::ARC );
|
FP_SHAPE* arc = new FP_SHAPE( fp, SHAPE_T::ARC );
|
||||||
|
|
||||||
if( src->mirror )
|
arc->SetLayer( layer );
|
||||||
{
|
arc->SetArcGeometry( (wxPoint) lsrc->result.GetP0(),
|
||||||
arc->SetLayer( FlipLayer( layer ) );
|
(wxPoint) lsrc->result.GetArcMid(),
|
||||||
arc->SetCenter( wxPoint( lsrc->center_x, 2 * src->y - lsrc->center_y ) );
|
(wxPoint) lsrc->result.GetP1() );
|
||||||
arc->SetStart( wxPoint( lsrc->end_x, 2 * src->y - lsrc->end_y ) );
|
|
||||||
arc->SetArcAngleAndEnd0( lsrc->result.GetCentralAngle() * 10.0 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
arc->SetLayer( layer );
|
|
||||||
arc->SetCenter( wxPoint( lsrc->center_x, lsrc->center_y ) );
|
|
||||||
arc->SetStart( wxPoint( lsrc->end_x, lsrc->end_y ) );
|
|
||||||
arc->SetArcAngleAndEnd0( -lsrc->result.GetCentralAngle() * 10.0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
arc->SetWidth( lsrc->width );
|
arc->SetWidth( lsrc->width );
|
||||||
arc->SetLocalCoord();
|
arc->SetLocalCoord();
|
||||||
|
|
||||||
if( lsrc->width == 0 )
|
if( lsrc->width == 0 )
|
||||||
arc->SetWidth( ds.GetLineThickness( arc->GetLayer() ) );
|
arc->SetWidth( ds.GetLineThickness( arc->GetLayer() ) );
|
||||||
|
|
||||||
|
if( src->mirror )
|
||||||
|
arc->Flip( arc->GetCenter(), false );
|
||||||
|
|
||||||
fp->Add( arc, ADD_MODE::APPEND );
|
fp->Add( arc, ADD_MODE::APPEND );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2773,9 +2765,9 @@ bool FABMASTER::loadOutline( BOARD* aBoard, const std::unique_ptr<FABMASTER::TRA
|
||||||
|
|
||||||
PCB_SHAPE* arc = new PCB_SHAPE( aBoard, SHAPE_T::ARC );
|
PCB_SHAPE* arc = new PCB_SHAPE( aBoard, SHAPE_T::ARC );
|
||||||
arc->SetLayer( layer );
|
arc->SetLayer( layer );
|
||||||
arc->SetCenter( wxPoint( src->center_x, src->center_y ) );
|
arc->SetArcGeometry( (wxPoint) src->result.GetP0(),
|
||||||
arc->SetStart( wxPoint( src->start_x, src->start_y ) );
|
(wxPoint) src->result.GetArcMid(),
|
||||||
arc->SetArcAngleAndEnd( src->result.GetCentralAngle() * 10.0 );
|
(wxPoint) src->result.GetP1() );
|
||||||
arc->SetWidth( src->width );
|
arc->SetWidth( src->width );
|
||||||
|
|
||||||
if( arc->GetWidth() == 0 )
|
if( arc->GetWidth() == 0 )
|
||||||
|
@ -2888,9 +2880,9 @@ bool FABMASTER::loadGraphics( BOARD* aBoard )
|
||||||
|
|
||||||
PCB_SHAPE* arc = new PCB_SHAPE( aBoard, SHAPE_T::ARC );
|
PCB_SHAPE* arc = new PCB_SHAPE( aBoard, SHAPE_T::ARC );
|
||||||
arc->SetLayer( layer );
|
arc->SetLayer( layer );
|
||||||
arc->SetCenter( wxPoint( src->center_x, src->center_y ) );
|
arc->SetArcGeometry( (wxPoint) src->result.GetP0(),
|
||||||
arc->SetStart( wxPoint( src->start_x, src->start_y ) );
|
(wxPoint) src->result.GetArcMid(),
|
||||||
arc->SetArcAngleAndEnd( src->result.GetCentralAngle() * 10.0 );
|
(wxPoint) src->result.GetP1() );
|
||||||
arc->SetWidth( src->width );
|
arc->SetWidth( src->width );
|
||||||
|
|
||||||
aBoard->Add( arc, ADD_MODE::APPEND );
|
aBoard->Add( arc, ADD_MODE::APPEND );
|
||||||
|
|
Loading…
Reference in New Issue