mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-19 18:51:40 +00:00
STEP exporter: fix Z position of 3D shapes.
Previously the Z pos was the position of dielectric body. Now it is the position of top of copper layers, like in the 3D viewer.
This commit is contained in:
parent
0d990932c7
commit
e6f9907246
@ -2641,6 +2641,15 @@ bool STEP_PCB_MODEL::getModelLocation( bool aBottom, VECTOR2D aPosition, double
|
||||
double top = std::max( boardZPos, boardZPos + boardThickness );
|
||||
double bottom = std::min( boardZPos, boardZPos + boardThickness );
|
||||
|
||||
// 3D step models are placed on the top of copper layers.
|
||||
// This is true for SMD shapes, and perhaps not always true for TH shapes,
|
||||
// but we use this Z position for any 3D shape.
|
||||
double f_pos, f_thickness;
|
||||
getLayerZPlacement( F_Cu, f_pos, f_thickness );
|
||||
top += f_thickness;
|
||||
getLayerZPlacement( B_Cu, f_pos, f_thickness );
|
||||
bottom += f_thickness; // f_thickness is < 0 for B_Cu layer
|
||||
|
||||
gp_Trsf lRot;
|
||||
|
||||
if( aBottom )
|
||||
|
Loading…
Reference in New Issue
Block a user