31using namespace std::placeholders;
122 m_isFootprintEditor( false ),
124 m_enteredGroup( nullptr ),
125 m_priv(
std::make_unique<
PRIV>() )
160 std::shared_ptr<SELECT_MENU> selectMenu = std::make_shared<SELECT_MENU>();
161 selectMenu->SetTool(
this );
166 auto activeToolCondition =
180 auto groupEnterCondition =
183 auto inGroupCondition =
192 menu.AddSeparator( 1000 );
201 menu.AddSeparator( 1 );
215 m_frame = getEditFrame<PCB_BASE_FRAME>();
244 wxMouseState keyboardState = wxGetMouseState();
247 keyboardState.AltDown() );
273 catch(
const std::runtime_error& e )
275 wxFAIL_MSG( e.what() );
280 evt->Modifier(
MD_ALT ) );
291 else if( evt->IsMouseDown(
BUT_LEFT ) )
329 bool selectionCancelled =
false;
333 selectPoint( evt->Position(),
false, &selectionCancelled );
340 if( !selectionCancelled )
343 else if( evt->IsDblClick(
BUT_LEFT ) )
382 if(
hasModifier() || dragAction == MOUSE_DRAG_ACTION::SELECT )
393 auto zoneFilledAreaFilter =
397 int accuracy =
KiROUND( 5 * aCollector.GetGuide()->OnePixelInIU() );
398 std::set<EDA_ITEM*> remove;
404 ZONE* zone =
static_cast<ZONE*
>( item );
409 remove.insert( zone );
415 aCollector.Remove( item );
421 if( evt->HasPosition() )
424 &&
selectPoint( evt->DragOrigin(),
false,
nullptr, zoneFilledAreaFilter ) )
441 if( haveTrack && trackDragAction == TRACK_DRAG_ACTION::DRAG )
443 else if( haveTrack && trackDragAction == TRACK_DRAG_ACTION::DRAG_FREE_ANGLE )
455 else if( evt->IsCancel() )
464 else if( evt->FirstResponder() ==
this && evt->GetCommandId() == (
int) WXK_ESCAPE )
479 catch(
const std::runtime_error& e )
481 wxCHECK_MSG(
false, 0, e.what() );
496 && dragAction == MOUSE_DRAG_ACTION::DRAG_SELECTED
498 && evt->HasPosition()
521 wxT(
"EnterGroup called when selection is not a single group" ) );
572 bool aConfirmLockedItems )
585 enum DISPOSITION { BEFORE = 1, AFTER, BOTH };
587 std::map<EDA_ITEM*, DISPOSITION> itemDispositions;
596 itemDispositions[ item ] = BEFORE;
599 aClientFilter(
VECTOR2I(), collector,
this );
603 if( itemDispositions.count( item ) )
604 itemDispositions[ item ] = BOTH;
606 itemDispositions[ item ] = AFTER;
614 for( std::pair<EDA_ITEM* const, DISPOSITION> itemDisposition : itemDispositions )
616 EDA_ITEM* item = itemDisposition.first;
617 DISPOSITION disposition = itemDisposition.second;
619 if( disposition == BEFORE )
623 for( std::pair<EDA_ITEM* const, DISPOSITION> itemDisposition : itemDispositions )
625 EDA_ITEM* item = itemDisposition.first;
626 DISPOSITION disposition = itemDisposition.second;
630 if( disposition == AFTER || disposition == BOTH )
637 if( aConfirmLockedItems )
639 std::vector<BOARD_ITEM*> lockedItems;
644 bool lockedDescendant =
false;
650 lockedDescendant =
true;
653 if( boardItem->
IsLocked() || lockedDescendant )
654 lockedItems.push_back( boardItem );
657 if( !lockedItems.empty() )
720 bool* aSelectionCancelledFlag,
737 for(
int i = collector.
GetCount() - 1; i >= 0; --i )
739 if( !
Selectable( collector[ i ] ) || ( aOnDrag && collector[i]->IsLocked() ) )
748 aClientFilter( aWhere, collector,
this );
760 for(
int i = collector.
GetCount() - 1; i >= 0; --i )
762 if( !collector[i]->IsSelected() )
774 catch(
const std::exception& exc )
776 wxLogWarning( wxS(
"Exception \"%s\" occurred attemption to guess selection "
777 "candidates." ), exc.what() );
790 if( aSelectionCancelledFlag )
791 *aSelectionCancelledFlag =
true;
798 bool anySubtracted =
false;
805 anySubtracted =
true;
811 for(
int i = 0; i < collector.
GetCount(); ++i )
816 anySubtracted =
true;
826 if( addedCount == 1 )
831 else if( addedCount > 1 )
836 else if( anySubtracted )
873 bool cancelled =
false;
880 bool anyAdded =
false;
881 bool anySubtracted =
false;
891 bool greedySelection = width >= 0 ? false :
true;
894 greedySelection = !greedySelection;
897 : KICURSOR::SELECT_LASSO );
899 if( evt->IsCancelInteractive() || evt->IsActivate() )
911 anySubtracted =
true;
918 area.
SetEnd( evt->Position() );
935 std::vector<KIGFX::VIEW::LAYER_ITEM_PAIR> candidates;
948 std::set<BOARD_ITEM*> group_items;
956 std::unordered_set<BOARD_ITEM*>& newset =
group->GetItems();
960 if( !greedySelection && selectionRect.
Contains(
group->GetBoundingBox() )
966 collector.
Append( *newset.begin() );
971 group_items.emplace( group_item );
979 if( item &&
Selectable( item ) && item->
HitTest( selectionRect, !greedySelection )
980 && ( greedySelection || !group_items.count( item ) ) )
983 padsCollector.
Append( item );
997 collector = padsCollector;
1009 anySubtracted =
true;
1023 else if( anySubtracted )
1034 evt->SetPassEvent();
1057 wxMouseState keyboardState = wxGetMouseState();
1060 keyboardState.AltDown() );
1094 std::vector<KIGFX::VIEW::LAYER_ITEM_PAIR> selectedItems;
1103 view->
Query( selectionBox, selectedItems );
1112 collection.
Append( item );
1132 std::vector<KIGFX::VIEW::LAYER_ITEM_PAIR> selectedItems;
1138 view->
Query( selectionBox, selectedItems );
1163 std::set<int> representedNets;
1165 for(
int i = aCollector.
GetCount() - 1; i >= 0; i-- )
1171 else if ( representedNets.count( item->
GetNetCode() ) )
1174 representedNets.insert( item->
GetNetCode() );
1184 std::vector<BOARD_CONNECTED_ITEM*> toUnroute;
1186 for(
EDA_ITEM* item : selectedItems )
1191 toUnroute.push_back(
pad );
1207 for(
EDA_ITEM* item : selectedItems )
1222 unsigned initialCount = 0;
1234 if( initialCount == 0 )
1237 std::vector<PCB_SHAPE*> startShapes;
1242 startShapes.push_back(
static_cast<PCB_SHAPE*
>( item ) );
1246 if( !startShapes.empty() )
1252 m_frame->SetStatusText(
_(
"Select/Expand Connection..." ) );
1258 for(
EDA_ITEM* item : selectedItems )
1259 item->ClearTempFlags();
1261 std::vector<BOARD_CONNECTED_ITEM*> startItems;
1263 for(
EDA_ITEM* item : selectedItems )
1270 startItems.push_back(
pad );
1284 m_frame->SetStatusText( wxEmptyString );
1294 const std::vector<BOARD_CONNECTED_ITEM*>& aStartItems,
STOP_CONDITION aStopCondition )
1299 double refreshIntervalMs = 500;
1304 std::map<VECTOR2I, std::vector<PCB_TRACK*>> trackMap;
1305 std::map<VECTOR2I, PCB_VIA*> viaMap;
1306 std::map<VECTOR2I, PAD*> padMap;
1307 std::map<VECTOR2I, std::vector<PCB_SHAPE*>> shapeMap;
1308 std::set<PAD*> startPadSet;
1309 std::vector<BOARD_CONNECTED_ITEM*> cleanupItems;
1310 std::vector<std::pair<VECTOR2I, LSET>> activePts;
1316 startPadSet.insert(
static_cast<PAD*
>( startItem ) );
1324 auto connectedItems = connectivity->GetConnectedItems( startItem,
1330 switch( item->Type() )
1336 trackMap[track->
GetStart()].push_back( track );
1337 trackMap[track->
GetEnd()].push_back( track );
1344 viaMap[
via->GetStart()] =
via;
1351 padMap[
pad->GetPosition()] =
pad;
1360 shapeMap[point].push_back( shape );
1371 switch( startItem->Type() )
1384 activePts.push_back( { startItem->GetPosition(), startItem->GetLayerSet() } );
1388 activePts.push_back( { startItem->GetPosition(), startItem->GetLayerSet() } );
1396 activePts.push_back( { point, startItem->GetLayerSet() } );
1409 while( expand && failSafe++ < 100000 )
1413 for(
int i = (
int) activePts.size() - 1; i >= 0; --i )
1416 LSET layerSetCu = activePts[i].second & allCuMask;
1418 auto viaIt = viaMap.find( pt );
1419 auto padIt = padMap.find( pt );
1421 bool gotVia = ( viaIt != viaMap.end() )
1422 && ( layerSetCu & ( viaIt->second->GetLayerSet() ) ).any();
1424 bool gotPad = ( padIt != padMap.end() )
1425 && ( layerSetCu & ( padIt->second->GetLayerSet() ) ).any();
1427 bool gotNonStartPad =
1428 gotPad && ( startPadSet.find( padIt->second ) == startPadSet.end() );
1432 size_t pt_count = 0;
1436 if( track->GetStart() != track->GetEnd()
1437 && layerSetCu.
Contains( track->GetLayer() ) )
1443 if( pt_count > 2 || gotVia || gotNonStartPad )
1445 activePts.erase( activePts.begin() + i );
1451 if( gotNonStartPad )
1453 activePts.erase( activePts.begin() + i );
1460 PAD*
pad = padIt->second;
1465 cleanupItems.push_back(
pad );
1467 activePts.push_back( {
pad->GetPosition(),
pad->GetLayerSet() } );
1474 if( !layerSetCu.
Contains( track->GetLayer() ) )
1477 if( !track->IsSelected() )
1483 cleanupItems.push_back( track );
1485 if( track->GetStart() == pt )
1486 activePts.push_back( { track->GetEnd(), track->GetLayerSet() } );
1488 activePts.push_back( { track->GetStart(), track->GetLayerSet() } );
1496 if( !layerSetCu.Contains( shape->GetLayer() ) )
1499 if( !shape->IsSelected() )
1505 cleanupItems.push_back( shape );
1507 for(
const VECTOR2I& newPoint : shape->GetConnectionPoints() )
1509 if( newPoint == pt )
1512 activePts.push_back( { newPoint, shape->GetLayerSet() } );
1519 if( viaMap.count( pt ) )
1523 if( !
via->IsSelected() )
1529 cleanupItems.push_back(
via );
1531 activePts.push_back( {
via->GetPosition(),
via->GetLayerSet() } );
1536 activePts.erase( activePts.begin() + i );
1540 if( refreshTimer.
msecs() >= refreshIntervalMs )
1548 refreshTimer.
Start();
1566 case SHAPE_T::SEGMENT:
1568 case SHAPE_T::BEZIER:
1585 std::stack<PCB_SHAPE*> toSearch;
1586 std::set<PCB_SHAPE*> toCleanup;
1588 for(
PCB_SHAPE* startItem : aStartItems )
1589 toSearch.push( startItem );
1602 toSearch.push(
static_cast<PCB_SHAPE*
>( item ) );
1606 while( !toSearch.empty() )
1616 toCleanup.insert( shape );
1619 searchPoint( shape->
GetEnd() );
1630 std::vector<PAD*> pads;
1637 pads.push_back(
pad );
1641 pads.push_back(
static_cast<PAD*
>( item ) );
1650 for(
const CN_EDGE& edge : conn->GetRatsnestForPad(
pad ) )
1652 wxCHECK2( edge.GetSourceNode() && !edge.GetSourceNode()->Dirty(),
continue );
1653 wxCHECK2( edge.GetTargetNode() && !edge.GetTargetNode()->Dirty(),
continue );
1658 if( sourceParent ==
pad )
1661 select(
static_cast<PAD*
>( targetParent )->GetParent() );
1663 else if( targetParent ==
pad )
1666 select(
static_cast<PAD*
>( sourceParent )->GetParent() );
1680 std::vector<PAD*> pads;
1687 pads.push_back(
pad );
1691 pads.push_back(
static_cast<PAD*
>( item ) );
1702 const std::vector<CN_EDGE> edges = conn->GetRatsnestForPad(
pad );
1705 if( edges.size() == 0 )
1708 double currentDistance = DBL_MAX;
1712 for(
const CN_EDGE& edge : edges )
1715 const CN_ANCHOR* other = edge.GetSourceNode()->
Parent() ==
pad ? edge.GetTargetNode().get()
1716 : edge.GetSourceNode().get();
1718 wxCHECK2( other && !other->
Dirty(),
continue );
1724 if( edge.GetLength() < currentDistance )
1726 currentDistance = edge.GetLength();
1731 if( nearest !=
nullptr )
1745 for(
BOARD_ITEM* item : conn->GetNetItems( aNetCode, { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T } ) )
1799 std::vector<BOARD_ITEM*> footprints;
1804 if( footprint ==
nullptr )
1807 wxString footprint_path = footprint->GetPath().AsString().BeforeLast(
'/' );
1809 if( footprint_path.IsEmpty() )
1810 footprint_path +=
'/';
1812 if( footprint_path == aSheetPath )
1813 footprints.push_back( footprint );
1829 std::list<int> netcodeList;
1830 std::vector<BOARD_CONNECTED_ITEM*> padList;
1834 switch( item->Type() )
1840 if(
pad->IsConnected() )
1842 netcodeList.push_back(
pad->GetNetCode() );
1843 padList.push_back(
pad );
1854 if(
pad->IsConnected() )
1856 netcodeList.push_back(
pad->GetNetCode() );
1857 padList.push_back(
pad );
1869 std::sort( padList.begin(), padList.end() );
1873 netcodeList.unique();
1879 std::vector<int> removeCodeList;
1882 for(
int netCode : netcodeList )
1886 if( !std::binary_search( padList.begin(), padList.end(),
pad ) )
1890 removeCodeList.push_back( netCode );
1896 for(
int removeCode : removeCodeList )
1897 netcodeList.remove( removeCode );
1899 std::unordered_set<BOARD_ITEM*> localConnectionList;
1901 for(
int netCode : netcodeList )
1903 for(
BOARD_ITEM* item : conn->GetNetItems( netCode, { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T } ) )
1904 localConnectionList.insert( item );
1907 for(
BOARD_ITEM* item : localConnectionList )
1914 std::vector<BOARD_ITEM*>* items = aEvent.
Parameter<std::vector<BOARD_ITEM*>*>();
1925 std::vector<BOARD_ITEM*>* items = aEvent.
Parameter<std::vector<BOARD_ITEM*>*>();
1970 wxString sheetPath = *aEvent.
Parameter<wxString*>();
1996 if( !footprint || footprint->
GetPath().empty() )
2002 wxString sheetPath = footprint->
GetPath().
AsString().BeforeLast(
'/' );
2004 if( sheetPath.IsEmpty() )
2024 screenSize.
x = std::max( 10.0, screenSize.
x );
2025 screenSize.
y = std::max( 10.0, screenSize.
y );
2031 / std::max( fabs( vsize.
x / screenSize.
x ), fabs( vsize.
y / screenSize.
y ) );
2053#ifdef DEFAULT_PCBNEW_CODE
2055 auto screenSize =
view->
ToWorld( GetCanvas()->GetClientSize(),
false );
2058 screenSize.
x = std::max( 10.0, fabs( screenSize.x ) );
2059 screenSize.y = std::max( 10.0, screenSize.y );
2060 double ratio = std::max( fabs( bbSize.x / screenSize.x ), fabs( bbSize.y / screenSize.y ) );
2063 if( crossProbingSettings.zoom_to_fit && ( ratio < 0.5 || ratio > 1.0 ) )
2067#ifndef DEFAULT_PCBNEW_CODE
2084 double compRatio = bbSize.y / currTextHeight;
2087 double compRatioBent = 1.0;
2098 screenSize.
x = std::max( 10.0, fabs( screenSize.
x ) );
2099 screenSize.
y = std::max( 10.0, screenSize.
y );
2100 double ratio = std::max( -1.0, fabs( bbSize.y / screenSize.
y ) );
2104 std::max( fabs( bbSize.x / screenSize.
x ), fabs( bbSize.y / screenSize.
y ) );
2112 std::vector<std::pair<double, double>> lut{
2113 { 1, 8 }, { 1.5, 5 }, { 3, 3 }, { 4.5, 2.5 }, { 8, 2.0 },
2114 { 12, 1.7 }, { 16, 1.5 }, { 24, 1.3 }, { 32, 1.0 },
2118 std::vector<std::pair<double, double>>::iterator it;
2120 compRatioBent = lut.back().second;
2122 if( compRatio >= lut.front().first )
2128 for( it = lut.begin(); it < lut.end() - 1; it++ )
2130 if( it->first <= compRatio &&
next( it )->first >= compRatio )
2132 double diffx = compRatio - it->first;
2133 double diffn =
next( it )->first - it->first;
2135 compRatioBent = it->second + (
next( it )->second - it->second ) * diffx / diffn;
2142 compRatioBent = lut.front().second;
2150 if( bbSize.x > screenSize.
x * ratio * compRatioBent )
2154 compRatioBent = 1.0;
2155 wxLogTrace(
"CROSS_PROBE_SCALE",
2156 "Part TOO WIDE for screen. Using normal KiCad zoom ratio: %1.5f", ratio );
2161 ratio *= compRatioBent;
2163 bool alwaysZoom =
false;
2166 if( ( ratio < 0.5 || ratio > 1.0 ) || alwaysZoom )
2174 bool cleared =
false;
2186 switch( aItem->
Type() )
2190 int netCode =
static_cast<NETINFO_ITEM*
>( aItem )->GetNetCode();
2209 double marginFactor = 2;
2214 BOX2I screenRect( screenBox.
GetOrigin(), screenSize / marginFactor );
2221 scaleX /= marginFactor;
2222 scaleY /= marginFactor;
2224 double scale = scaleX > scaleY ? scaleY : scaleX;
2255 switch( aItem.
Type() )
2306 const int cmd = dlg.ShowModal();
2308 if( cmd != wxID_OK )
2337 std::set<BOARD_ITEM*> rejected;
2344 rejected.insert( item );
2348 aCollector.
Remove( item );
2384 itemType = ( *
static_cast<PCB_GENERATOR*
>( aItem )->GetItems().begin() )->Type();
2417 ZONE* zone =
static_cast<ZONE*
>( aItem );
2504 bool enteredGroupFound =
false;
2507 [&](
EDA_ITEM* item,
void* testData )
2515 return INSPECT_RESULT::CONTINUE;
2525 enteredGroupFound =
true;
2533 return INSPECT_RESULT::CONTINUE;
2539 if( !enteredGroupFound )
2551 auto visibleLayers =
2572 bool onActiveLayer =
false;
2574 for(
int layer : activeLayers )
2577 if( layer < PCB_LAYER_ID_COUNT && aItem->IsOnLayer(
ToLAYER_ID( layer ) ) )
2579 onActiveLayer =
true;
2584 if( !onActiveLayer )
2604 && footprint->
Pads().empty()
2605 && footprint->
Zones().empty() )
2622 for(
const ZONE* zone : footprint->
Zones() )
2645 const ZONE* zone =
nullptr;
2647 const PAD*
pad =
nullptr;
2651 switch( aItem->
Type() )
2657 zone =
static_cast<const ZONE*
>( aItem );
2668 && !checkVisibilityOnly )
2674 if( !( zone->
GetLayerSet() & visibleLayers() ).any() )
2704 if( !( visibleLayers() &
via->GetLayerSet() ).any() )
2710 field =
static_cast<const PCB_FIELD*
>( aItem );
2741 if(
text->GetText() == wxT(
"${REFERENCE}" ) )
2743 else if(
text->GetText() == wxT(
"${VALUE}" ) )
2762 if( !checkVisibilityOnly )
2784 if( !checkVisibilityOnly )
2794 pad =
static_cast<const PAD*
>( aItem );
2796 if(
pad->GetAttribute() == PAD_ATTRIB::PTH ||
pad->GetAttribute() == PAD_ATTRIB::NPTH )
2815 if( !(
pad->GetLayerSet() & visibleLayers() ).any() )
2868 aGroup->
Add( aItem );
2893 aMode, aUsingOverlay ) );
2925 aMode, aUsingOverlay ) );
2932 const unsigned GRIP_MARGIN = 20;
2938 BOX2I itemBox = item->ViewBBox();
2943 if( item->HitTest( aPoint, margin ) )
2948 static_cast<BOARD_ITEM*
>( item )->RunOnDescendants(
2951 if( aItem->
HitTest( aPoint, margin ) )
2965 int aMaxDistance )
const
2970 SEG loc( aWhere, aWhere );
2972 switch( aItem->
Type() )
2980 if(
text->GetEffectiveTextShape()->Collide( loc, aMaxDistance, &
distance ) )
2999 ZONE* zone =
static_cast<ZONE*
>( aItem );
3021 catch(
const std::exception& exc )
3025 wxLogError( wxT(
"Clipper library exception '%s' occurred." ), exc.what() );
3085 std::set<BOARD_ITEM*> preferred;
3086 std::set<BOARD_ITEM*> rejected;
3091 if( silkLayers[activeLayer] )
3093 for(
int i = 0; i < aCollector.
GetCount(); ++i )
3097 if( item->
IsType( { PCB_FIELD_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_SHAPE_T, PCB_FOOTPRINT_T } )
3100 preferred.insert( item );
3104 else if( courtyardLayers[activeLayer] && settings->
GetHighContrast() )
3106 for(
int i = 0; i < aCollector.
GetCount(); ++i )
3112 preferred.insert( item );
3116 if( preferred.size() > 0 )
3121 aCollector.
Append( item );
3127 constexpr int MAX_SLOP = 5;
3131 int minSlop = INT_MAX;
3133 std::map<BOARD_ITEM*, int> itemsBySloppiness;
3135 for(
int i = 0; i < aCollector.
GetCount(); ++i )
3140 itemsBySloppiness[ item ] = itemSlop;
3142 if( itemSlop < minSlop )
3147 if( minSlop < INT_MAX )
3149 for( std::pair<BOARD_ITEM*, int> pair : itemsBySloppiness )
3151 if( pair.second > minSlop + singlePixel )
3158 constexpr double sizeRatio = 1.5;
3160 std::vector<std::pair<BOARD_ITEM*, double>> itemsByArea;
3162 for(
int i = 0; i < aCollector.
GetCount(); ++i )
3171 area = (double)
SEG::Square( singlePixel ) * MAX_SLOP;
3182 area = size.
x * size.
y;
3190 catch(
const std::exception& e )
3192 wxLogError( wxT(
"A clipper exception %s was detected." ), e.what() );
3196 itemsByArea.emplace_back( item, area );
3199 std::sort( itemsByArea.begin(), itemsByArea.end(),
3200 [](
const std::pair<BOARD_ITEM*, double>& lhs,
3201 const std::pair<BOARD_ITEM*, double>& rhs ) ->
bool
3203 return lhs.second < rhs.second;
3206 bool rejecting =
false;
3208 for(
int i = 1; i < (int) itemsByArea.size(); ++i )
3210 if( itemsByArea[i].second > itemsByArea[i-1].second * sizeRatio )
3214 rejected.insert( itemsByArea[i].first );
3219 constexpr double maxCoverRatio = 0.70;
3221 for(
int i = 0; i < aCollector.
GetCount(); ++i )
3225 if( footprint->CoverageRatio( aCollector ) > maxCoverRatio )
3226 rejected.erase( footprint );
3231 if( (
unsigned) aCollector.
GetCount() > rejected.size() )
3243 bool haveItemOnActive =
false;
3246 for(
int i = 0; i < aCollector.
GetCount(); ++i )
3248 if( !aCollector[i]->IsOnLayer( activeLayer ) )
3249 rejected.insert( aCollector[i] );
3251 haveItemOnActive =
true;
3254 if( haveItemOnActive )
3262 bool aMultiselect )
const
3264 std::unordered_set<BOARD_ITEM*> toAdd;
3268 for(
int j = 0; j < aCollector.
GetCount(); j++ )
3270 if( aCollector[j]->GetParent() )
3271 aCollector[j]->GetParent()->ClearFlags(
CANDIDATE );
3276 for(
int j = 0; j < aCollector.
GetCount(); j++ )
3280 for(
int j = 0; j < aCollector.
GetCount(); )
3292 aCollector.
Remove( item );
3302 toAdd.insert( top );
3305 aCollector.
Remove( item );
3314 aCollector.
Remove( item );
3323 if( !aCollector.
HasItem( item ) )
3324 aCollector.
Append( item );
3330 bool aForcePromotion )
const
3332 std::set<BOARD_ITEM*> to_add;
3335 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
3340 && ( !
frame()->GetPcbNewSettings()->m_AllowFreePads || aForcePromotion ) )
3345 aCollector.
Remove( item );
3350 aCollector.
Append( item );
3357 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
3362 aCollector.
Remove( item );
3372 bool need_direct_hit =
false;
3380 need_direct_hit =
true;
3387 fp =
static_cast<BOARD_ITEM*
>( item )->GetParentFootprint();
3395 single_fp =
nullptr;
3398 else if( !single_fp )
3404 else if( single_fp != fp )
3406 single_fp =
nullptr;
3412 auto visibleLayers =
3430 LSET layers = visibleLayers();
3438 for(
int layer : activeLayers )
3441 layers.set( layer );
3446 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
3449 FOOTPRINT* fp = dyn_cast<FOOTPRINT*>( item );
3462 aCollector.
Remove( item );
3464 bool has_hit =
false;
3478 aCollector.
Remove( item );
3483 else if( single_fp )
3485 if( fp == single_fp )
3488 else if( need_direct_hit )
3502 aCollector.
Remove( item );
constexpr EDA_IU_SCALE pcbIUScale
static TOOL_ACTION cancelInteractive
static TOOL_ACTION unselectAll
static TOOL_ACTION cursorLeft
static TOOL_ACTION zoomOutCenter
static TOOL_ACTION zoomIn
static TOOL_ACTION cursorLeftFast
static TOOL_ACTION cursorDown
static TOOL_ACTION zoomOut
static TOOL_ACTION cursorRightFast
static TOOL_ACTION zoomCenter
static TOOL_ACTION panDown
static TOOL_ACTION cursorDownFast
static TOOL_ACTION cursorUpFast
static TOOL_ACTION panLeft
static TOOL_ACTION updateMenu
static TOOL_ACTION doDelete
static TOOL_ACTION zoomFitScreen
static TOOL_ACTION zoomFitObjects
static TOOL_ACTION zoomInCenter
static TOOL_ACTION panRight
static TOOL_ACTION cursorUp
Cursor control with keyboard.
static TOOL_ACTION cursorRight
static TOOL_ACTION selectAll
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
CROSS_PROBING_SETTINGS m_CrossProbing
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
static bool ClassOf(const EDA_ITEM *aItem)
Returns information if the object is derived from BOARD_CONNECTED_ITEM.
bool IsConnected() const override
Returns information if the object is derived from BOARD_CONNECTED_ITEM.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
virtual VECTOR2I GetCenter() const
This defaults to the center of the bounding box if not overridden.
virtual bool IsOnLayer(PCB_LAYER_ID aLayer) const
Test to see if this object is on the given layer.
virtual void RunOnDescendants(const std::function< void(BOARD_ITEM *)> &aFunction) const
Invoke a function on all descendants.
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
FOOTPRINT * GetParentFootprint() const
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
virtual bool IsLocked() const
BOARD_ITEM_CONTAINER * GetParent() const
virtual bool IsOnCopperLayer() const
Information pertinent to a Pcbnew printed circuit board.
INSPECT_RESULT Visit(INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &scanTypes) override
May be re-implemented for each derived class in order to handle all the types given by its member dat...
ZONE * m_SolderMaskBridges
LSET GetVisibleLayers() const
A proxy function that calls the correspondent function in m_BoardSettings.
bool IsElementVisible(GAL_LAYER_ID aLayer) const
Test whether a given element category is visible.
bool IsLayerVisible(PCB_LAYER_ID aLayer) const
A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer...
bool LegacyTeardrops() const
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
BOX2< Vec > & Normalize()
Ensure that the height and width are positive.
const Vec & GetPosition() const
const Vec & GetOrigin() const
coord_type GetHeight() const
coord_type GetWidth() const
bool Contains(const Vec &aPoint) const
BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
const Vec & GetSize() const
CN_ANCHOR represents a physical location that can be connected: a pad or a track/arc/via endpoint.
BOARD_CONNECTED_ITEM * Parent() const
CN_EDGE represents a point-to-point connection, whether realized or unrealized (ie: tracks etc.
virtual double OnePixelInIU() const =0
void Transfer(int aIndex)
Move the item at aIndex (first position is 0) to the backup list.
void Empty()
Clear the list.
int GetCount() const
Return the number of objects in the list.
bool HasItem(const EDA_ITEM *aItem) const
Tests if aItem has already been collected.
void Remove(int aIndex)
Remove the item at aIndex (first position is 0).
void Append(EDA_ITEM *item)
Add an item to the end of the list.
bool IsType(FRAME_T aType) const
void AddStandardSubMenus(TOOL_MENU &aMenu)
Construct a "basic" menu for a tool, containing only items that apply to all tools (e....
void FocusOnLocation(const VECTOR2I &aPos)
Useful to focus on a particular location, in find functions.
void ForceRefresh()
Force a redraw.
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
A base class for most all the KiCad significant classes used in schematics and boards.
virtual VECTOR2I GetPosition() const
virtual const BOX2I GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
void SetFlags(EDA_ITEM_FLAGS aMask)
KICAD_T Type() const
Returns the type of object.
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
virtual bool IsType(const std::vector< KICAD_T > &aScanTypes) const
Check whether the item is one of the listed types.
virtual bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const
Test if aPosition is inside or on the boundary of this item.
EDA_ITEM * GetParent() const
bool HasFlag(EDA_ITEM_FLAGS aFlag) const
EDA_ITEM_FLAGS GetFlags() const
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
std::shared_ptr< SHAPE_COMPOUND > GetEffectiveTextShape(bool aTriangulate=true, const BOX2I &aBBox=BOX2I(), const EDA_ANGLE &aAngle=ANGLE_0) const
build a list of segments (SHAPE_SEGMENT) to describe a text shape.
static const TOOL_EVENT DisambiguatePoint
Used for hotkey feedback.
static const TOOL_EVENT ClearedEvent
static const TOOL_EVENT InhibitSelectionEditing
static const TOOL_EVENT SelectedEvent
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
static const TOOL_EVENT UninhibitSelectionEditing
Used to inform tool that it should display the disambiguation menu.
static const TOOL_EVENT PointSelectedEvent
static const TOOL_EVENT SelectedItemsMoved
Used to inform tools that the selection should temporarily be non-editable.
static const TOOL_EVENT UnselectedEvent
A general implementation of a COLLECTORS_GUIDE.
void SetIgnoreBlindBuriedVias(bool ignore)
void SetIgnoreTracks(bool ignore)
void SetIgnoreMTextsMarkedNoShow(bool ignore)
void SetIgnoreModulesOnFront(bool ignore)
void SetIgnoreModulesRefs(bool ignore)
void SetIgnoreMicroVias(bool ignore)
void SetIgnoreZoneFills(bool ignore)
void SetIgnorePadsOnBack(bool ignore)
void SetIgnoreModulesOnBack(bool ignore)
void SetIgnoreModulesVals(bool ignore)
void SetIgnoreThroughVias(bool ignore)
void SetIgnoreThroughHolePads(bool ignore)
void SetIgnoreMTextsOnFront(bool ignore)
void SetIgnoreMTextsOnBack(bool ignore)
void SetIgnorePadsOnFront(bool ignore)
Used when the right click button is pressed, or when the select tool is in effect.
void SetGuide(const COLLECTORS_GUIDE *aGuide)
Record which COLLECTORS_GUIDE to use.
const COLLECTORS_GUIDE * GetGuide() const
static const std::vector< KICAD_T > AllBoardItems
A scan list for all editable board items.
void Collect(BOARD_ITEM *aItem, const std::vector< KICAD_T > &aScanList, const VECTOR2I &aRefPos, const COLLECTORS_GUIDE &aGuide)
Scan a BOARD_ITEM using this class's Inspector method, which does the collection.
static const std::vector< KICAD_T > FootprintItems
A scan list for primary footprint items.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1) override
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
Represent a selection area (currently a rectangle) in a VIEW, drawn corner-to-corner between two poin...
VECTOR2I GetOrigin() const
void SetSubtractive(bool aSubtractive)
void SetAdditive(bool aAdditive)
void SetOrigin(const VECTOR2I &aOrigin)
const BOX2I ViewBBox() const override
Set the origin of the rectangle (the fixed corner)
void SetExclusiveOr(bool aExclusiveOr)
void SetEnd(const VECTOR2I &aEnd)
Set the current end of the rectangle (the corner that moves with the cursor.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
const std::set< int > & GetHighlightNetCodes() const
Return the netcode of currently highlighted net.
const std::set< int > GetHighContrastLayers() const
Returns the set of currently high-contrast layers.
bool GetHighContrast() const
void SetHighlight(bool aEnabled, int aNetcode=-1, bool aMulti=false)
Turns on/off highlighting.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
virtual void Clear()
Remove all the stored items from the group.
virtual void Add(VIEW_ITEM *aItem)
Add an item to the group.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
BOX2D GetViewport() const
Return the current viewport visible area rectangle.
virtual void SetScale(double aScale, VECTOR2D aAnchor={ 0, 0 })
Set the scaling factor, zooming around a given anchor point.
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
void UpdateAllLayersColor()
Apply the new coloring scheme to all layers.
virtual int Query(const BOX2I &aRect, std::vector< LAYER_ITEM_PAIR > &aResult) const
Find all visible items that touch or are within the rectangle aRect.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
bool IsMirroredX() const
Return true if view is flipped across the X axis.
std::pair< VIEW_ITEM *, int > LAYER_ITEM_PAIR
void Hide(VIEW_ITEM *aItem, bool aHide=true, bool aHideOverlay=false)
Temporarily hide the item in the view (e.g.
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
void SetCenter(const VECTOR2D &aCenter)
Set the center point of the VIEW (i.e.
void MarkTargetDirty(int aTarget)
Set or clear target 'dirty' flag.
bool IsVisible(const VIEW_ITEM *aItem) const
Return information if the item is visible (or not).
void SetVisible(VIEW_ITEM *aItem, bool aIsVisible=true)
Set the item visibility.
wxString AsString() const
LSET is a set of PCB_LAYER_IDs.
static LSET AllLayersMask()
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Return an LSEQ from the union of this LSET and a desired sequence.
bool Contains(PCB_LAYER_ID aLayer)
See if the layer set contains a PCB layer.
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
static LSET PhysicalLayersMask()
Return a mask holding all layers which are physically realized.
static LSET FrontMask()
Return a mask holding all technical layers and the external CU layer on front side.
static LSET BackMask()
Return a mask holding all technical layers and the external CU layer on back side.
const VECTOR2I & GetPos() const
void ShapeToPolygon(SHAPE_LINE_CHAIN &aPolygon, int aScale=-1) const
Return the shape polygon in internal units in a SHAPE_LINE_CHAIN the coordinates are relatives to the...
Handle the data for a net.
bool m_CtrlClickHighlight
TRACK_DRAG_ACTION m_TrackDragAction
bool m_ESCClearsNetHighlight
static TOOL_ACTION drag45Degree
static TOOL_ACTION unrouteSelected
Removes all tracks from the selected items to the first pad.
static TOOL_ACTION selectionCursor
Select a single item under the cursor position.
static TOOL_ACTION groupLeave
static TOOL_ACTION grabUnconnected
Select and move nearest unconnected footprint from ratsnest of selection.
static TOOL_ACTION filterSelection
Filter the items in the current selection (invokes dialog)
static TOOL_ACTION highlightNet
static TOOL_ACTION unselectItem
static TOOL_ACTION hideLocalRatsnest
static TOOL_ACTION properties
Activation of the edit tool.
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION selectOnSheetFromEeschema
Select all components on sheet from Eeschema crossprobing.
static TOOL_ACTION selectConnection
Select tracks between junctions or expands an existing selection to pads or the entire connection.
static TOOL_ACTION dragFreeAngle
static TOOL_ACTION clearHighlight
static TOOL_ACTION unselectItems
static TOOL_ACTION selectUnconnected
Select unconnected footprints from ratsnest of selection.
static TOOL_ACTION moveIndividually
move items one-by-one
static TOOL_ACTION syncSelection
Sets selection to specified items, zooms to fit, if enabled.
static TOOL_ACTION groupEnter
static TOOL_ACTION selectItem
Select an item (specified as the event parameter).
static TOOL_ACTION selectSameSheet
Select all components on the same sheet as the selected footprint.
static TOOL_ACTION selectNet
Select all connections belonging to a single net.
static TOOL_ACTION selectionActivate
Activation of the selection tool.
static TOOL_ACTION move
move or drag an item
static TOOL_ACTION syncSelectionWithNets
Sets selection to specified items with connected nets, zooms to fit, if enabled.
static TOOL_ACTION selectItems
Select a list of items (specified as the event parameter)
static TOOL_ACTION deselectNet
Remove all connections belonging to a single net from the active selection.
static TOOL_ACTION selectionMenu
Run a selection menu to select from a list of items.
static TOOL_ACTION reselectItem
static TOOL_ACTION selectOnSchematic
Select symbols/pins on schematic corresponding to selected footprints/pads.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
const PCB_DISPLAY_OPTIONS & GetDisplayOptions() const
Display options control the way tracks, vias, outlines and other things are shown (for instance solid...
PCBNEW_SETTINGS * GetPcbNewSettings() const
virtual PCB_LAYER_ID GetActiveLayer() const
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void FocusOnItem(BOARD_ITEM *aItem, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
ZONE_DISPLAY_MODE m_ZoneDisplayMode
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
A set of BOARD_ITEMs (i.e., without duplicates).
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
static bool WithinScope(BOARD_ITEM *aItem, PCB_GROUP *aScope, bool isFootprintEditor)
static PCB_GROUP * TopLevelGroup(BOARD_ITEM *aItem, PCB_GROUP *aScope, bool isFootprintEditor)
virtual bool AddItem(BOARD_ITEM *aItem)
Add item to group.
void RunOnChildren(const std::function< void(BOARD_ITEM *)> &aFunction) const override
Invoke a function on all descendants.
Tool that displays edit points allowing to modify items by dragging the points.
bool HasPoint()
Indicate the cursor is over an edit point.
Object to handle a bitmap image that can be inserted in a PCB.
std::vector< VECTOR2I > GetConnectionPoints() const
const VECTOR2I & GetStart() const
const VECTOR2I & GetEnd() const
int GetDrill() const
Return the local drill setting for this PCB_VIA.
A small class to help profiling.
void Start()
Start or restart the counter.
double msecs(bool aSinceLast=false)
static SEG::ecoord Square(int a)
static SELECTION_CONDITION HasType(KICAD_T aType)
Create a functor that tests if among the selected items there is at least one of a given type.
static bool NotEmpty(const SELECTION &aSelection)
Test if there are any items selected.
static SELECTION_CONDITION Count(int aNumber)
Create a functor that tests if the number of selected items is equal to the value given as parameter.
virtual void Add(EDA_ITEM *aItem)
virtual KIGFX::VIEW_ITEM * GetItem(unsigned int aIdx) const override
const std::deque< EDA_ITEM * > GetItems() const
void SetIsHover(bool aIsHover)
virtual void Remove(EDA_ITEM *aItem)
virtual unsigned int GetSize() const override
Return the number of stored items.
virtual void Clear() override
Remove all the stored items from the group.
int Size() const
Returns the number of selected parts.
void ClearReferencePoint()
bool Empty() const
Checks if there is anything selected.
bool Contains(EDA_ITEM *aItem) const
virtual BOX2I GetBoundingBox() const
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
void Move(const VECTOR2I &aVector) override
virtual bool Collide(const VECTOR2I &aP, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if point aP lies closer to us than aClearance.
bool Collide(const SHAPE *aShape, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance,...
Handle a list of polygons defining a copper zone.
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
bool HitTestForCorner(const VECTOR2I &refPos, int aAccuracy, SHAPE_POLY_SET::VERTEX_INDEX *aCornerHit=nullptr) const
Test if the given VECTOR2I is near a corner.
bool HitTestForEdge(const VECTOR2I &refPos, int aAccuracy, SHAPE_POLY_SET::VERTEX_INDEX *aCornerHit=nullptr) const
Test if the given VECTOR2I is near a segment defined by 2 corners.
bool IsTeardropArea() const
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
#define DEFAULT_TEXT_SIZE
Ratio of the font height to the baseline of the text above the wire.
static bool empty(const wxTextEntryBase *aCtrl)
std::function< INSPECT_RESULT(EDA_ITEM *aItem, void *aTestData) > INSPECTOR_FUNC
Used to inspect and possibly collect the (search) results of iterating over a list or tree of KICAD_T...
#define BRIGHTENED
item is drawn with a bright contour
#define IS_NEW
New item, just created.
#define SELECTED
Item was manually selected by the user.
#define ENTERED
indicates a group has been entered
#define SKIP_STRUCT
flag indicating that the structure should be ignored
#define CANDIDATE
flag indicating that the structure is connected
#define IS_MOVING
Item being moved.
int m_DisambiguationMenuDelay
The number of milliseconds to wait in a click before showing a disambiguation menu.
@ LAYER_FOOTPRINTS_FR
show footprints on front
@ LAYER_FP_REFERENCES
show footprints references (when texts are visible)
@ LAYER_ZONES
Control for copper zone opacity/visibility (color ignored)
@ LAYER_PADS
Meta control for all pads opacity/visibility (color ignored)
@ LAYER_HIDDEN_TEXT
text marked as invisible
@ LAYER_FOOTPRINTS_BK
show footprints on back
@ LAYER_PADS_SMD_BK
smd pads, back layer
@ LAYER_PADS_TH
multilayer pads, usually with holes
@ LAYER_PADS_SMD_FR
smd pads, front layer
@ LAYER_FP_VALUES
show footprints values (when texts are visible)
@ LAYER_VIAS
Meta control for all vias opacity/visibility.
PCB_LAYER_ID
A quick note on layer IDs:
PCB_LAYER_ID ToLAYER_ID(int aLayer)
This file contains miscellaneous commonly used macros and functions.
#define KI_FALLTHROUGH
The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from ...
@ REPAINT
Item needs to be redrawn.
@ TARGET_OVERLAY
Items that may change while the view stays the same (noncached)
Class to handle a set of BOARD_ITEMs.
Class that computes missing connections on a PCB.
static float distance(const SFVEC2UI &a, const SFVEC2UI &b)
bool zoom_to_fit
Zoom to fit items (ignored if center_on_items is off)
bool center_on_items
Automatically pan to cross-probed items.
Struct that will be set with the result of the user choices in the dialog.
bool includeItemsOnTechLayers
bool includeLockedModules
bool includeBoardOutlineLayer
constexpr int mmToIU(double mm) const
bool graphics
Graphic lines, shapes, polygons.
bool text
Text (free or attached to a footprint)
bool vias
Vias (all types>
bool lockedItems
Allow selecting locked items.
bool tracks
Copper tracks.
bool footprints
Allow selecting entire footprints.
bool keepouts
Keepout zones.
bool dimensions
Dimension items.
bool otherItems
Anything not fitting one of the above categories.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_DIM_ORTHOGONAL_T
class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y
@ PCB_DIM_LEADER_T
class PCB_DIM_LEADER, a leader dimension (graphic item)
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_DIM_CENTER_T
class PCB_DIM_CENTER, a center point marking (graphic item)
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_REFERENCE_IMAGE_T
class PCB_REFERENCE_IMAGE, bitmap on a layer
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
@ NOT_USED
the 3d code uses this value
@ PCB_MARKER_T
class PCB_MARKER, a marker used to show something
@ PCB_TARGET_T
class PCB_TARGET, a target (graphic item)
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_DIM_ALIGNED_T
class PCB_DIM_ALIGNED, a linear dimension (graphic item)
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_NETINFO_T
class NETINFO_ITEM, a description of a net
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
@ PCB_DIM_RADIAL_T
class PCB_DIM_RADIAL, a radius or diameter dimension
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
VECTOR2D ToVECTOR2D(const wxPoint &aPoint)