54 void Show(
int nestLevel, std::ostream& os )
const override;
60 void SetMinMax(
const double aMin,
const double aMax );
66 void SetCurrent(
const double aCurrent,
const wxString& aLabel );
119 return _(
"Tuning Pattern" );
124 return _(
"Tuning Pattern" );
129 return _(
"Tuning Patterns" );
134 return _(
"Edit Tuning Pattern" );
169 m_end += aMoveVector;
223 item->SetLayer( aLayer );
231 return track->GetLayer();
264 if( item->HitTest( aPosition, aAccuracy ) )
271 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy )
const override
273 bool anyItems =
false;
281 if( !item->HitTest( aRect,
true, aAccuracy ) )
284 else if( item->HitTest( aRect,
false, aAccuracy ) )
313 bool anyItems =
false;
321 if( !item->HitTest( aPoly,
true ) )
324 else if( item->HitTest( aPoly,
false ) )
355 return track->GetWidth();
369 return bci->GetNetCode();
386 bci->SetNetCode( aNetCode );
393 return track->HasSolderMask();
402 track->SetHasSolderMask( aVal );
409 return track->GetLocalSolderMaskMargin();
411 return std::optional<int>();
418 track->SetLocalSolderMaskMargin( aMargin );
453 aValue = std::max( aValue, 0 );
464 aValue = std::max( aValue, 0 );
484 return std::optional<int>();
493 if( aValue.has_value() )
502 return std::optional<int>();
511 if( aValue.has_value() )
512 m_settings.SetTargetLengthDelay( aValue.value() );
536 std::vector<std::pair<wxString, wxVariant>>
GetRowData()
override
550 bool aStatusItemsOnly =
false )
override;
568 std::optional<SHAPE_LINE_CHAIN>& aBaseLine );
585 m_baseLine->Mirror( aCentre, aFlipDirection );
BITMAPS
A list of all bitmap identifiers.
@ ps_diff_pair_tune_length
@ ps_diff_pair_tune_phase
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
BOARD_ITEM(BOARD_ITEM *aParent, KICAD_T idtype, PCB_LAYER_ID aLayer=F_Cu)
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
Information pertinent to a Pcbnew printed circuit board.
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
constexpr const Vec GetEnd() const
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
constexpr coord_type GetLeft() const
constexpr const Vec & GetOrigin() const
constexpr coord_type GetRight() const
constexpr coord_type GetTop() const
constexpr coord_type GetBottom() const
The base class for create windows for drawing purpose.
std::unordered_set< EDA_ITEM * > m_items
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
bool HasFlag(EDA_ITEM_FLAGS aFlag) const
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
EDIT_POINTS is a VIEW_ITEM that manages EDIT_POINTs and EDIT_LINEs and draws them.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Handle the data for a net.
Common, abstract interface for edit frames.
void baseMirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection)
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
PCB_GENERATOR(BOARD_ITEM *aParent, PCB_LAYER_ID aLayer)
void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aMirrorDirection) override
Mirror this object relative to a given horizontal axis the layer is not changed.
virtual std::vector< std::pair< wxString, wxVariant > > GetRowData()
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void Move(const VECTOR2I &aMoveVector) override
Move this object.
std::unordered_set< BOARD_ITEM * > GetBoardItems() const
void SetTargetSkew(int aValue)
void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Mirror this object relative to a given horizontal axis the layer is not changed.
bool initBaseLines(PNS::ROUTER *aRouter, int aPNSLayer, BOARD *aBoard)
const STRING_ANY_MAP GetProperties() const override
bool HitTest(const BOX2I &aRect, bool aContained, int aAccuracy) const override
Test if aPosition is inside or on the boundary of this item.
void SetBaseLine(const SHAPE_LINE_CHAIN &aBaseLine)
void SetEnd(const VECTOR2I &aValue)
void SetLocalSolderMaskMargin(std::optional< int > aMargin)
void SetMinAmplitude(int aValue)
bool recoverBaseline(PNS::ROUTER *aRouter, int aPNSLayer)
void SetSpacing(int aValue)
void SetTuningMode(LENGTH_TUNING_MODE aMode)
wxString GetGeneratorType() const override
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
std::vector< int > ViewGetLayers() const override
bool HitTest(const SHAPE_LINE_CHAIN &aPoly, bool aContained) const override
Test if aPosition is inside or on the boundary of this item.
static const wxString DISPLAY_NAME
size_t m_cachedBridgingPadCount
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
PNS::ROUTER_MODE GetPNSMode()
bool initBaseLine(PNS::ROUTER *aRouter, int aPNSLayer, BOARD *aBoard, VECTOR2I &aStart, VECTOR2I &aEnd, NETINFO_ITEM *aNet, std::optional< SHAPE_LINE_CHAIN > &aBaseLine)
void SetTargetSkewDelay(int aValue)
PCB_TUNING_PATTERN(BOARD_ITEM *aParent=nullptr, PCB_LAYER_ID aLayer=F_Cu, LENGTH_TUNING_MODE aMode=LENGTH_TUNING_MODE::SINGLE)
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
void swapData(BOARD_ITEM *aImage) override
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
void SetWidth(int aValue)
PNS::MEANDER_SIDE GetInitialSide() const
std::optional< int > GetLocalSolderMaskMargin() const
bool HasSolderMask() const
const VECTOR2I & GetEnd() const
void SetInitialSide(PNS::MEANDER_SIDE aValue)
wxString GetFriendlyName() const override
void SetTargetDelay(std::optional< int > aValue)
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
wxString GetCommitMessage() const override
LENGTH_TUNING_MODE GetTuningMode() const
void SetHasSolderMask(bool aVal)
std::optional< int > GetTargetDelay() const
void Move(const VECTOR2I &aMoveVector) override
Move this object.
void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
std::vector< EDA_ITEM * > GetPreviewItems(GENERATOR_TOOL *aTool, PCB_BASE_EDIT_FRAME *aFrame, bool aStatusItemsOnly=false) override
void SetLastNetName(const wxString &aNetName)
int GetMinAmplitude() const
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
long long m_cachedBridgingLen
double m_cachedBridgingDelayIU
void EditStart(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit) override
void baseMirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection)
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
long long GetCachedBridgingLength(BOARD *aBoard, const wxString &aNetChain, double *aDelayIUOut)
void SetOverrideCustomRules(bool aOverride)
void SetRounded(bool aFlag)
const wxString & GetLastNetName() const
LENGTH_TUNING_MODE m_tuningMode
std::vector< std::pair< wxString, wxVariant > > GetRowData() override
const std::optional< SHAPE_LINE_CHAIN > & GetBaseLine() const
static const wxString GENERATOR_TYPE
bool resetToBaseline(GENERATOR_TOOL *aTool, int aPNSLayer, SHAPE_LINE_CHAIN &aBaseLine, bool aPrimary)
bool MakeEditPoints(EDIT_POINTS &points) const override
void SetCornerRadiusPercentage(int aValue)
PNS::MEANDER_PLACER_BASE::TUNING_STATUS m_tuningStatus
std::optional< SHAPE_LINE_CHAIN > m_baseLineCoupled
const BOARD * m_cachedBridgingBoardPtr
void SetProperties(const STRING_ANY_MAP &aProps) override
wxString GetPluralName() const override
void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override final
Draw the parts of the object belonging to layer aLayer.
void Remove(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit) override
bool UpdateFromEditPoints(EDIT_POINTS &aEditPoints) override
std::optional< SHAPE_LINE_CHAIN > m_baseLine
int GetMaxAmplitude() const
PNS::MEANDER_SETTINGS m_settings
wxString m_cachedBridgingSignal
void SetDiffPairGap(int aValue)
void ShowPropertiesDialog(PCB_BASE_EDIT_FRAME *aEditFrame) override
PCB_LAYER_ID GetLayer() const override
Return the primary layer this item is on.
bool Update(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit) override
void SetNetCode(int aNetCode)
int GetDiffPairGap() const
bool UpdateEditPoints(EDIT_POINTS &aEditPoints) override
int GetTargetSkewDelay() const
void EditCancel(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit) override
bool GetOverrideCustomRules() const
void SetMaxAmplitude(int aValue)
PNS::MEANDER_SETTINGS & GetSettings()
const std::optional< SHAPE_LINE_CHAIN > & GetBaseLineCoupled() const
void SetSingleSided(bool aValue)
bool removeToBaseline(PNS::ROUTER *aRouter, int aPNSLayer, SHAPE_LINE_CHAIN &aBaseLine)
std::optional< int > GetTargetLength() const
void EditFinish(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit) override
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
int GetCornerRadiusPercentage() const
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
SHAPE_LINE_CHAIN getOutline() const
void SetTargetLength(std::optional< int > aValue)
bool IsSingleSided() const
static PCB_TUNING_PATTERN * CreateNew(GENERATOR_TOOL *aTool, PCB_BASE_EDIT_FRAME *aFrame, BOARD_CONNECTED_ITEM *aStartItem, LENGTH_TUNING_MODE aMode)
int GetTargetSkew() const
void SetBaseLineCoupled(const SHAPE_LINE_CHAIN &aBaseLine)
TUNING_STATUS
< Result of the length tuning operation
Dimensions for the meandering algorithm.
static const long long int LENGTH_UNCONSTRAINED
static const long long int DELAY_UNCONSTRAINED
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
A name/value tuple with unique names and wxAny values.
void SetIsTimeDomain(const bool aIsTimeDomain)
void SetCurrent(const double aCurrent, const wxString &aLabel)
wxString GetClass() const override
Return the class name.
VECTOR2I GetPosition() const override
void SetScopeLine(const wxString &aLine)
void SetMinMax(const double aMin, const double aMax)
void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override
Draw the parts of the object belonging to layer aLayer.
void SetChainMinMax(const double aMin, const double aMax)
std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
TUNING_STATUS_VIEW_ITEM(PCB_BASE_EDIT_FRAME *aFrame)
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
void SetNetAndSignalValues(const wxString &aNetVal, const wxString &aSignalVal, bool aHasSignal)
void SetPosition(const VECTOR2I &aPos) override
#define IN_EDIT
Item currently edited.
a few functions useful in geometry calculations.
@ LAYER_ANCHOR
Anchor of items having an anchor point (texts, footprints).
PCB_LAYER_ID
A quick note on layer IDs:
bool ShapeHitTest(const SHAPE_LINE_CHAIN &aHitter, const SHAPE &aHittee, bool aHitteeContained)
Perform a shape-to-shape hit test.
The Cairo implementation of the graphics abstraction layer.
@ PNS_MODE_TUNE_DIFF_PAIR
@ PNS_MODE_TUNE_DIFF_PAIR_SKEW
static bool Collide(const SHAPE_CIRCLE &aA, const SHAPE_CIRCLE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV)
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer
VECTOR2< int32_t > VECTOR2I