3d-viewer: Remove dead code
The 2d-bbox of the 3d viewer was calculated and set but never used
This commit is contained in:
parent
46feb76aba
commit
59ed9f086f
|
@ -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 );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -544,9 +544,6 @@ private:
|
|||
/// 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;
|
||||
|
||||
|
|
|
@ -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 GRText 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* aText,
|
|||
s_dstcontainer = aDstContainer;
|
||||
s_textWidth = aText->GetThickness() + ( 2 * aClearanceValue );
|
||||
s_biuTo3Dunits = m_biuTo3Dunits;
|
||||
s_boardBBox3DU = &m_board2dBBox3DU;
|
||||
|
||||
// not actually used, but needed by GRText
|
||||
const COLOR4D dummy_color = COLOR4D::BLACK;
|
||||
|
@ -221,7 +218,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( TEXTE_MODULE* text : texts )
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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_
|
||||
|
|
Loading…
Reference in New Issue