|
KiCad PCB EDA Suite
|
#include <functional>#include <stack>#include <optional>#include <eda_shape.h>#include <tool/shape_draw_behavior.h>#include <tool/tool_menu.h>#include <tools/pcb_selection.h>#include <tools/pcb_tool_base.h>#include <tools/pcb_actions.h>Go to the source code of this file.
Classes | |
| class | DRAWING_TOOL |
| Tool responsible for drawing graphical elements like lines, arcs, circles, etc. More... | |
Namespaces | |
| namespace | KIGFX |
| The Cairo implementation of the graphics abstraction layer. | |
Functions | |
| int | ComputeWorstViaClearance (PCB_BASE_EDIT_FRAME *aFrame, DRC_ENGINE *aEngine) |
| Shared placement DRC checks, used by the plain via tool and the microvia stack tool so both block placement over foreign copper consistently. | |
| bool | CheckItemDRCViolation (BOARD_CONNECTED_ITEM *aItem, PCB_BASE_EDIT_FRAME *aFrame, DRC_ENGINE *aEngine, int aWorstClearance, int aEpsilon) |
| int | ViaSnapRange (PCB_BASE_EDIT_FRAME *aFrame) |
| Shared placement snapping, used by the plain via tool and the microvia stack tool. | |
| PCB_TRACK * | FindSnapTrack (PCB_BASE_EDIT_FRAME *aFrame, const PCB_VIA *aVia, const VECTOR2I &aPosition, const LSET &aLayers, int aSnapRange=0) |
| PAD * | FindSnapPad (PCB_BASE_EDIT_FRAME *aFrame, const PCB_VIA *aVia, const VECTOR2I &aPosition, const LSET &aLayers, int aSnapRange=0) |
| bool CheckItemDRCViolation | ( | BOARD_CONNECTED_ITEM * | aItem, |
| PCB_BASE_EDIT_FRAME * | aFrame, | ||
| DRC_ENGINE * | aEngine, | ||
| int | aWorstClearance, | ||
| int | aEpsilon ) |
Definition at line 3960 of file drawing_tool.cpp.
References DISALLOW_CONSTRAINT, DRC_ENGINE::EvalRules(), EDA_ITEM::GetBoundingBox(), PCB_BASE_FRAME::GetCanvas(), ZONE::GetIsRuleArea(), DRC_CONSTRAINT::GetSeverity(), PCB_DRAW_PANEL_GAL::GetView(), BOX2< Vec >::Inflate(), EDA_TEXT::IsVisible(), ItemHasDRCViolation(), DRC_CONSTRAINT::m_DisallowFlags, PCB_FIELD_T, PCB_FOOTPRINT_T, PCB_GROUP_T, PCB_TEXT_T, PCB_ZONE_T, KIGFX::VIEW::Query(), RPT_SEVERITY_IGNORE, EDA_ITEM::Type(), and UNDEFINED_LAYER.
Referenced by DRAWING_TOOL::DrawVia(), and DRAWING_TOOL::PlaceMicroviaStack().
| int ComputeWorstViaClearance | ( | PCB_BASE_EDIT_FRAME * | aFrame, |
| DRC_ENGINE * | aEngine ) |
Shared placement DRC checks, used by the plain via tool and the microvia stack tool so both block placement over foreign copper consistently.
Definition at line 3829 of file drawing_tool.cpp.
References CLEARANCE_CONSTRAINT, BOARD::Footprints(), PCB_BASE_FRAME::GetBoard(), BOARD::GetDesignRulesPath(), DRC_CONSTRAINT::GetValue(), HOLE_CLEARANCE_CONSTRAINT, DRC_ENGINE::InitEngine(), MINOPTMAX< T >::Min(), pad, and DRC_ENGINE::QueryWorstConstraint().
Referenced by DRAWING_TOOL::DrawVia(), and DRAWING_TOOL::PlaceMicroviaStack().
| PAD * FindSnapPad | ( | PCB_BASE_EDIT_FRAME * | aFrame, |
| const PCB_VIA * | aVia, | ||
| const VECTOR2I & | aPosition, | ||
| const LSET & | aLayers, | ||
| int | aSnapRange = 0 ) |
Definition at line 4096 of file drawing_tool.cpp.
References PCB_BASE_FRAME::GetCanvas(), BOARD_ITEM::GetLayerSet(), PCB_DRAW_PANEL_GAL::GetView(), pad, PCB_PAD_T, KIGFX::VIEW::Query(), EDA_ITEM::Type(), and ViaSnapBoundingBox().
Referenced by DRAWING_TOOL::DrawVia(), and DRAWING_TOOL::PlaceMicroviaStack().
| PCB_TRACK * FindSnapTrack | ( | PCB_BASE_EDIT_FRAME * | aFrame, |
| const PCB_VIA * | aVia, | ||
| const VECTOR2I & | aPosition, | ||
| const LSET & | aLayers, | ||
| int | aSnapRange = 0 ) |
Definition at line 4033 of file drawing_tool.cpp.
References PCB_BASE_FRAME::GetCanvas(), PCB_TRACK::GetEnd(), BOARD_CONNECTED_ITEM::GetLayer(), BOARD_ITEM::GetLayerSet(), PCB_TRACK::GetStart(), PCB_DRAW_PANEL_GAL::GetView(), PCB_TRACK::GetWidth(), PCB_VIA::GetWidth(), PCB_ARC::HitTest(), PCB_ARC_T, PCB_TRACE_T, KIGFX::VIEW::Query(), TestSegmentHit(), EDA_ITEM::Type(), and ViaSnapBoundingBox().
Referenced by DRAWING_TOOL::DrawVia(), and DRAWING_TOOL::PlaceMicroviaStack().
| int ViaSnapRange | ( | PCB_BASE_EDIT_FRAME * | aFrame | ) |
Shared placement snapping, used by the plain via tool and the microvia stack tool.
aVia gives the reach and the bounding box to search, aLayers which layers may be snapped to, so a stack can offer every layer it spans rather than just the via's own.
Definition at line 4010 of file drawing_tool.cpp.
References PCB_BASE_FRAME::GetCanvas(), KIGFX::VIEW::GetGAL(), PCB_DRAW_PANEL_GAL::GetView(), KIGFX::GAL::GetVisibleGridSize(), KiROUND(), scale, KIGFX::VIEW::ToWorld(), and VECTOR2< T >::x.
Referenced by DRAWING_TOOL::PlaceMicroviaStack().