3d-viewer: Remove dead code

The 2d-bbox of the 3d viewer was calculated and set but never used

(cherry picked from commit 59ed9f086f)
This commit is contained in:
Seth Hillbrand 2019-08-15 22:56:32 -07:00
parent dc0aed5b16
commit 211d056728
5 changed files with 0 additions and 43 deletions

View File

@ -66,7 +66,6 @@ CINFO3D_VISU::CINFO3D_VISU() :
m_boardCenter = SFVEC3F( 0.0f );
m_boardBoudingBox.Reset();
m_board2dBBox3DU.Reset();
m_layers_container2D.clear();
m_layers_holes2D.clear();
@ -462,8 +461,6 @@ void CINFO3D_VISU::createBoardPolygon()
errmsg.append( _( "Cannot determine the board outline." ) );
wxLogMessage( errmsg );
}
Polygon_Calc_BBox_3DU( m_board_poly, m_board2dBBox3DU, m_biuTo3Dunits );
}

View File

@ -550,9 +550,6 @@ class CINFO3D_VISU
/// 3d bouding box of the pcb board in 3d units
CBBOX m_boardBoudingBox;
/// 2d bouding box of the pcb board in 3d units
CBBOX2D m_board2dBBox3DU;
/// It contains polygon contours for each layer
MAP_POLY m_layers_poly;

View File

@ -62,13 +62,11 @@
static int s_textWidth;
static CGENERICCONTAINER2D *s_dstcontainer = NULL;
static float s_biuTo3Dunits;
static const CBBOX2D *s_boardBBox3DU = NULL;
static const BOARD_ITEM *s_boardItem = NULL;
// This is a call back function, used by DrawGraphicText to draw the 3D text shape:
void addTextSegmToContainer( int x0, int y0, int xf, int yf, void* aData )
{
wxASSERT( s_boardBBox3DU != NULL );
wxASSERT( s_dstcontainer != NULL );
const SFVEC2F start3DU( x0 * s_biuTo3Dunits, -y0 * s_biuTo3Dunits );
@ -103,7 +101,6 @@ void CINFO3D_VISU::AddShapeWithClearanceToContainer( const TEXTE_PCB* aTextPCB,
s_dstcontainer = aDstContainer;
s_textWidth = aTextPCB->GetThickness() + ( 2 * aClearanceValue );
s_biuTo3Dunits = m_biuTo3Dunits;
s_boardBBox3DU = &m_board2dBBox3DU;
// not actually used, but needed by DrawGraphicText
const COLOR4D dummy_color = COLOR4D::BLACK;
@ -228,7 +225,6 @@ void CINFO3D_VISU::AddGraphicsShapesWithClearanceToContainer( const MODULE* aMod
s_boardItem = (const BOARD_ITEM *)&aModule->Value();
s_dstcontainer = aDstContainer;
s_biuTo3Dunits = m_biuTo3Dunits;
s_boardBBox3DU = &m_board2dBBox3DU;
for( unsigned ii = 0; ii < texts.size(); ++ii )
{

View File

@ -711,35 +711,6 @@ void Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
}
void Polygon_Calc_BBox_3DU( const SHAPE_POLY_SET &aPolysList,
CBBOX2D &aOutBBox ,
float aBiuTo3DunitsScale )
{
aOutBBox.Reset();
for( int idx = 0; idx < aPolysList.OutlineCount(); ++idx )
{
// Each polygon in aPolysList is a polygon with holes
const SHAPE_POLY_SET::POLYGON& curr_polywithholes = aPolysList.CPolygon( idx );
for( unsigned ipoly = 0; ipoly < curr_polywithholes.size(); ++ipoly )
{
const SHAPE_LINE_CHAIN& path = curr_polywithholes[ipoly]; // a simple polygon
for( int jj = 0; jj < path.PointCount(); jj++ )
{
const VECTOR2I& a = path.CPoint( jj );
aOutBBox.Union( SFVEC2F( (float) a.x * aBiuTo3DunitsScale,
(float)-a.y * aBiuTo3DunitsScale ) );
}
}
}
aOutBBox.ScaleNextUp();
}
#ifdef DEBUG
static void polygon_Convert( const ClipperLib::Path &aPath,
SEGMENTS &aOutSegment,

View File

@ -150,10 +150,6 @@ void Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
float aDivFactor,
const BOARD_ITEM &aBoardItem );
void Polygon_Calc_BBox_3DU( const SHAPE_POLY_SET &aPolysList,
CBBOX2D &aOutBBox,
float aBiuTo3DunitsScale );
void Polygon2d_TestModule();
#endif // _CPOLYGON2D_H_