PANEL_PREVIEW_3D_MODEL: Always shows the footprint not flipped, and rot 0.

Otherwise, setting the 3D shapes rotation/position is not so easy.
This commit is contained in:
jean-pierre charras 2023-07-20 17:33:03 +02:00
parent b827073b3f
commit 619ec2a559
1 changed files with 9 additions and 0 deletions

View File

@ -108,6 +108,15 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
m_dummyFootprint = new FOOTPRINT( *aFootprint ); m_dummyFootprint = new FOOTPRINT( *aFootprint );
m_dummyFootprint->SetParentGroup( nullptr ); m_dummyFootprint->SetParentGroup( nullptr );
// Ensure the footprint is shown like in Fp editor: rot 0, not flipped
// to avoid mistakes when setting the3D shape position/rotation
if( m_dummyFootprint->IsFlipped() )
m_dummyFootprint->Flip( m_dummyFootprint->GetPosition(), false );
m_dummyFootprint->SetOrientation( ANGLE_0 );
m_dummyBoard->Add( m_dummyFootprint ); m_dummyBoard->Add( m_dummyFootprint );
// Create the 3D canvas // Create the 3D canvas