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

(cherry picked from commit 11edaa6e4a256d69bc2f65240b9a7bc54daa481e)
This commit is contained in:
Wayne Stambaugh 2025-04-04 15:30:44 -04:00
parent 9d1344d707
commit 5544a315bd
3 changed files with 3 additions and 95 deletions

View File

@ -2005,7 +2005,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 )
{

View File

@ -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;

View File

@ -1,92 +0,0 @@
{
"api": {
"enable_server": false,
"interpreter_path": "/Users/jon/src/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/bin/python3"
},
"appearance": {
"grid_striping": false,
"hicontrast_dimming_factor": 0.800000011920929,
"show_scrollbars": false,
"text_editor_zoom": 0,
"toolbar_icon_size": 24,
"use_icons_in_menus": false
},
"auto_backup": {
"backup_on_autosave": false,
"enabled": true,
"limit_daily_files": 5,
"limit_total_files": 25,
"limit_total_size": 104857600,
"min_interval": 300
},
"do_not_show_again": {
"data_collection_prompt": false,
"env_var_overwrite_warning": false,
"scaled_3d_models_warning": false,
"update_check_prompt": false,
"zone_fill_warning": false
},
"environment": {
"vars": null
},
"git": {
"authorEmail": "",
"authorName": "",
"repositories": null,
"useDefaultAuthor": true
},
"graphics": {
"cairo_antialiasing_mode": 0,
"opengl_antialiasing_mode": 1
},
"input": {
"auto_pan": false,
"auto_pan_acceleration": 5,
"center_on_zoom": true,
"focus_follow_sch_pcb": false,
"horizontal_pan": false,
"hotkey_feedback": true,
"immediate_actions": true,
"mouse_left": -1,
"mouse_middle": 2,
"mouse_right": 2,
"reverse_scroll_pan_h": false,
"reverse_scroll_zoom": false,
"scroll_modifier_pan_h": 308,
"scroll_modifier_pan_v": 306,
"scroll_modifier_zoom": 0,
"warp_mouse_on_move": true,
"zoom_acceleration": false,
"zoom_speed": 5,
"zoom_speed_auto": true
},
"meta": {
"filename": "kicad_common.json",
"version": 3
},
"netclass_panel": {
"eeschema_shown_columns": "0 10 11 12 13",
"pcbnew_shown_columns": "0 1 2 3 4 5 6 7 8 9",
"sash_pos": 160
},
"package_manager": {
"sash_pos": 380
},
"session": {
"pinned_design_block_libs": [],
"pinned_fp_libs": [],
"pinned_symbol_libs": [],
"remember_open_files": false
},
"system": {
"autosave_interval": 600,
"clear_3d_cache_interval": 30,
"file_explorer": "",
"file_history_size": 9,
"language": "Default",
"pdf_viewer_name": "",
"text_editor": "/usr/bin/open -e",
"use_system_pdf_viewer": true,
"working_dir": "/Users/jon/src/kicad/qa/tests/cli"
}
}