mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Use arc mid point for footprint library parity DRC testing.
The arc center is a pseudo coordinate which is calculated for drawing purposes. This mid point is fixed unless the arc is modified which should result in more reliable arc parity footprint library DRC testing. Also change EDA_SHAPE::Compare() to use the arc mid point. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15917
This commit is contained in:
parent
642e4d37bc
commit
11edaa6e4a
common
pcbnew/drc
qa/data/config/9.99
@ -2147,7 +2147,7 @@ int EDA_SHAPE::Compare( const EDA_SHAPE* aOther ) const
|
||||
|
||||
if( m_shape == SHAPE_T::ARC )
|
||||
{
|
||||
TEST_PT( m_arcCenter, aOther->m_arcCenter );
|
||||
TEST_PT( GetArcMid(), aOther->GetArcMid() );
|
||||
}
|
||||
else if( m_shape == SHAPE_T::BEZIER )
|
||||
{
|
||||
|
@ -161,7 +161,7 @@ bool primitiveNeedsUpdate( const std::shared_ptr<PCB_SHAPE>& a,
|
||||
|
||||
// Arc center is calculated and so may have round-off errors when parents are
|
||||
// differentially rotated.
|
||||
if( ( a->GetCenter() - b->GetCenter() ).EuclideanNorm() > pcbIUScale.mmToIU( 0.0005 ) )
|
||||
if( ( a->GetArcMid() - b->GetArcMid() ).EuclideanNorm() > pcbIUScale.mmToIU( 0.0005 ) )
|
||||
return true;
|
||||
|
||||
break;
|
||||
@ -448,7 +448,7 @@ bool shapeNeedsUpdate( const PCB_SHAPE& curr_shape, const PCB_SHAPE& ref_shape )
|
||||
|
||||
// Arc center is calculated and so may have round-off errors when parents are
|
||||
// differentially rotated.
|
||||
if( ( curr_shape.GetCenter() - ref_shape.GetCenter() ).EuclideanNorm() > pcbIUScale.mmToIU( 0.0005 ) )
|
||||
if( ( curr_shape.GetArcMid() - ref_shape.GetArcMid() ).EuclideanNorm() > pcbIUScale.mmToIU( 0.0005 ) )
|
||||
return true;
|
||||
|
||||
break;
|
||||
|
@ -90,6 +90,6 @@
|
||||
"pdf_viewer_name": "",
|
||||
"text_editor": "/usr/bin/open -e",
|
||||
"use_system_pdf_viewer": true,
|
||||
"working_dir": "/home/mike/Projects/src/kicad/qa/tests"
|
||||
"working_dir": "/home/wayne/src/kicad/qa/tests"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user