Make VRML use board edge bounding box for parity with step
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15472
This commit is contained in:
parent
4497aaa3fa
commit
a17cd9d054
|
@ -195,9 +195,8 @@ void PCB_EDIT_FRAME::OnExportIDF3( wxCommandEvent& event )
|
|||
if( dlg.GetAutoAdjustOffset() )
|
||||
{
|
||||
BOX2I bbox = GetBoard()->GetBoardEdgesBoundingBox();
|
||||
|
||||
aXRef = bbox.Centre().x * pcbIUScale.MM_PER_IU;
|
||||
aYRef = bbox.Centre().y * pcbIUScale.MM_PER_IU;
|
||||
aXRef = pcbIUScale.IUTomm( bbox.GetCenter().x );
|
||||
aYRef = pcbIUScale.IUTomm( bbox.GetCenter().y );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -230,10 +230,9 @@ void PCB_EDIT_FRAME::OnExportVRML( wxCommandEvent& event )
|
|||
if( dlg.GetOriginChoice() == 1 )
|
||||
{
|
||||
// Origin = board center:
|
||||
BOARD* pcb = GetBoard();
|
||||
VECTOR2I center = pcb->GetBoundingBox().GetCenter();
|
||||
aXRef = pcbIUScale.IUTomm( center.x );
|
||||
aYRef = pcbIUScale.IUTomm( center.y );
|
||||
BOX2I bbox = GetBoard()->GetBoardEdgesBoundingBox();
|
||||
aXRef = pcbIUScale.IUTomm( bbox.GetCenter().x );
|
||||
aYRef = pcbIUScale.IUTomm( bbox.GetCenter().y );
|
||||
}
|
||||
|
||||
double scale = scaleList[dlg.GetUnits()]; // final scale export
|
||||
|
|
Loading…
Reference in New Issue