Commit 834699ac authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: fix bug #1313076 (Filled Zones on technical layers) does not show up on 3D rendering

parent 29c8ec42
......@@ -257,8 +257,8 @@ void EDA_3D_CANVAS::BuildBoard3DView()
// Build a polygon from edge cut items
wxString msg;
if( ! pcb->GetBoardPolygonOutlines( bufferPcbOutlines,
allLayerHoles, &msg ) )
if( !pcb->GetBoardPolygonOutlines( bufferPcbOutlines, allLayerHoles, &msg ) )
{
msg << wxT("\n\n") <<
_("Unable to calculate the board outlines.\n"
......@@ -432,7 +432,7 @@ void EDA_3D_CANVAS::BuildBoard3DView()
}
// Draw vias holes (vertical cylinders)
for( TRACK* track = pcb->m_Track; track != NULL; track = track->Next() )
for( const TRACK* track = pcb->m_Track; track != NULL; track = track->Next() )
{
const VIA *via = dynamic_cast<const VIA*>(track);
......@@ -441,7 +441,7 @@ void EDA_3D_CANVAS::BuildBoard3DView()
}
// Draw pads holes (vertical cylinders)
for( MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() )
for( const MODULE* module = pcb->m_Modules; module != NULL; module = module->Next() )
{
for( D_PAD* pad = module->Pads(); pad != NULL; pad = pad->Next() )
Draw3DPadHole( pad );
......@@ -508,6 +508,7 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
// to reduce time calculations
// for holes and items which do not need
// a fine representation
double correctionFactorLQ = 1.0 / cos( M_PI / (segcountLowQuality * 2) );
CPOLYGONS_LIST bufferPolys;
bufferPolys.reserve( 100000 ); // Reserve for large board
......@@ -517,8 +518,8 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
CPOLYGONS_LIST bufferPcbOutlines; // stores the board main outlines
// Build a polygon from edge cut items
wxString msg;
if( ! pcb->GetBoardPolygonOutlines( bufferPcbOutlines,
allLayerHoles, &msg ) )
if( !pcb->GetBoardPolygonOutlines( bufferPcbOutlines, allLayerHoles, &msg ) )
{
msg << wxT("\n\n") <<
_("Unable to calculate the board outlines.\n"
......@@ -610,22 +611,30 @@ void EDA_3D_CANVAS::BuildTechLayers3DView()
continue;
BuildPadShapeThickOutlineAsPolygon( pad, bufferPolys,
linewidth,
segcountforcircle, correctionFactor );
linewidth, segcountforcircle, correctionFactor );
}
}
else
module->TransformPadsShapesWithClearanceToPolygon( layer,
bufferPolys,
0,
segcountforcircle,
correctionFactor );
bufferPolys, 0, segcountforcircle, correctionFactor );
module->TransformGraphicShapesWithClearanceToPolygonSet( layer,
bufferPolys,
0,
segcountforcircle,
correctionFactor );
bufferPolys, 0, segcountforcircle, correctionFactor );
}
// Draw non copper zones
if( g_Parm_3D_Visu.GetFlag( FL_ZONE ) )
{
for( int ii = 0; ii < pcb->GetAreaCount(); ii++ )
{
ZONE_CONTAINER* zone = pcb->GetArea( ii );
if( !zone->IsOnLayer( layer ) )
continue;
zone->TransformSolidAreasShapesToPolygonSet(
bufferPolys, segcountLowQuality, correctionFactorLQ );
}
}
// bufferPolys contains polygons to merge. Many overlaps .
......
......@@ -38,6 +38,12 @@
# Where the library is to be installed.
set( PREFIX ${DOWNLOAD_DIR}/avhttp )
if( KICAD_SKIP_BOOST )
set( AVHTTP_DEPEND "" )
else()
set( AVHTTP_DEPEND "boost" )
endif()
# Install the AVHTTP header only library ${PREFIX}
ExternalProject_Add( avhttp
......@@ -46,7 +52,7 @@ ExternalProject_Add( avhttp
# grab it from a local zip file for now, cmake caller's source dir
URL ${CMAKE_CURRENT_SOURCE_DIR}/avhttp-master.zip
DEPENDS boost
DEPENDS ${AVHTTP_DEPEND}
CONFIGURE_COMMAND ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment