mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-20 20:21:42 +00:00
Fix VRML layer Z positions after v9 layer changes.
https://gitlab.com/kicad/code/kicad/-/issues/19608
This commit is contained in:
parent
0118d7fb38
commit
775b768833
@ -726,14 +726,12 @@ void EXPORTER_PCB_VRML::ComputeLayer3D_Zpos()
|
||||
double half_thickness = m_brd_thickness / 2;
|
||||
|
||||
// Compute each layer's Z value, more or less like the 3d view
|
||||
for( PCB_LAYER_ID layer : LSET::AllCuMask().Seq() )
|
||||
{
|
||||
int i = static_cast<int>( layer );
|
||||
int orderFromTop = 0;
|
||||
|
||||
if( i < copper_layers )
|
||||
SetLayerZ( i, half_thickness - m_brd_thickness * i / (copper_layers - 1) );
|
||||
else
|
||||
SetLayerZ( i, - half_thickness ); // bottom layer
|
||||
for( PCB_LAYER_ID layer : LSET::AllCuMask( copper_layers ).CuStack() )
|
||||
{
|
||||
SetLayerZ( layer, half_thickness - m_brd_thickness * orderFromTop / ( copper_layers - 1 ) );
|
||||
orderFromTop++;
|
||||
}
|
||||
|
||||
// To avoid rounding interference, we apply an epsilon to each successive layer
|
||||
|
Loading…
Reference in New Issue
Block a user