Browse Source

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
newinvert
Seth Hillbrand 3 years ago
parent
commit
1b8b216ac8
  1. 2
      pcbnew/pcb_bitmap.cpp
  2. 3
      pcbnew/tools/drawing_tool.cpp

2
pcbnew/pcb_bitmap.cpp

@ -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() ) );
}

3
pcbnew/tools/drawing_tool.cpp

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

Loading…
Cancel
Save