3D-Viewer: OpenGL, cut outline on plated pads

This commit is contained in:
Mario Luzeiro 2020-11-03 10:43:52 +00:00 committed by Wayne Stambaugh
parent 5e371b5f29
commit 4b6c602537
1 changed files with 21 additions and 4 deletions

View File

@ -650,10 +650,27 @@ void C3D_RENDER_OGL_LEGACY::reload( REPORTER* aStatusReporter, REPORTER* aWarnin
if( m_boardAdapter.GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED ) )
{
if( m_boardAdapter.GetPolyPlatedPads_Front() )
{
SHAPE_POLY_SET polySubtracted = *m_boardAdapter.GetPolyPlatedPads_Front();
polySubtracted.BooleanIntersection( m_boardAdapter.GetBoardPoly(), SHAPE_POLY_SET::PM_FAST );
polySubtracted.BooleanSubtract( m_boardAdapter.GetThroughHole_Outer_poly(), SHAPE_POLY_SET::PM_FAST );
polySubtracted.BooleanSubtract( m_boardAdapter.GetThroughHole_Outer_poly_NPTH(), SHAPE_POLY_SET::PM_FAST );
m_ogl_disp_lists_platedPads_F_Cu = generateLayerListFromContainer( m_boardAdapter.GetPlatedPads_Front(),
m_boardAdapter.GetPolyPlatedPads_Front(), F_Cu );
&polySubtracted, F_Cu );
}
if( m_boardAdapter.GetPolyPlatedPads_Back() )
{
SHAPE_POLY_SET polySubtracted = *m_boardAdapter.GetPolyPlatedPads_Back();
polySubtracted.BooleanIntersection( m_boardAdapter.GetBoardPoly(), SHAPE_POLY_SET::PM_FAST );
polySubtracted.BooleanSubtract( m_boardAdapter.GetThroughHole_Outer_poly(), SHAPE_POLY_SET::PM_FAST );
polySubtracted.BooleanSubtract( m_boardAdapter.GetThroughHole_Outer_poly_NPTH(), SHAPE_POLY_SET::PM_FAST );
m_ogl_disp_lists_platedPads_B_Cu = generateLayerListFromContainer( m_boardAdapter.GetPlatedPads_Back(),
m_boardAdapter.GetPolyPlatedPads_Back(), B_Cu );
&polySubtracted, B_Cu );
}
}
// Load 3D models