2011-09-23 13:57:12 +00:00
|
|
|
/**
|
|
|
|
* @file class_module_transform_functions.cpp
|
|
|
|
* @brief Functions of class MODULE to handle some geometric changes such as move, rotate ...
|
|
|
|
*/
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <fctsys.h>
|
|
|
|
#include <wxstruct.h>
|
|
|
|
#include <trigo.h>
|
|
|
|
#include <pcbcommon.h>
|
|
|
|
#include <pcbnew.h>
|
|
|
|
#include <macros.h>
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <protos.h>
|
|
|
|
#include <class_pad.h>
|
|
|
|
#include <class_edge_mod.h>
|
|
|
|
#include <class_module.h>
|
2009-08-01 19:26:05 +00:00
|
|
|
|
|
|
|
|
2009-11-12 15:43:38 +00:00
|
|
|
/* Calculate the layer number for changing cu / cmp layers for Cu / CMP
|
|
|
|
* (Copper, Mask, Paste, solder)
|
2009-08-01 19:26:05 +00:00
|
|
|
*/
|
2009-11-12 15:43:38 +00:00
|
|
|
int ChangeSideNumLayer( int oldlayer )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
|
|
|
int newlayer;
|
|
|
|
|
|
|
|
switch( oldlayer )
|
|
|
|
{
|
2009-12-07 03:46:13 +00:00
|
|
|
case LAYER_N_BACK:
|
|
|
|
newlayer = LAYER_N_FRONT;
|
2009-11-12 15:43:38 +00:00
|
|
|
break;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-07 03:46:13 +00:00
|
|
|
case LAYER_N_FRONT:
|
|
|
|
newlayer = LAYER_N_BACK;
|
2009-11-12 15:43:38 +00:00
|
|
|
break;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-21 17:56:25 +00:00
|
|
|
case SILKSCREEN_N_BACK:
|
|
|
|
newlayer = SILKSCREEN_N_FRONT;
|
2009-11-12 15:43:38 +00:00
|
|
|
break;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-21 17:56:25 +00:00
|
|
|
case SILKSCREEN_N_FRONT:
|
|
|
|
newlayer = SILKSCREEN_N_BACK;
|
2009-11-12 15:43:38 +00:00
|
|
|
break;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-21 17:56:25 +00:00
|
|
|
case ADHESIVE_N_BACK:
|
|
|
|
newlayer = ADHESIVE_N_FRONT;
|
2009-11-12 15:43:38 +00:00
|
|
|
break;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-21 17:56:25 +00:00
|
|
|
case ADHESIVE_N_FRONT:
|
|
|
|
newlayer = ADHESIVE_N_BACK;
|
2009-11-12 15:43:38 +00:00
|
|
|
break;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-21 17:56:25 +00:00
|
|
|
case SOLDERMASK_N_BACK:
|
|
|
|
newlayer = SOLDERMASK_N_FRONT;
|
2009-11-12 15:43:38 +00:00
|
|
|
break;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-21 17:56:25 +00:00
|
|
|
case SOLDERMASK_N_FRONT:
|
|
|
|
newlayer = SOLDERMASK_N_BACK;
|
2009-11-12 15:43:38 +00:00
|
|
|
break;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-21 17:56:25 +00:00
|
|
|
case SOLDERPASTE_N_BACK:
|
|
|
|
newlayer = SOLDERPASTE_N_FRONT;
|
2009-11-12 15:43:38 +00:00
|
|
|
break;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-21 17:56:25 +00:00
|
|
|
case SOLDERPASTE_N_FRONT:
|
|
|
|
newlayer = SOLDERPASTE_N_BACK;
|
2009-11-12 15:43:38 +00:00
|
|
|
break;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
|
|
|
default:
|
|
|
|
newlayer = oldlayer;
|
|
|
|
}
|
|
|
|
|
|
|
|
return newlayer;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-09-11 16:33:43 +00:00
|
|
|
/* Calculate the mask layer when flipping a footprint
|
|
|
|
* BACK and FRONT copper layers , mask, paste, solder layers are swapped
|
2009-08-01 19:26:05 +00:00
|
|
|
*/
|
2011-09-07 19:41:04 +00:00
|
|
|
int ChangeSideMaskLayer( int aMask )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
2011-09-07 19:41:04 +00:00
|
|
|
int newMask;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2011-09-07 19:41:04 +00:00
|
|
|
newMask = aMask & ~(LAYER_BACK | LAYER_FRONT |
|
2009-12-21 18:51:37 +00:00
|
|
|
SILKSCREEN_LAYER_BACK | SILKSCREEN_LAYER_FRONT |
|
|
|
|
ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT |
|
|
|
|
SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT |
|
|
|
|
SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT |
|
|
|
|
ADHESIVE_LAYER_BACK | ADHESIVE_LAYER_FRONT);
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2011-09-07 19:41:04 +00:00
|
|
|
if( aMask & LAYER_BACK )
|
|
|
|
newMask |= LAYER_FRONT;
|
|
|
|
|
|
|
|
if( aMask & LAYER_FRONT )
|
|
|
|
newMask |= LAYER_BACK;
|
|
|
|
|
|
|
|
if( aMask & SILKSCREEN_LAYER_BACK )
|
|
|
|
newMask |= SILKSCREEN_LAYER_FRONT;
|
|
|
|
|
|
|
|
if( aMask & SILKSCREEN_LAYER_FRONT )
|
|
|
|
newMask |= SILKSCREEN_LAYER_BACK;
|
|
|
|
|
|
|
|
if( aMask & ADHESIVE_LAYER_BACK )
|
|
|
|
newMask |= ADHESIVE_LAYER_FRONT;
|
|
|
|
|
|
|
|
if( aMask & ADHESIVE_LAYER_FRONT )
|
|
|
|
newMask |= ADHESIVE_LAYER_BACK;
|
|
|
|
|
|
|
|
if( aMask & SOLDERMASK_LAYER_BACK )
|
|
|
|
newMask |= SOLDERMASK_LAYER_FRONT;
|
|
|
|
|
|
|
|
if( aMask & SOLDERMASK_LAYER_FRONT )
|
|
|
|
newMask |= SOLDERMASK_LAYER_BACK;
|
|
|
|
|
|
|
|
if( aMask & SOLDERPASTE_LAYER_BACK )
|
|
|
|
newMask |= SOLDERPASTE_LAYER_FRONT;
|
|
|
|
|
|
|
|
if( aMask & SOLDERPASTE_LAYER_FRONT )
|
|
|
|
newMask |= SOLDERPASTE_LAYER_BACK;
|
|
|
|
|
|
|
|
if( aMask & ADHESIVE_LAYER_BACK )
|
|
|
|
newMask |= ADHESIVE_LAYER_FRONT;
|
|
|
|
|
|
|
|
if( aMask & ADHESIVE_LAYER_FRONT )
|
|
|
|
newMask |= ADHESIVE_LAYER_BACK;
|
|
|
|
|
|
|
|
return newMask;
|
2009-08-01 19:26:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
void MODULE::Move( const wxPoint& aMoveVector )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
|
|
|
wxPoint newpos = m_Pos + aMoveVector;
|
|
|
|
SetPosition( newpos );
|
|
|
|
}
|
|
|
|
|
2009-11-12 15:43:38 +00:00
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
void MODULE::Rotate( const wxPoint& aRotCentre, double aAngle )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
|
|
|
wxPoint newpos = m_Pos;
|
|
|
|
RotatePoint( &newpos, aRotCentre, aAngle );
|
|
|
|
SetPosition( newpos );
|
2011-12-12 08:37:05 +00:00
|
|
|
SetOrientation( GetOrientation() + aAngle );
|
2009-08-01 19:26:05 +00:00
|
|
|
}
|
|
|
|
|
2009-11-12 15:43:38 +00:00
|
|
|
|
2011-11-29 17:25:30 +00:00
|
|
|
void MODULE::Flip( const wxPoint& aCentre )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
2010-12-08 20:12:46 +00:00
|
|
|
TEXTE_MODULE* pt_texte;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
|
|
|
// Move module to its final position:
|
|
|
|
wxPoint finalPos = m_Pos;
|
2011-12-14 04:29:25 +00:00
|
|
|
|
2009-11-12 15:43:38 +00:00
|
|
|
finalPos.y = aCentre.y - ( finalPos.y - aCentre.y ); /// Mirror the Y position
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
SetPosition( finalPos );
|
|
|
|
|
|
|
|
// Flip layer
|
2009-08-01 19:26:05 +00:00
|
|
|
SetLayer( ChangeSideNumLayer( GetLayer() ) );
|
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
// Reverse mirror orientation.
|
2009-08-01 19:26:05 +00:00
|
|
|
NEGATE( m_Orient );
|
|
|
|
NORMALIZE_ANGLE_POS( m_Orient );
|
|
|
|
|
2012-02-19 04:02:19 +00:00
|
|
|
// Mirror pads to other side of board about the x axis, i.e. vertically.
|
2011-12-14 04:29:25 +00:00
|
|
|
for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
|
2012-02-19 04:02:19 +00:00
|
|
|
pad->Flip( m_Pos.y );
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
// Mirror reference.
|
2009-08-01 19:26:05 +00:00
|
|
|
pt_texte = m_Reference;
|
|
|
|
pt_texte->m_Pos.y -= m_Pos.y;
|
|
|
|
pt_texte->m_Pos.y = -pt_texte->m_Pos.y;
|
|
|
|
pt_texte->m_Pos.y += m_Pos.y;
|
|
|
|
NEGATE(pt_texte->m_Pos0.y);
|
|
|
|
pt_texte->m_Mirror = false;
|
|
|
|
NEGATE_AND_NORMALIZE_ANGLE_POS( pt_texte->m_Orient );
|
|
|
|
pt_texte->SetLayer( GetLayer() );
|
|
|
|
pt_texte->SetLayer( ChangeSideNumLayer( pt_texte->GetLayer() ) );
|
|
|
|
|
2009-12-07 03:46:13 +00:00
|
|
|
if( GetLayer() == LAYER_N_BACK )
|
2009-12-21 17:56:25 +00:00
|
|
|
pt_texte->SetLayer( SILKSCREEN_N_BACK );
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-07 03:46:13 +00:00
|
|
|
if( GetLayer() == LAYER_N_FRONT )
|
2009-12-21 17:56:25 +00:00
|
|
|
pt_texte->SetLayer( SILKSCREEN_N_FRONT );
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-21 17:56:25 +00:00
|
|
|
if( (GetLayer() == SILKSCREEN_N_BACK)
|
|
|
|
|| (GetLayer() == ADHESIVE_N_BACK) || (GetLayer() == LAYER_N_BACK) )
|
2009-08-01 19:26:05 +00:00
|
|
|
pt_texte->m_Mirror = true;
|
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
// Mirror value.
|
2009-08-01 19:26:05 +00:00
|
|
|
pt_texte = m_Value;
|
|
|
|
pt_texte->m_Pos.y -= m_Pos.y;
|
2009-11-12 15:43:38 +00:00
|
|
|
NEGATE( pt_texte->m_Pos.y );
|
2009-08-01 19:26:05 +00:00
|
|
|
pt_texte->m_Pos.y += m_Pos.y;
|
2009-11-12 15:43:38 +00:00
|
|
|
NEGATE( pt_texte->m_Pos0.y );
|
2009-08-01 19:26:05 +00:00
|
|
|
pt_texte->m_Mirror = false;
|
|
|
|
NEGATE_AND_NORMALIZE_ANGLE_POS( pt_texte->m_Orient );
|
|
|
|
pt_texte->SetLayer( GetLayer() );
|
|
|
|
pt_texte->SetLayer( ChangeSideNumLayer( pt_texte->GetLayer() ) );
|
|
|
|
|
2009-12-07 03:46:13 +00:00
|
|
|
if( GetLayer() == LAYER_N_BACK )
|
2009-12-21 17:56:25 +00:00
|
|
|
pt_texte->SetLayer( SILKSCREEN_N_BACK );
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-07 03:46:13 +00:00
|
|
|
if( GetLayer() == LAYER_N_FRONT )
|
2009-12-21 17:56:25 +00:00
|
|
|
pt_texte->SetLayer( SILKSCREEN_N_FRONT );
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-21 17:56:25 +00:00
|
|
|
if( (GetLayer() == SILKSCREEN_N_BACK)
|
|
|
|
|| (GetLayer() == ADHESIVE_N_BACK) || (GetLayer() == LAYER_N_BACK) )
|
2009-08-01 19:26:05 +00:00
|
|
|
pt_texte->m_Mirror = true;
|
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
// Reverse mirror module graphics and texts.
|
|
|
|
for( EDA_ITEM* item = m_Drawings; item; item = item->Next() )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
2011-12-14 04:29:25 +00:00
|
|
|
switch( item->Type() )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
2011-10-01 19:24:27 +00:00
|
|
|
case PCB_MODULE_EDGE_T:
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
2011-12-14 04:29:25 +00:00
|
|
|
EDGE_MODULE* em = (EDGE_MODULE*) item;
|
|
|
|
|
|
|
|
wxPoint s = em->GetStart();
|
|
|
|
s.y -= m_Pos.y;
|
|
|
|
s.y = -s.y;
|
|
|
|
s.y += m_Pos.y;
|
|
|
|
em->SetStart( s );
|
|
|
|
|
|
|
|
wxPoint e = em->GetEnd();
|
|
|
|
e.y -= m_Pos.y;
|
|
|
|
e.y = -e.y;
|
|
|
|
e.y += m_Pos.y;
|
|
|
|
em->SetEnd( e );
|
|
|
|
|
|
|
|
NEGATE( em->m_Start0.y );
|
|
|
|
NEGATE( em->m_End0.y );
|
|
|
|
|
|
|
|
if( em->GetShape() == S_ARC )
|
|
|
|
{
|
|
|
|
em->SetAngle( -em->GetAngle() );
|
|
|
|
}
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
em->SetLayer( ChangeSideNumLayer( em->GetLayer() ) );
|
|
|
|
}
|
2009-08-01 19:26:05 +00:00
|
|
|
break;
|
|
|
|
|
2011-10-01 19:24:27 +00:00
|
|
|
case PCB_MODULE_TEXT_T:
|
2011-12-14 04:29:25 +00:00
|
|
|
// Reverse mirror position and mirror.
|
|
|
|
pt_texte = (TEXTE_MODULE*) item;
|
2009-08-01 19:26:05 +00:00
|
|
|
pt_texte->m_Pos.y -= m_Pos.y;
|
|
|
|
pt_texte->m_Pos.y = -pt_texte->m_Pos.y;
|
|
|
|
pt_texte->m_Pos.y += m_Pos.y;
|
2009-11-12 15:43:38 +00:00
|
|
|
NEGATE( pt_texte->m_Pos0.y );
|
2009-08-01 19:26:05 +00:00
|
|
|
pt_texte->m_Mirror = false;
|
|
|
|
NEGATE_AND_NORMALIZE_ANGLE_POS( pt_texte->m_Orient );
|
|
|
|
|
|
|
|
pt_texte->SetLayer( GetLayer() );
|
|
|
|
pt_texte->SetLayer( ChangeSideNumLayer( pt_texte->GetLayer() ) );
|
|
|
|
|
2009-12-07 03:46:13 +00:00
|
|
|
if( GetLayer() == LAYER_N_BACK )
|
2009-12-21 17:56:25 +00:00
|
|
|
pt_texte->SetLayer( SILKSCREEN_N_BACK );
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-07 03:46:13 +00:00
|
|
|
if( GetLayer() == LAYER_N_FRONT )
|
2009-12-21 17:56:25 +00:00
|
|
|
pt_texte->SetLayer( SILKSCREEN_N_FRONT );
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2009-12-21 17:56:25 +00:00
|
|
|
if( GetLayer() == SILKSCREEN_N_BACK
|
|
|
|
|| GetLayer() == ADHESIVE_N_BACK
|
2009-12-07 03:46:13 +00:00
|
|
|
|| GetLayer() == LAYER_N_BACK )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
|
|
|
pt_texte->m_Mirror = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
wxMessageBox( wxT( "MODULE::Flip() error: Unknown Draw Type" ) );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-09-07 19:41:04 +00:00
|
|
|
CalculateBoundingBox();
|
2009-08-01 19:26:05 +00:00
|
|
|
}
|
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
|
2009-08-01 19:26:05 +00:00
|
|
|
void MODULE::SetPosition( const wxPoint& newpos )
|
|
|
|
{
|
2011-05-03 12:57:44 +00:00
|
|
|
wxPoint delta = newpos - m_Pos;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2011-05-03 12:57:44 +00:00
|
|
|
m_Pos += delta;
|
|
|
|
m_Reference->m_Pos += delta;
|
|
|
|
m_Value->m_Pos += delta;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
|
|
|
for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
|
|
|
|
{
|
2012-02-19 04:02:19 +00:00
|
|
|
pad->SetPosition( pad->GetPosition() + delta );
|
2009-08-01 19:26:05 +00:00
|
|
|
}
|
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
for( EDA_ITEM* item = m_Drawings; item; item = item->Next() )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
2011-12-14 04:29:25 +00:00
|
|
|
switch( item->Type() )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
2011-10-01 19:24:27 +00:00
|
|
|
case PCB_MODULE_EDGE_T:
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
2011-12-14 04:29:25 +00:00
|
|
|
EDGE_MODULE* pt_edgmod = (EDGE_MODULE*) item;
|
2009-08-01 19:26:05 +00:00
|
|
|
pt_edgmod->SetDrawCoord();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2011-10-01 19:24:27 +00:00
|
|
|
case PCB_MODULE_TEXT_T:
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
2011-12-14 04:29:25 +00:00
|
|
|
TEXTE_MODULE* pt_texte = (TEXTE_MODULE*) item;
|
2011-05-03 12:57:44 +00:00
|
|
|
pt_texte->m_Pos += delta;
|
2009-08-01 19:26:05 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
2009-11-12 15:43:38 +00:00
|
|
|
wxMessageBox( wxT( "Draw type undefined." ) );
|
|
|
|
break;
|
2009-08-01 19:26:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-09-07 19:41:04 +00:00
|
|
|
CalculateBoundingBox();
|
2009-08-01 19:26:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
void MODULE::SetOrientation( double newangle )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
2012-02-19 04:02:19 +00:00
|
|
|
double angleChange = newangle - m_Orient; // change in rotation
|
|
|
|
wxPoint pt;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2012-02-19 04:02:19 +00:00
|
|
|
NORMALIZE_ANGLE_POS( newangle );
|
2011-12-14 04:29:25 +00:00
|
|
|
|
2012-02-19 04:02:19 +00:00
|
|
|
m_Orient = newangle;
|
2009-08-01 19:26:05 +00:00
|
|
|
|
|
|
|
for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
|
|
|
|
{
|
2012-02-19 04:02:19 +00:00
|
|
|
pt = pad->GetPos0();
|
|
|
|
|
|
|
|
pad->SetOrientation( pad->GetOrientation() + angleChange );
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2012-02-19 04:02:19 +00:00
|
|
|
RotatePoint( &pt, m_Orient );
|
2009-08-01 19:26:05 +00:00
|
|
|
|
2012-02-19 04:02:19 +00:00
|
|
|
pad->SetPosition( GetPosition() + pt );
|
2009-08-01 19:26:05 +00:00
|
|
|
}
|
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
// Update of the reference and value.
|
2009-08-01 19:26:05 +00:00
|
|
|
m_Reference->SetDrawCoord();
|
|
|
|
m_Value->SetDrawCoord();
|
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
// Displace contours and text of the footprint.
|
2009-08-01 19:26:05 +00:00
|
|
|
for( BOARD_ITEM* item = m_Drawings; item; item = item->Next() )
|
|
|
|
{
|
2011-10-01 19:24:27 +00:00
|
|
|
if( item->Type() == PCB_MODULE_EDGE_T )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
|
|
|
EDGE_MODULE* pt_edgmod = (EDGE_MODULE*) item;
|
|
|
|
pt_edgmod->SetDrawCoord();
|
|
|
|
}
|
|
|
|
|
2011-12-14 04:29:25 +00:00
|
|
|
else if( item->Type() == PCB_MODULE_TEXT_T )
|
2009-08-01 19:26:05 +00:00
|
|
|
{
|
|
|
|
TEXTE_MODULE* pt_texte = (TEXTE_MODULE*) item;
|
|
|
|
pt_texte->SetDrawCoord();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-09-07 19:41:04 +00:00
|
|
|
CalculateBoundingBox();
|
2009-08-01 19:26:05 +00:00
|
|
|
}
|