simplified makeIMAGE()
This commit is contained in:
parent
2b215d81ba
commit
3fa938185f
|
@ -353,39 +353,23 @@ IMAGE* SPECCTRA_DB::makeIMAGE( MODULE* aModule )
|
||||||
pin->padstack_id = padstack->padstack_id;
|
pin->padstack_id = padstack->padstack_id;
|
||||||
pin->pin_id = CONV_TO_UTF8( pad->ReturnStringPadName() );
|
pin->pin_id = CONV_TO_UTF8( pad->ReturnStringPadName() );
|
||||||
|
|
||||||
#if 0
|
wxPoint pos( pad->m_Pos0 );
|
||||||
if( pad->m_Orient )
|
wxPoint offset( pad->m_Offset.x, pad->m_Offset.y );
|
||||||
{
|
|
||||||
int angle = pad->m_Orient - aModule->m_Orient; // tenths of degrees
|
|
||||||
NORMALIZE_ANGLE_POS(angle);
|
|
||||||
pin->SetRotation( angle / 10.0 );
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
{
|
|
||||||
int angle = pad->m_Orient - aModule->m_Orient; // tenths of degrees
|
int angle = pad->m_Orient - aModule->m_Orient; // tenths of degrees
|
||||||
if( angle )
|
if( angle )
|
||||||
{
|
{
|
||||||
NORMALIZE_ANGLE_POS(angle);
|
NORMALIZE_ANGLE_POS(angle);
|
||||||
pin->SetRotation( angle / 10.0 );
|
pin->SetRotation( angle / 10.0 );
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxPoint pos;
|
if( pad->m_Offset.x || pad->m_Offset.y )
|
||||||
|
|
||||||
int angle = pad->m_Orient - aModule->m_Orient; // tenths of degrees
|
|
||||||
if( angle && (pad->m_Offset.x || pad->m_Offset.y) )
|
|
||||||
{
|
{
|
||||||
wxPoint offset( pad->m_Offset.x, pad->m_Offset.y );
|
|
||||||
RotatePoint( &offset, angle );
|
RotatePoint( &offset, angle );
|
||||||
pos = pad->m_Pos0 + offset;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// copper shape's position is hole position + offset
|
|
||||||
pos = pad->m_Pos0 + pad->m_Offset;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pos += offset;
|
||||||
|
|
||||||
pin->SetVertex( mapPt( pos ) );
|
pin->SetVertex( mapPt( pos ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue