=== modified file '3d-viewer/3d_draw.cpp' --- 3d-viewer/3d_draw.cpp 2013-10-04 08:42:09 +0000 +++ 3d-viewer/3d_draw.cpp 2013-10-05 19:12:36 +0000 @@ -460,9 +460,14 @@ { int copper_thickness = g_Parm_3D_Visu.GetLayerObjectThicknessBIU( LAYER_N_BACK ); int zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_BACK ); - int thickness = g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_FRONT ) - - g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_BACK ); - zpos += (thickness/2) + (copper_thickness/2); + + // reduce substrate thickness by 1% to avoid graphics error + int thickness = (g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_FRONT ) + - g_Parm_3D_Visu.GetLayerZcoordBIU( LAYER_N_BACK )) * 0.99; + + // place the substrate right in the middle between FRONT and BACK layer + zpos += (thickness/2) + (thickness/0.99*.01/2); + thickness -= copper_thickness; EDA_COLOR_T color = g_ColorsSettings.GetLayerColor( EDGE_N ); SetGLColor( color, 0.8 );