29#include <magic_enum.hpp>
90 wxString
GetClass()
const override {
return wxT(
"TUNING_STATUS" ); }
93 void Show(
int nestLevel, std::ostream& os )
const override {}
111 m_max = std::numeric_limits<double>::max();
144 gal->
Scale( { 1., 1. } );
155 VECTOR2I offset( margin.
x * 2, -( size.
y + margin.
y * 2 ) );
157 if( drawingDropShadows )
162 gal->
SetStrokeColor( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNTEXT ) );
163 KIGFX::COLOR4D bgColor( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
172 COLOR4D bg = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE );
173 COLOR4D normal = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNTEXT );
177 double bg_h, bg_s, bg_l;
178 bg.
ToHSL( bg_h, bg_s, bg_l );
179 red.FromHSL( 0, 1.0, bg_l < 0.5 ? 0.7 : 0.3 );
204 textPos.
x += glyphWidth * 11 + margin.
x;
205 font->
Draw( gal,
_(
"min" ), textPos, textAttrs, fontMetrics );
207 textPos.
x += glyphWidth * 7 + margin.
x;
208 font->
Draw( gal,
_(
"max" ), textPos, textAttrs, fontMetrics );
217 textPos.
x += glyphWidth * 11 + margin.
x;
219 font->
Draw( gal,
m_minText, textPos, textAttrs, fontMetrics );
221 textPos.
x += glyphWidth * 7 + margin.
x;
223 font->
Draw( gal,
m_maxText, textPos, textAttrs, fontMetrics );
254 return wxString(
_(
"Tuning Pattern" ) );
259 return wxString(
_(
"Tuning Pattern" ) );
264 return wxString(
_(
"Tuning Patterns" ) );
271 case SINGLE:
return BITMAPS::ps_tune_length;
break;
272 case DIFF_PAIR:
return BITMAPS::ps_diff_pair_tune_length;
break;
273 case DIFF_PAIR_SKEW:
return BITMAPS::ps_diff_pair_tune_phase;
break;
276 return BITMAPS::unknown;
288 const wxString& aCommitMsg = wxEmptyString,
int aCommitFlags = 0 )
override;
303 m_end += aMoveVector;
367 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy )
const override
413 aValue = std::max( aValue, 0 );
424 aValue = std::max( aValue, 0 );
444 return std::optional<int>();
451 if( aValue.has_value() )
473 std::vector<std::pair<wxString, wxVariant>>
GetRowData()
override
487 bool aStatusItemsOnly =
false )
override;
505 std::optional<SHAPE_LINE_CHAIN>& aBaseLine );
522 m_baseLine->Mirror( aCentre, aFlipDirection );
560 if( aStr ==
"single" )
562 else if( aStr ==
"diff_pair" )
564 else if( aStr ==
"diff_pair_skew" )
568 wxFAIL_MSG( wxS(
"Unknown length tuning token" ) );
581 default: wxFAIL;
return "";
588 switch( aRouterMode )
600 if( aStr ==
"default" )
602 else if( aStr ==
"left" )
604 else if( aStr ==
"right" )
608 wxFAIL_MSG( wxS(
"Unknown length-tuning side token" ) );
621 default: wxFAIL;
return "";
628 if( aStr ==
"too_long" )
630 else if( aStr ==
"too_short" )
632 else if( aStr ==
"tuned" )
636 wxFAIL_MSG( wxS(
"Unknown tuning status token" ) );
649 default: wxFAIL;
return "";
659 m_tuningMode( aMode ),
660 m_tuningStatus(
PNS::MEANDER_PLACER_BASE::TUNING_STATUS::TUNED ),
661 m_updateSideFromEnd(false)
678 if( aNet && track->GetNet() != aNet )
693 SEG seg( track->GetStart(), track->GetEnd() );
697 SEG::ecoord dist_sq = ( nearest - aP ).SquaredEuclideanNorm();
699 if( dist_sq < minDist_sq )
701 minDist_sq = dist_sq;
705 *aNearestTrack = track;
748 if( !constraint.
IsNull() )
766 aCommit->
Add(
this );
792 centerlineOffsetEnd =
799 baseEnd.
A += centerlineOffsetEnd;
800 baseEnd.
B += centerlineOffsetEnd;
802 if( baseEnd.
A != baseEnd.
B )
831 &pnsItem,
nullptr, layer, &constraint ) )
846 pnsCoupledItem.
SetParent( coupledTrack );
847 pnsCoupledItem.
SetNet( coupledNet );
852 &pnsItem, &pnsCoupledItem, layer, &constraint ) )
861 &pnsItem, &pnsCoupledItem, layer, &constraint ) )
878 static const int candidateCount = 2;
884 for(
int i = 0; i < candidateCount; i++ )
886 prioritized[i] =
nullptr;
891 for(
int slopRadius : { 0, maxSlopRadius } )
900 if( !item->IsRoutable() )
903 if( !item->Layers().Overlaps( aLayer ) )
913 SEG::ecoord d0 = ( nearest - aWhere ).SquaredEuclideanNorm();
918 if( aBaseline.PointCount() > 0 )
923 if( aBaseline.SegmentCount() > 0 )
926 dcBaseline = ( aBaseline.CPoint( 0 ) - target ).SquaredEuclideanNorm();
928 if( dcBaseline > distBaseline[1] )
931 distBaseline[1] = dcBaseline;
934 prioritized[1] = linked;
943 SEG::ecoord dd = ( aWhere - nearest ).SquaredEuclideanNorm();
948 if( aBaseline.PointCount() > 0 )
953 if( aBaseline.SegmentCount() > 0 )
956 dcBaseline = ( aBaseline.CPoint( 0 ) - target ).SquaredEuclideanNorm();
958 if( dcBaseline > distBaseline[1] )
961 distBaseline[1] = dcBaseline;
964 prioritized[1] = segm;
973 for(
int i = 0; i < candidateCount; i++ )
977 if( item && ( aLayer < 0 || item->Layers().Overlaps( aLayer ) ) )
980 aPointOut = point[i];
1010 return std::nullopt;
1016 std::optional<SHAPE_LINE_CHAIN>& aBaseLine )
1023 VECTOR2I startSnapPoint, endSnapPoint;
1028 wxASSERT( startItem );
1029 wxASSERT( endItem );
1031 if( !startItem || !endItem )
1039 wxASSERT( chain.
PointOnEdge( startSnapPoint, 40000 ) );
1040 wxASSERT( chain.
PointOnEdge( endSnapPoint, 40000 ) );
1046 chain.
Split( startSnapPoint, endSnapPoint, pre, mid, post );
1061 wxCHECK( track,
false );
1077 return initBaseLine( aRouter, aPNSLayer, aBoard, coupledStart, coupledEnd, coupledNet,
1090 VECTOR2I startSnapPoint, endSnapPoint;
1093 aRouter, aPNSLayer, startSnapPoint, endSnapPoint );
1095 wxCHECK( pnsLine,
false );
1100 pnsLine->CLine().
Split( startSnapPoint, endSnapPoint, pre, mid, post );
1108 straightChain.
Append( pre );
1109 straightChain.
Append( aBaseLine );
1110 straightChain.
Append( post );
1113 PNS::LINE straightLine( *pnsLine, straightChain );
1141 group->GetItems().clear();
1153 bool success =
true;
1164 const std::vector<GENERATOR_PNS_CHANGES>& allPnsChanges = aTool->
GetRouterChanges();
1168 const std::set<BOARD_ITEM*> routerRemovedItems = pnsChanges.removedItems;
1169 const std::set<BOARD_ITEM*> routerAddedItems = pnsChanges.addedItems;
1177 item->ClearSelected();
1182 aCommit->
Add( item );
1185 aCommit->
Push(
"Remove Tuning Pattern" );
1217 if( lineWidth == 0 || li->Width() < lineWidth )
1218 lineWidth = li->Width();
1228 if( lineWidth == 0 )
1239 recoverLine.
SetNet( recoverNet );
1240 branch->
Add( recoverLine,
false );
1248 recoverLineCoupled.
SetWidth( lineWidth );
1250 recoverLineCoupled.
SetNet( recoverCoupledNet );
1251 branch->
Add( recoverLineCoupled,
false );
1269 VECTOR2I startSnapPoint, endSnapPoint;
1272 router, aPNSLayer, startSnapPoint, endSnapPoint );
1286 pnsLine->CLine().
Split( startSnapPoint, endSnapPoint, pre, mid, post );
1288 straightChain.
Append( pre );
1289 straightChain.
Append( aBaseLine );
1290 straightChain.
Append( post );
1294 branch->
Remove( *pnsLine );
1307 m_end = endSnapPoint;
1314 newLineChain.
Append( pre );
1315 newLineChain.
Append( mid );
1316 newLineChain.
Append( post );
1328 straightChain.
Split( start, end, pre, mid, post );
1330 newLineChain.
Append( pre );
1331 newLineChain.
Append( mid );
1332 newLineChain.
Append( post );
1338 PNS::LINE newLine( *pnsLine, newLineChain );
1340 branch->
Add( newLine,
false );
1361 auto hideRemovedItems = [&](
bool aHide )
1367 for(
BOARD_ITEM* item : pnsCommit.removedItems )
1370 view->
Hide( item, aHide, aHide );
1413 hideRemovedItems(
true );
1415 VECTOR2I startSnapPoint, endSnapPoint;
1422 wxASSERT( startItem );
1423 wxASSERT( endItem );
1425 if( !startItem || !endItem )
1430 if( !router->
StartRouting( startSnapPoint, startItem, pnslayer ) )
1458 wxString statusMessage;
1465 default: statusMessage =
_(
"unknown" );
break;
1469 EDA_UNITS userUnits = EDA_UNITS::MILLIMETRES;
1477 m_tuningInfo.Printf( wxS(
"%s (%s)" ), result, statusMessage );
1484 const wxString& aCommitMsg,
int aCommitFlags )
1501 bool forceFinish =
true;
1502 bool forceCommit =
false;
1504 router->
FixRoute(
m_end,
nullptr, forceFinish, forceCommit );
1508 const std::vector<GENERATOR_PNS_CHANGES>& pnsCommits = aTool->
GetRouterChanges();
1512 const std::set<BOARD_ITEM*> routerRemovedItems = pnsCommit.removedItems;
1513 const std::set<BOARD_ITEM*> routerAddedItems = pnsCommit.addedItems;
1522 view->
Hide( item,
false );
1529 aCommit->
Add( item );
1543 if( aCommitMsg.IsEmpty() )
1544 aCommit->
Push(
_(
"Edit Tuning Pattern" ), aCommitFlags );
1546 aCommit->
Push( aCommitMsg, aCommitFlags );
1565 for(
BOARD_ITEM* item : pnsCommit.removedItems )
1566 view->Hide( item,
false );
1594 base.
A += centerlineOffset;
1595 base.
B += centerlineOffset;
1605 VECTOR2I widthHandleOffset = ( base.
B - base.
A ).Perpendicular().
Resize( amplitude );
1607 aPoints.
AddPoint( base.
A + widthHandleOffset );
1613 aPoints.
AddPoint( base.
A + spacingHandleOffset );
1634 base.
A += centerlineOffset;
1635 base.
B += centerlineOffset;
1653 int side = base.
Side( wHandle );
1689 base.
A += centerlineOffset;
1690 base.
B += centerlineOffset;
1700 VECTOR2I widthHandleOffset = ( base.
B - base.
A ).Perpendicular().
Resize( amplitude );
1721 int minAllowedAmplitude = 0;
1731 minAllowedAmplitude = baselineOffset +
correction;
1734 clampedMaxAmplitude = std::max( clampedMaxAmplitude, minAllowedAmplitude );
1785 if( clCoupled.
OffsetLine( amplitude, CORNER_STRATEGY::ROUND_ALL_CORNERS,
1832 CORNER_STRATEGY::ROUND_ALL_CORNERS,
ARC_LOW_DEF,
false );
1863 for(
int i = 0; i <
m_baseLine->SegmentCount(); i++ )
1937 wxString tuningMode;
1938 aProps.
get_to(
"tuning_mode", tuningMode );
1942 aProps.
get_to(
"initial_side", side );
1946 aProps.
get_to(
"last_status", status );
1954 bool rounded =
false;
1955 aProps.
get_to(
"rounded", rounded );
1960 aProps.
get_to_iu(
"target_length", val );
1963 if( aProps.
get_to_iu(
"target_length_min", val ) )
1966 if( aProps.
get_to_iu(
"target_length_max", val ) )
1971 aProps.
get_to_iu(
"target_skew", int_val );
1974 if( aProps.
get_to_iu(
"target_skew_min", int_val ) )
1977 if( aProps.
get_to_iu(
"target_skew_max", int_val ) )
2032 bool aStatusItemsOnly )
2034 std::vector<EDA_ITEM*> previewItems;
2039 if( !aStatusItemsOnly )
2069 statusItem->
SetCurrent( (
double) placer->TuningResult(),
_(
"current skew" ) );
2071 statusItem->
SetCurrent( (
double) placer->TuningResult(),
_(
"current length" ) );
2074 previewItems.push_back( statusItem );
2077 return previewItems;
2082 std::vector<MSG_PANEL_ITEM>& aList )
2091 bool mixedWidth =
false;
2101 primaryItem = track;
2102 primaryNet = track->GetNet();
2104 else if( !coupledNet && track->GetNet() != primaryNet )
2106 coupledItem = track;
2107 coupledNet = track->GetNet();
2111 netclass = track->GetEffectiveNetClass();
2114 width = track->GetWidth();
2115 else if( width != track->GetWidth() )
2126 else if( primaryNet )
2136 if( width && !mixedWidth )
2144 if( board && primaryItem && primaryItem->
GetNetCode() > 0 )
2150 std::tie( count, trackLen, lenPadToDie ) = board->
GetTrackLength( *primaryItem );
2152 if( coupledItem && coupledItem->
GetNetCode() > 0 )
2155 std::tie( count, coupledLen, lenPadToDie ) = board->
GetTrackLength( *coupledItem );
2166 if( lenPadToDie != 0 )
2169 aList.emplace_back(
_(
"Pad To Die Length" ), msg );
2172 aList.emplace_back(
_(
"Full Length" ), msg );
2184 aList.emplace_back( wxString::Format(
_(
"Target Skew: %s" ), msg ),
2185 wxString::Format(
_(
"(from tuning pattern properties)" ) ) );
2191 if( !msg.IsEmpty() )
2193 aList.emplace_back( wxString::Format(
_(
"Skew Constraints: %s" ), msg ),
2194 wxString::Format(
_(
"(from %s)" ), constraint.
GetName() ) );
2206 aList.emplace_back( wxString::Format(
_(
"Target Length: %s" ), msg ),
2207 wxString::Format(
_(
"(from tuning pattern properties)" ) ) );
2213 if( !msg.IsEmpty() )
2215 aList.emplace_back( wxString::Format(
_(
"Length Constraints: %s" ), msg ),
2216 wxString::Format(
_(
"(from %s)" ), constraint.
GetName() ) );
2230#define HITTEST_THRESHOLD_PIXELS 5
2250 std::shared_ptr<DRC_ENGINE>& drcEngine = bds.
m_DRCEngine;
2285 auto origTargetLength = aPattern->GetSettings().m_targetLength;
2286 auto origTargetSkew = aPattern->GetSettings().m_targetSkew;
2288 aPattern->GetSettings() = meanderSettings;
2294 aPattern->GetSettings().m_targetSkew = origTargetSkew;
2297 auto updateHoverStatus =
2300 std::unique_ptr<PCB_TUNING_PATTERN> dummyPattern;
2312 applyCommonSettings( dummyPattern.get() );
2314 dummyPattern->EditStart( generatorTool,
m_board,
nullptr );
2315 dummyPattern->Update( generatorTool,
m_board,
nullptr );
2319 for(
EDA_ITEM* item : dummyPattern->GetPreviewItems( generatorTool,
m_frame ) )
2334 auto updateTuningPattern =
2362 if( evt->IsCancelInteractive() || evt->IsActivate()
2376 else if( evt->IsMotion() )
2386 guide.SetIncludeSecondary(
false );
2388 guide.SetIncludeSecondary(
true );
2399 double min_dist_sq = std::numeric_limits<double>::max();
2401 for(
EDA_ITEM* candidate : collector )
2407 candidatePos =
static_cast<PCB_TRACK*
>( candidate )->GetCenter();
2409 else if( candidate->Type() ==
PCB_ARC_T )
2411 candidatePos =
static_cast<PCB_ARC*
>( candidate )->GetMid();
2414 double dist_sq = ( cursorPos - candidatePos ).SquaredEuclideanNorm();
2416 if( dist_sq < min_dist_sq )
2418 min_dist_sq = dist_sq;
2424 updateHoverStatus();
2433 updateTuningPattern();
2436 else if( evt->IsClick(
BUT_LEFT ) )
2445 "tuning patterns." ) );
2458 int dummyClearance = std::numeric_limits<int>::max() / 2;
2464 &dummyDist, &closestPt ) )
2500 meanderSettings.
m_spacing = placer->MeanderSettings().m_spacing;
2502 updateTuningPattern();
2518 meanderSettings.
m_maxAmplitude = placer->MeanderSettings().m_maxAmplitude;
2520 updateTuningPattern();
2551 updateTuningPattern();
2562 evt->SetPassEvent();
2593 .Map( LENGTH_TUNING_MODE::SINGLE,
_HKI(
"Single track" ) )
2594 .Map( LENGTH_TUNING_MODE::DIFF_PAIR,
_HKI(
"Differential pair" ) )
2595 .Map( LENGTH_TUNING_MODE::DIFF_PAIR_SKEW,
_HKI(
"Diff pair skew" ) );
2609 const wxString groupTab =
_HKI(
"Pattern Properties" );
2624 _HKI(
"Tuning Mode" ),
2630 _HKI(
"Min Amplitude" ),
2637 _HKI(
"Max Amplitude" ),
2644 _HKI(
"Initial Side" ),
2656 _HKI(
"Corner Radius %" ),
2674 return !isSkew( aItem );
2678 _HKI(
"Target Length" ),
2695 _HKI(
"Override Custom Rules" ),
2701 _HKI(
"Single-sided" ),
2719template <typename T>
constexpr EDA_IU_SCALE pcbIUScale
constexpr int ARC_LOW_DEF
BITMAPS
A list of all bitmap identifiers.
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
COMMIT & Stage(EDA_ITEM *aItem, CHANGE_TYPE aChangeType, BASE_SCREEN *aScreen=nullptr) override
virtual void Revert() override
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
NETINFO_ITEM * GetNet() const
Return #NET_INFO object for a given item.
Container for design settings for a BOARD object.
std::shared_ptr< DRC_ENGINE > m_DRCEngine
int GetDRCEpsilon() const
PNS::MEANDER_SETTINGS m_DiffPairMeanderSettings
PNS::MEANDER_SETTINGS m_SingleTrackMeanderSettings
PNS::MEANDER_SETTINGS m_SkewMeanderSettings
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.
PCB_GROUP * GetParentGroup() const
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.
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
virtual wxString layerMaskDescribe() const
Return a string (to be shown to the user) describing a layer mask.
Information pertinent to a Pcbnew printed circuit board.
NETINFO_ITEM * DpCoupledNet(const NETINFO_ITEM *aNet)
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
const TRACKS & Tracks() const
std::tuple< int, double, double > GetTrackLength(const PCB_TRACK &aTrack) const
Return data on the length and number of track segments connected to a given track.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
constexpr void SetMaximum()
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
constexpr bool Contains(const Vec &aPoint) const
constexpr bool Intersects(const BOX2< Vec > &aRect) const
int GetCount() const
Return the number of objects in the list.
COMMIT & Remove(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Notify observers that aItem has been removed.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Notify observers that aItem has been added.
const MINOPTMAX< int > & GetValue() const
void ShowInfoBarWarning(const wxString &aWarningMsg, bool aShowCloseButton=false)
Show the WX_INFOBAR displayed on the top of the canvas with a message and a warning icon on the left ...
The base class for create windows for drawing purpose.
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
A base class for most all the KiCad significant classes used in schematics and boards.
virtual const VECTOR2I GetFocusPosition() const
Similar to GetPosition, but allows items to return their visual center rather than their anchor.
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)
bool HasFlag(EDA_ITEM_FLAGS aFlag) const
EDA_ITEM_FLAGS GetFlags() const
EDIT_POINTS is a VIEW_ITEM that manages EDIT_POINTs and EDIT_LINEs and draws them.
void AddPoint(const EDIT_POINT &aPoint)
Add an EDIT_POINT.
EDIT_POINT & Point(unsigned int aIndex)
void SetGridConstraint(GRID_CONSTRAINT_TYPE aConstraint)
static const int POINT_SIZE
virtual void SetPosition(const VECTOR2I &aPosition)
Set new coordinates for an EDIT_POINT.
virtual VECTOR2I GetPosition() const
Return coordinates of an EDIT_POINT.
static ENUM_MAP< T > & Instance()
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
A general implementation of a COLLECTORS_GUIDE.
Used when the right click button is pressed, or when the select tool is in effect.
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.
A factory which returns an instance of a PCB_GENERATOR.
void Register(const wxString &aTypeStr, const wxString &aName, std::function< PCB_GENERATOR *(void)> aCreateFunc)
Associate a type string to display name and create function.
static GENERATORS_MGR & Instance()
Class that other classes need to inherit from, in order to be inspectable.
FONT is an abstract base class for both outline and stroke fonts.
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false, const std::vector< wxString > *aEmbeddedFiles=nullptr, bool aForDrawingSheet=false)
void Draw(KIGFX::GAL *aGal, const wxString &aText, const VECTOR2I &aPosition, const VECTOR2I &aCursor, const TEXT_ATTRIBUTES &aAttributes, const METRICS &aFontMetrics) const
Draw a string.
static const METRICS & Default()
A color representation with 4 components: red, green, blue, alpha.
COLOR4D WithAlpha(double aAlpha) const
Return a color with the same color, but the given alpha.
void ToHSL(double &aOutHue, double &aOutSaturation, double &aOutLightness) const
Converts current color (stored in RGB) to HSL format.
Abstract interface for drawing on a 2D-surface.
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
virtual void DrawRectangle(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a rectangle.
virtual void SetFillColor(const COLOR4D &aColor)
Set the fill color.
const MATRIX3x3D & GetScreenWorldMatrix() const
Get the screen <-> world transformation matrix.
virtual void Restore()
Restore the context.
virtual void SetLineWidth(float aLineWidth)
Set the line width.
virtual void SetStrokeColor(const COLOR4D &aColor)
Set the stroke color.
virtual void SetIsStroke(bool aIsStrokeEnabled)
Enable/disable stroked outlines.
virtual void Scale(const VECTOR2D &aScale)
Scale the context.
virtual void Save()
Save the context.
A KIGFX::PREVIEW::DRAW_CONTEXT is a wrapper around a GAL and some other settings that makes it easy t...
void DrawLineDashed(const VECTOR2I &aStart, const VECTOR2I &aEn, int aDashStep, int aDashFill, bool aDeEmphasised)
Draw a dashed line on the current layer.
An interface for classes handling user events controlling the view behavior such as zooming,...
virtual void CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
virtual void ForceCursorPosition(bool aEnabled, const VECTOR2D &aPosition=VECTOR2D(0, 0))
Place the cursor immediately at a given point.
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
virtual VECTOR2D GetMousePosition(bool aWorldCoordinates=true) const =0
Return the current mouse pointer position.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
void FreeItems()
Free all the items that were added to the group.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
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...
GAL * GetGAL() const
Return the #GAL this view is using to draw graphical primitives.
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
void Hide(VIEW_ITEM *aItem, bool aHide=true, bool aHideOverlay=false)
Temporarily hide the item in the view (e.g.
VECTOR2< T > GetScale() const
Get the scale components of the matrix.
A collection of nets and the parameters used to route or test these nets.
const wxString GetName() const
Gets the consolidated name of this netclass (which may be an aggregate)
Handle the data for a net.
const wxString & GetNetname() const
static TOOL_ACTION properties
Activation of the edit tool.
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION spacingDecrease
static TOOL_ACTION amplIncrease
static TOOL_ACTION amplDecrease
static TOOL_ACTION lengthTunerSettings
static TOOL_ACTION spacingIncrease
const VECTOR2I & GetMid() const
Common, abstract interface for edit frames.
const PCB_DISPLAY_OPTIONS & GetDisplayOptions() const
Display options control the way tracks, vias, outlines and other things are shown (for instance solid...
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
GENERAL_COLLECTORS_GUIDE GetCollectorsGuide()
virtual void SetActiveLayer(PCB_LAYER_ID aLayer)
HIGH_CONTRAST_MODE m_ContrastModeDisplay
How inactive layers are displayed.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
virtual void SetProperties(const STRING_ANY_MAP &aProps)
void baseMirror(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection)
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.
void Mirror(const VECTOR2I &aCentre, FLIP_DIRECTION aMirrorDirection) override
Mirror this object relative to a given horizontal axis the layer is not changed.
bool AddItem(BOARD_ITEM *aItem) override
Add item to group.
void SetPosition(const VECTOR2I &aPos) override
VECTOR2I GetPosition() const override
virtual std::vector< std::pair< wxString, wxVariant > > GetRowData()
virtual const STRING_ANY_MAP GetProperties() const
std::unordered_set< BOARD_ITEM * > m_items
std::unordered_set< BOARD_ITEM * > & GetItems()
void Move(const VECTOR2I &aMoveVector) override
Move this object.
const VECTOR2I & GetStart() const
const VECTOR2I & GetEnd() const
virtual int GetWidth() 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 aRect intersects this item.
void SetEnd(const VECTOR2I &aValue)
void SetMinAmplitude(int aValue)
void SetSpacing(int aValue)
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
Return the all the layers within the VIEW the object is painted on.
static const wxString DISPLAY_NAME
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)
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
bool recoverBaseline(PNS::ROUTER *aRouter)
void EditRevert(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit) override
PNS::MEANDER_SIDE GetInitialSide() const
const VECTOR2I & GetEnd() const
void SetInitialSide(PNS::MEANDER_SIDE aValue)
wxString GetFriendlyName() const override
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
LENGTH_TUNING_MODE GetTuningMode() 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
int GetMinAmplitude() const
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
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.
void SetOverrideCustomRules(bool aOverride)
void SetRounded(bool aFlag)
LENGTH_TUNING_MODE m_tuningMode
std::vector< std::pair< wxString, wxVariant > > GetRowData() override
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
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
void ShowPropertiesDialog(PCB_BASE_EDIT_FRAME *aEditFrame) override
bool Update(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit) override
bool UpdateEditPoints(EDIT_POINTS &aEditPoints) override
bool GetOverrideCustomRules() const
void SetMaxAmplitude(int aValue)
void EditPush(GENERATOR_TOOL *aTool, BOARD *aBoard, BOARD_COMMIT *aCommit, const wxString &aCommitMsg=wxEmptyString, int aCommitFlags=0) override
PNS::MEANDER_SETTINGS & GetSettings()
void SetSingleSided(bool aValue)
bool removeToBaseline(PNS::ROUTER *aRouter, int aPNSLayer, SHAPE_LINE_CHAIN &aBaseLine)
std::optional< int > GetTargetLength() const
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
Differential Pair length-matching/meandering tool.
std::vector< ITEM * > & Items()
Base class for PNS router board items.
virtual NET_HANDLE Net() const
void SetNet(NET_HANDLE aNet)
void SetLayer(int aLayer)
void SetParent(BOARD_ITEM *aParent)
bool OfKind(int aKindMask) const
virtual VECTOR2I Anchor(int n) const
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
const SHAPE_LINE_CHAIN & CLine() const
SHAPE_LINE_CHAIN & Line()
void SetWidth(int aWidth)
Return line width.
virtual int Width() const
bool ContainsLink(const LINKED_ITEM *aItem) const
std::vector< LINKED_ITEM * > & Links()
Base class for Single trace & Differential pair meandering tools, as both of them share a lot of code...
virtual void UpdateSettings(const MEANDER_SETTINGS &aSettings)
TUNING_STATUS
< Result of the length tuning operation
virtual void SpacingStep(int aSign)
Increase/decrease the current meandering spacing by one step.
virtual TUNING_STATUS TuningStatus() const =0
Return the tuning status (too short, too long, etc.) of the trace(s) being tuned.
virtual const MEANDER_SETTINGS & MeanderSettings() const
Return the current meandering configuration.
virtual long long int TuningResult() const =0
Return the resultant length or skew of the tuned traces.
virtual void AmplitudeStep(int aSign)
Increase/decreases the current meandering amplitude by one step.
Dimensions for the meandering algorithm.
int m_minAmplitude
Maximum meandering amplitude.
void SetTargetLength(long long int aOpt)
static const long long int LENGTH_UNCONSTRAINED
int m_cornerRadiusPercentage
Place meanders on one side.
MEANDER_SIDE m_initialSide
Allowable tuning error.
bool m_singleSided
Initial side when placing meanders at segment.
MINOPTMAX< long long int > m_targetLength
Target skew value for diff pair de-skewing.
void SetTargetSkew(int aOpt)
MINOPTMAX< int > m_targetSkew
MEANDER_STYLE m_cornerStyle
Rounding percentage (0 - 100).
int m_maxAmplitude
Meandering period/spacing (see dialog picture for explanation).
bool m_overrideCustomRules
Type of corners for the meandered line.
int m_spacing
Amplitude/spacing adjustment step.
Keep the router "world" - i.e.
NODE * Branch()
Create a lightweight copy (called branch) of self that tracks the changes (added/removed items) wrs t...
bool Add(std::unique_ptr< SEGMENT > aSegment, bool aAllowRedundant=false)
Add an item to the current node.
std::set< OBSTACLE > OBSTACLES
int QueryColliding(const ITEM *aItem, OBSTACLES &aObstacles, const COLLISION_SEARCH_OPTIONS &aOpts=COLLISION_SEARCH_OPTIONS()) const
Find items colliding (closer than clearance) with the item aItem.
void Remove(ARC *aArc)
Remove an item from this branch.
const LINE AssembleLine(LINKED_ITEM *aSeg, int *aOriginSegmentIndex=nullptr, bool aStopAtLockedJoints=false, bool aFollowLockedSegments=false)
Follow the joint map to assemble a line connecting two non-trivial joints starting from segment aSeg.
virtual int GetPNSLayerFromBoardLayer(PCB_LAYER_ID aLayer) const =0
virtual void RemoveItem(ITEM *aItem)=0
virtual void AddItem(ITEM *aItem)=0
void SetMode(ROUTER_MODE aMode)
PLACEMENT_ALGO * Placer()
ROUTER_IFACE * GetInterface() const
const ITEM_SET QueryHoverItems(const VECTOR2I &aP, int aSlopRadius=0)
RULE_RESOLVER * GetRuleResolver() const
bool RoutingInProgress() const
bool StartRouting(const VECTOR2I &aP, ITEM *aItem, int aLayer)
bool FixRoute(const VECTOR2I &aP, ITEM *aItem, bool aForceFinish, bool aForceCommit)
bool Move(const VECTOR2I &aP, ITEM *aItem)
virtual int Clearance(const ITEM *aA, const ITEM *aB, bool aUseClearanceEpsilon=true)=0
const SHAPE_LINE_CHAIN CLine() const
const SHAPE * Shape(int aLayer) const override
Return the geometrical shape of the item.
void SetShape(SHAPE *shape)
void SetStartLayerFromPCBNew(PCB_LAYER_ID aLayer)
int GetPNSLayerFromBoardLayer(PCB_LAYER_ID aLayer) const override
void DisplayItem(const PNS::ITEM *aItem, int aClearance, bool aEdit=false, int aFlags=0) override
void EraseView() override
wxString GetNetName(PNS::NET_HANDLE aNet) const override
PROPERTY_BASE & SetAvailableFunc(std::function< bool(INSPECTABLE *)> aFunc)
Set a callback function to determine whether an object provides this property.
Provide class metadata.Helper macro to map type hashes to names.
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
static PROPERTY_MANAGER & Instance()
PROPERTY_BASE & AddProperty(PROPERTY_BASE *aProperty, const wxString &aGroup=wxEmptyString)
Register a property.
void AddTypeCast(TYPE_CAST_BASE *aCast)
Register a type converter.
RAII class that sets an value at construction and resets it to the original value at destruction.
int LineDistance(const VECTOR2I &aP, bool aDetermineSide=false) const
Return the closest Euclidean distance between point aP and the line defined by the ends of segment (t...
VECTOR2I::extended_type ecoord
const VECTOR2I NearestPoint(const VECTOR2I &aP) const
Compute a point on the segment (this) that is closest to point aP.
int Side(const VECTOR2I &aP) const
Determine on which side of directed line passing via segment ends point aP lies.
virtual void Add(EDA_ITEM *aItem)
virtual void Clear() override
Remove all the stored items from the group.
const VECTOR2I & GetArcMid() const
VECTOR2I NearestPoint(const VECTOR2I &aP) const
bool PointOnEdge(const VECTOR2I &aP, int aAccuracy=0) const
Check if point aP lies on an edge or vertex of the line chain.
bool PointInside(const VECTOR2I &aPt, int aAccuracy=0, bool aUseBBoxCache=false) const override
Check if point aP lies inside a closed shape.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
const SHAPE_LINE_CHAIN Reverse() const
Reverse point order in the line chain.
int Split(const VECTOR2I &aP, bool aExact=false)
Insert the point aP belonging to one of the our segments, splitting the adjacent segment in two.
void SetClosed(bool aClosed)
Mark the line chain as closed (i.e.
void Simplify(int aMaxError=0)
Simplify the line chain by removing colinear adjacent segments and duplicate vertices.
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.
SEG Segment(int aIndex) const
Return a copy of the aIndex-th segment in the line chain.
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
const VECTOR2I & CPoint(int aIndex) const
Return a reference to a given point in the line chain.
const VECTOR2I NearestPoint(const VECTOR2I &aP, bool aAllowInternalShapePoints=true) const
Find a point on the line chain that is closest to point aP.
int SegmentCount() const
Return the number of segments in this line chain.
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
SHAPE * Clone() const override
Return a dynamically allocated copy of the shape.
bool OffsetLine(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError, SHAPE_LINE_CHAIN &aLeft, SHAPE_LINE_CHAIN &aRight, bool aSimplify=false) const
Creates line chains aLeft and aRight offset to this line chain.
Represent a set of closed polygons.
void BooleanAdd(const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode)
Perform boolean polyset union For aFastMode meaning, see function booleanOp.
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
void OffsetLineChain(const SHAPE_LINE_CHAIN &aLine, int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError, bool aSimplify)
Perform offsetting of a line chain.
int OutlineCount() const
Return the number of outlines in the set.
virtual VECTOR2I Centre() const
Compute a center-of-mass of the shape.
A name/value tuple with unique names and wxAny values.
void set_iu(const std::string &aKey, const T &aVar)
bool get_to(const std::string &aKey, T &aVar) const
std::optional< T > get_opt(const std::string &aKey) const
void set(const std::string &aKey, const T &aVar)
bool get_to_iu(const std::string &aKey, T &aVar) const
GR_TEXT_H_ALIGN_T m_Halign
wxString GetClass() const override
Return the class name.
VECTOR2I GetPosition() const override
void SetMinMax(double aMin, double aMax)
void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override
Draw the parts of the object belonging to layer aLayer.
void SetCurrent(double aCurrent, const wxString &aLabel)
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 SetPosition(const VECTOR2I &aPos) override
wxString MessageTextFromMinOptMax(const MINOPTMAX< int > &aValue) const
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
A lower-precision version of StringFromValue().
constexpr extended_type SquaredDistance(const VECTOR2< T > &aVector) const
Compute the squared distance between two vectors.
static constexpr extended_type ECOORD_MAX
VECTOR2< T > Resize(T aNewLength) const
Return a vector of the same direction, but length specified in aNewLength.
static bool empty(const wxTextEntryBase *aCtrl)
#define IS_NEW
New item, just created.
#define IN_EDIT
Item currently edited.
static FILENAME_RESOLVER * resolver
@ LAYER_ANCHOR
anchor of items having an anchor point (texts, footprints)
PCB_LAYER_ID
A quick note on layer IDs:
KICOMMON_API wxString MessageTextFromValue(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, double aValue, bool aAddUnitsText=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
A helper to convert the double length aValue to a string in inches, millimeters, or unscaled units.
TEXT_DIMS GetConstantGlyphHeight(KIGFX::GAL *aGal, int aRelativeSize=0)
Set the GAL glyph height to a constant scaled value, so that it always looks the same on screen.
Push and Shove diff pair dimensions (gap) settings dialog.
@ PNS_MODE_TUNE_DIFF_PAIR
@ PNS_MODE_TUNE_DIFF_PAIR_SKEW
Class to handle a set of BOARD_ITEMs.
static PNS::MEANDER_SIDE sideFromString(const std::string &aStr)
static LENGTH_TUNING_MODE tuningFromString(const std::string &aStr)
static std::string tuningToString(const LENGTH_TUNING_MODE aTuning)
static struct PCB_TUNING_PATTERN_DESC _PCB_TUNING_PATTERN_DESC
static LENGTH_TUNING_MODE fromPNSMode(PNS::ROUTER_MODE aRouterMode)
static PNS::MEANDER_PLACER_BASE::TUNING_STATUS statusFromString(const std::string &aStr)
static std::string sideToString(const PNS::MEANDER_SIDE aValue)
static std::string statusToString(const PNS::MEANDER_PLACER_BASE::TUNING_STATUS aStatus)
static GENERATORS_MGR::REGISTER< PCB_TUNING_PATTERN > registerMe
static PNS::LINKED_ITEM * pickSegment(PNS::ROUTER *aRouter, const VECTOR2I &aWhere, int aLayer, VECTOR2I &aPointOut, const SHAPE_LINE_CHAIN &aBaseline=SHAPE_LINE_CHAIN())
static std::optional< PNS::LINE > getPNSLine(const VECTOR2I &aStart, const VECTOR2I &aEnd, PNS::ROUTER *router, int layer, VECTOR2I &aStartOut, VECTOR2I &aEndOut)
static VECTOR2I snapToNearestTrack(const VECTOR2I &aP, BOARD *aBoard, NETINFO_ITEM *aNet, PCB_TRACK **aNearestTrack)
static REGISTER_LEGACY_TUNING_PATTERN< PCB_TUNING_PATTERN > registerMeToo
#define NO_SETTER(owner, type)
#define ENUM_TO_WXANY(type)
Macro to define read-only fields (no setter method available)
constexpr double correction
std::vector< FAB_LAYER_COLOR > dummy
wxString UnescapeString(const wxString &aSource)
constexpr int mmToIU(double mm) const
PCB_TUNING_PATTERN_DESC()
bool m_useClearanceEpsilon
An abstract function object, returning a design rule (clearance, diff pair gap, etc) required between...
Hold an object colliding with another object, along with some useful data about the collision.
REGISTER_LEGACY_TUNING_PATTERN()
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.
double DEG2RAD(double deg)
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer
@ NOT_USED
the 3d code uses this value
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
VECTOR2< int32_t > VECTOR2I