Step export: fix incorrect Z position of holes, after code change.

Fixes #15467
https://gitlab.com/kicad/code/kicad/-/issues/15467
This commit is contained in:
jean-pierre charras 2023-08-21 14:48:48 +02:00
parent 4aa1a881f3
commit 45963a3443
1 changed files with 3 additions and 3 deletions

View File

@ -207,7 +207,7 @@ bool STEP_PCB_MODEL::AddPadHole( const PAD* aPad, const VECTOR2D& aOrigin )
VECTOR2I pos = aPad->GetPosition();
const double margin = 0.01; // a small margin on the Z axix to be sure the hole
// is bigget than the board with copper
// is bigger than the board with copper
// must be > OCC_MAX_DISTANCE_TO_MERGE_POINTS
double holeZsize = m_boardThickness + ( margin * 2 );
@ -219,7 +219,7 @@ bool STEP_PCB_MODEL::AddPadHole( const PAD* aPad, const VECTOR2D& aOrigin )
gp_Trsf shift;
shift.SetTranslation( gp_Vec( pcbIUScale.IUTomm( pos.x - aOrigin.x ),
-pcbIUScale.IUTomm( pos.y - aOrigin.y ),
-m_boardThickness * 0.5 ) );
-margin ) );
BRepBuilderAPI_Transform hole( s, shift );
m_cutouts.push_back( hole.Shape() );
return true;