Bitmaps are not actually copper

We report bitmaps as being 'on' a copper layer because they are
associated with it but they are not actually physical parts so should
not be included in the DRC checks

Additionally, Bitmaps effective shape starts are the top left corner
rather than the center (unclear why that was there in the first place)

Fixes https://gitlab.com/kicad/code/kicad/issues/14065
This commit is contained in:
Seth Hillbrand 2023-02-23 14:15:01 -08:00
parent 9d96edc44f
commit 1b8b216ac8
2 changed files with 3 additions and 2 deletions

View File

@ -152,7 +152,7 @@ const BOX2I PCB_BITMAP::GetBoundingBox() const
std::shared_ptr<SHAPE> PCB_BITMAP::GetEffectiveShape( PCB_LAYER_ID aLayer, FLASHING aFlash ) const
{
BOX2I box = GetBoundingBox();
return std::shared_ptr<SHAPE_RECT>( new SHAPE_RECT( box.GetCenter(), box.GetWidth(),
return std::shared_ptr<SHAPE_RECT>( new SHAPE_RECT( box.GetPosition(), box.GetWidth(),
box.GetHeight() ) );
}

View File

@ -2854,7 +2854,8 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
for( PCB_LAYER_ID layer : aOther->GetLayerSet().Seq() )
{
if( !IsCopperLayer( layer ) )
// Bitmaps are "on" a copper layer but are not actually part of it
if( !IsCopperLayer( layer ) || aOther->Type() == PCB_BITMAP_T )
continue;
constraint = m_drcEngine->EvalRules( CLEARANCE_CONSTRAINT, aVia, aOther, layer );