36#include <boost/random/mersenne_twister.hpp>
37#include <boost/random/uniform_real_distribution.hpp>
112 if(
this != &aOther )
155 return d > 0 ? d : 0;
174 if( aName != wxS(
"via" ) || !aItem || aItem->Type() !=
PCB_VIA_T )
210 const double tickSpacing =
pcbIUScale.mmToIU( 2.0 );
211 const double tickLength =
pcbIUScale.mmToIU( 0.5 );
216 for(
int i = 0; i < n; ++i )
218 centroid.
x += outline.
CPoint( i ).
x;
219 centroid.
y += outline.
CPoint( i ).
y;
226 for(
int i = 0; i < n; ++i )
237 const VECTOR2D edgeDir = edgeVec / edgeLen;
240 const VECTOR2D edgeMid = ( p1 + p2 ) / 2.0;
242 const VECTOR2D toCentr = centroid - edgeMid;
243 const bool perpToward = ( perp.
x * toCentr.
x + perp.
y * toCentr.
y >= 0.0 );
246 for(
double t = tickSpacing; t < edgeLen; t += tickSpacing )
248 const VECTOR2D base = p1 + edgeDir * t;
249 gal->
DrawLine( base, base + inward * tickLength );
290 aCommit->
Add(
this );
320 int pitch = std::max( mm2, viaSize * 2 );
355 if( !aBoard || !aCommit )
391 if( expectedPos != p )
393 int offsetY = ( ( p.
y % detectPitch ) + detectPitch ) % detectPitch;
400 int row = ( p.
y - offsetY ) / detectPitch;
402 && ( ( row % 2 + 2 ) % 2 != 0 ) ) ? detectPitch / 2 : 0;
405 VECTOR2I( ( ( ( p.
x - xShift ) % detectPitch ) + detectPitch ) % detectPitch,
414 std::vector<PCB_VIA*> existingVias;
419 existingVias.push_back(
static_cast<PCB_VIA*
>( item ) );
422 bool changed =
false;
454 const int64_t guardExcludeRadiusSq = ( (int64_t) pitch / 4 ) * ( pitch / 4 );
467 if( (int64_t) d.
x * d.
x + (int64_t) d.
y * d.
y < guardExcludeRadiusSq )
479 std::map<VECTOR2I, VECTOR2I> desired;
481 for(
const VECTOR2I& cell : placementCells )
483 if( !isExcluded( cell ) )
488 std::map<VECTOR2I, PCB_VIA*> kept;
494 if( desired.count( cell ) && kept.emplace( cell,
via ).second )
502 std::map<VECTOR2I, PCB_VIA*> resurrectable;
510 ref->SetParent( aBoard );
511 ref->SetIsFree(
true );
517 [&](
const PCB_VIA* aVia ) ->
bool
522 return aVia->GetPosition() == ref->GetPosition()
523 && aVia->GetLayer() == ref->GetLayer()
524 && aVia->GetViaType() == ref->GetViaType()
525 && aVia->Padstack() == ref->Padstack()
526 && aVia->GetNetCode() == ref->GetNetCode()
527 && aVia->GetTeardropParams() == ref->GetTeardropParams();
530 for(
const auto& [cell, pt] : desired )
532 auto it = kept.find( cell );
534 if( it != kept.end() )
538 ref->SetPosition( pt );
540 if( matchesRef(
via ) )
544 ref->SetPosition(
via->GetPosition() );
546 if( matchesRef(
via ) )
549 via->SetPosition( pt );
558 auto rit = resurrectable.find( cell );
560 if( rit != resurrectable.end() )
564 ref->SetPosition( pt );
566 if( matchesRef(
via ) )
576 via->ResetUuidDirect();
578 via->SetParent( aBoard );
579 via->SetPosition( pt );
585 via->SetIsFree(
true );
608 props.
set(
"layout",
static_cast<int>(
m_layout ) );
609 props.
set(
"mode",
static_cast<int>(
m_mode ) );
610 props.
set(
"seed",
static_cast<int>(
m_seed ) );
624 props.
set(
"excluded_grid_cells", wxAny( cells ) );
632 props.
set(
"excluded_positions", wxAny(
chain ) );
638 props.
set(
"outline", wxAny(
m_outline.COutline( 0 ) ) );
650 if(
auto layout = aProps.
get_opt<
int>(
"layout" ) )
653 if(
auto mode = aProps.
get_opt<
int>(
"mode" ) )
656 if(
auto seed = aProps.
get_opt<
int>(
"seed" ) )
657 m_seed =
static_cast<uint32_t
>( *seed );
672 if(
auto cells = aProps.
get_opt<std::vector<VECTOR2I>>(
"excluded_grid_cells" ) )
677 for(
int i = 0; i <
chain->PointCount(); ++i )
688 outline->SetClosed(
true );
764 auto roundDiv = [](
int a,
int b ) ->
int
766 return ( a >= 0 ) ? ( a + b / 2 ) / b : -( ( -a + b / 2 ) / b );
799 std::set<VECTOR2I> cells;
815 cacheGenerator.
Run();
830 std::map<PCB_LAYER_ID, SHAPE_POLY_SET> perLayerFills;
834 if( zone->GetIsRuleArea() )
840 if( !zone->GetBoundingBox().Intersects( stitchBBox ) )
849 clipped = zone->GetBoardOutline();
869 perLayerFills[layer].BooleanAdd( clipped );
878 std::vector<const SHAPE_POLY_SET*> viaLayerFills;
882 auto it = perLayerFills.find( layer );
884 if( it != perLayerFills.end() && !it->second.IsEmpty() )
885 viaLayerFills.push_back( &it->second );
889 if( viaLayerFills.size() < 2 )
896 for(
size_t i = 1; i < viaLayerFills.size(); ++i )
904 if( i + 1 < viaLayerFills.size() )
923 const int polyApproxError =
pcbIUScale.mmToIU( 0.005 );
935 probe->SetParent(
const_cast<BOARD*
>( aBoard ) );
942 BOX2I queryBBox = stitchBBox;
943 queryBBox.
Inflate( worstClearance + viaSize );
957 auto evalConstraint =
964 drcEngine->
EvalRules( aType, probe.get(), aOther, aLayer );
976 std::set<BOARD_ITEM*> holeSeen;
978 auto addHoleObstacle =
981 if( !aOther->HasHole() || !holeSeen.insert( aOther ).second )
984 std::shared_ptr<SHAPE_SEGMENT> hole = aOther->GetEffectiveHoleShape();
989 int margin = viaDrill / 2
992 if( !isSameNet( aOther ) )
994 margin = std::max( margin,
1000 hole->GetWidth() + 2 * margin, polyApproxError,
1008 std::set<BOARD_ITEM*> seen;
1013 if( !seen.insert( aOther ).second )
1018 if( aOther->GetParentGroup() ==
static_cast<const EDA_GROUP*
>(
this ) )
1030 addHoleObstacle( aOther, layer );
1032 bool sameNet = isSameNet( aOther );
1041 if( !
pad->FlashLayer( layer ) )
1044 else if( aOther->Type() !=
PCB_VIA_T && sameNet )
1055 margin = std::max( margin,
1060 aOther->TransformShapeToPolygon( obstacles, layer, margin, polyApproxError,
1075 if( !footprint->GetBoundingBox().Intersects( queryBBox ) )
1078 for(
PAD*
pad : footprint->Pads() )
1080 if(
pad->GetBoundingBox().Intersects( queryBBox ) )
1089 if( !zone->GetBoundingBox().Intersects( queryBBox ) )
1092 if( zone->GetIsRuleArea() )
1095 if( !zone->GetDoNotAllowVias() || !( zone->GetLayerSet() & viaCopperLayers ).any() )
1120 if( !fill || fill->
IsEmpty() )
1129 int zoneMargin = std::max(
1156 return allowedRegion.
Contains( pt, -1, 0,
true );
1178 if( !track->GetBoundingBox().Intersects( stitchBBox ) )
1192 const int safetyMargin = polyApproxError +
pcbIUScale.mmToIU( 0.002 );
1193 int margin = viaSize / 2 + requiredClearance + safetyMargin;
1196 track->TransformShapeToPolygon( envelope, layer, margin, polyApproxError,
1201 track->TransformShapeToPolygon( mergedGuarded, layer, 0, polyApproxError,
1227 boost::random::mt19937 seedRng(
m_seed );
1228 boost::random::uniform_real_distribution<double> uniform( 0.0, 1.0 );
1229 const double offsetX = uniform( seedRng ) * tileSize;
1230 const double offsetY = uniform( seedRng ) * tileSize;
1234 const int firstTileX = (int) std::floor( ( bbox.
GetX() - offsetX ) / (
double) tileSize );
1235 const int firstTileY = (int) std::floor( ( bbox.
GetY() - offsetY ) / (
double) tileSize );
1236 const int lastTileX = (int) std::floor( ( bbox.
GetRight() - offsetX ) / (
double) tileSize );
1237 const int lastTileY = (int) std::floor( ( bbox.
GetBottom() - offsetY ) / (
double) tileSize );
1239 for(
int ty = firstTileY; ty <= lastTileY; ++ty )
1241 for(
int tx = firstTileX; tx <= lastTileX; ++tx )
1246 (
int) std::round( offsetX + ( tx + s.x ) * tileSize ),
1247 (
int) std::round( offsetY + ( ty + s.y ) * tileSize ) );
1267 for(
int row = startRow, y = origin.
y; y <= bbox.
GetBottom(); y += pitch, ++row )
1273 for(
int col = startCol, x = origin.
x + xOffset; x <= bbox.
GetRight(); x += pitch, ++col )
1278 cells.insert(
VECTOR2I( col, row ) );
1289 std::vector<ZONE*>
result;
1306 if( zone->GetIsRuleArea() )
1312 if( !zone->GetBoundingBox().Intersects( myBBox ) )
1315 result.push_back( zone );
1329 for(
ZONE* zone : aZones )
1334 if( !zone->GetBoundingBox().Intersects( myBBox ) )
1359 commit.
Push(
_(
"Edit Via Stitching" ) );
1436 bci->SetNetCode( aNetCode );
1460 std::vector<ZONE*> zones;
1465 zones.reserve( aBoard->
Zones().size() );
1468 zones.push_back( zone );
1472 for(
ZONE* zone : footprint->Zones() )
1473 zones.push_back( zone );
1480std::vector<VECTOR2I>
1483 const std::function<
bool(
const VECTOR2I& )>& aIsValid )
1485 std::vector<VECTOR2I> accepted;
1492 const int64_t minDistSq = (int64_t) ( aPitch * 0.7 ) * (int64_t) ( aPitch * 0.7 );
1497 for(
const VECTOR2I& other : accepted )
1501 if( (int64_t) d.
x * d.
x + (int64_t) d.
y * d.
y >= minDistSq )
1517 double nextSample = aPitch / 2.0;
1519 for(
int i = 0; i <
chain.SegmentCount(); ++i )
1527 while( nextSample <=
cursor + segLen )
1529 double t = ( nextSample -
cursor ) / segLen;
1530 VECTOR2I pt( (
int) std::round( seg.
A.
x + t * ( seg.
B.
x - seg.
A.
x ) ),
1531 (
int) std::round( seg.
A.
y + t * ( seg.
B.
y - seg.
A.
y ) ) );
1533 nextSample += aPitch;
1535 if( aIsValid( pt ) && farEnough( pt ) )
1536 accepted.push_back( pt );
1544 walkChain( aEnvelope.
COutline( o ) );
constexpr EDA_IU_SCALE pcbIUScale
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
Container for design settings for a BOARD object.
int GetCurrentViaSize() const
std::shared_ptr< DRC_ENGINE > m_DRCEngine
int GetCurrentViaDrill() const
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
BOARD_ITEM & operator=(const BOARD_ITEM &aOther)
Information pertinent to a Pcbnew printed circuit board.
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
const ZONES & Zones() const
int GetCopperLayerCount() const
const FOOTPRINTS & Footprints() const
const TRACKS & Tracks() const
std::shared_ptr< DRC_RTREE > m_CopperItemRTreeCache
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
constexpr const Vec & GetPosition() const
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
constexpr coord_type GetY() const
constexpr size_type GetWidth() const
constexpr coord_type GetX() const
constexpr size_type GetHeight() const
constexpr coord_type GetLeft() const
constexpr bool Contains(const Vec &aPoint) const
constexpr coord_type GetRight() const
constexpr coord_type GetTop() const
constexpr coord_type GetBottom() const
COMMIT & Remove(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Remove a new item from the model.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Add a new item to the model.
Modal properties editor for a PCB_VIA_STITCH generator.
virtual bool Run() override
Discard the board's run-time DRC caches and regenerate them from scratch.
const MINOPTMAX< int > & GetValue() const
Design Rule Checker object that performs all the DRC tests.
DRC_CONSTRAINT EvalRules(DRC_CONSTRAINT_T aConstraintType, const BOARD_ITEM *a, const BOARD_ITEM *b, PCB_LAYER_ID aLayer, REPORTER *aReporter=nullptr)
bool CheckColliding(SHAPE *aRefShape, PCB_LAYER_ID aTargetLayer, int aClearance=0, std::function< bool(BOARD_ITEM *)> aFilter=nullptr) const
void SetDRCEngine(DRC_ENGINE *engine)
A set of EDA_ITEMs (i.e., without duplicates).
void RemoveItem(EDA_ITEM *aItem)
Remove item from group.
void AddItem(EDA_ITEM *aItem)
Add item to group.
void SetFlags(EDA_ITEM_FLAGS aMask)
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
EDA_ITEM_FLAGS GetFlags() const
static ENUM_MAP< T > & Instance()
Class that other classes need to inherit from, in order to be inspectable.
A color representation with 4 components: red, green, blue, alpha.
Abstract interface for drawing on a 2D-surface.
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
virtual void SetLineWidth(float aLineWidth)
Set the line width.
virtual void DrawPolyline(const std::deque< VECTOR2D > &aPointList)
Draw a polyline.
virtual void SetStrokeColor(const COLOR4D &aColor)
Set the stroke color.
virtual void SetIsStroke(bool aIsStrokeEnabled)
Enable/disable stroked outlines.
virtual void DrawLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a line.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
virtual COLOR4D GetColor(const VIEW_ITEM *aItem, int aLayer) const =0
Returns the color that should be used to draw the specific VIEW_ITEM on the specific layer using curr...
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
GAL * GetGAL() const
Return the GAL this view is using to draw graphical primitives.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
LSET is a set of PCB_LAYER_IDs.
static const LSET & AllCuMask()
return AllCuMask( MAX_CU_LAYERS );
Handle the data for a net.
static constexpr PCB_LAYER_ID ALL_LAYERS
! The layer identifier to use for the single defintion on normal padstacks
static constexpr PCB_LAYER_ID TEMP_ALL_LAYERS
! Temporary layer identifier to identify code that is not padstack-aware
static TOOL_ACTION excludeStitchVia
Exclude selected stitching vias from their parent via-stitch generator.
Common, abstract interface for edit frames.
PCB_GENERATOR_POLY(BOARD_ITEM *aParent, PCB_LAYER_ID aLayer)
virtual void SetProperties(const STRING_ANY_MAP &aProps)
virtual const STRING_ANY_MAP GetProperties() const
std::unordered_set< BOARD_ITEM * > GetBoardItems() const
void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override final
Draw the parts of the object belonging to layer aLayer.
PCB_VIA_STITCH_MODE m_mode
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
~PCB_VIA_STITCH() override
static std::vector< VECTOR2I > SampleGuardEnvelope(const SHAPE_POLY_SET &aEnvelope, const SHAPE_POLY_SET &aGuarded, int aPitch, const std::function< bool(const VECTOR2I &)> &aIsValid)
Determine via positions around the perimeter of a guard envelope.
void EditCancel(GENERATOR_TOOL *, BOARD *, BOARD_COMMIT *) override
void SetTemplateItem(const wxString &aName, std::unique_ptr< BOARD_ITEM > aItem) override
Insert a template item (from board file loading)
std::set< VECTOR2I > m_excludedPositions
void SetGuardedNetCode(int aNetCode)
void SetMode(PCB_VIA_STITCH_MODE aVal)
void EditStart(GENERATOR_TOOL *, BOARD *, BOARD_COMMIT *) override
bool usesGridCells() const
PCB_VIA_STITCH_LAYOUT GetLayout() const
std::vector< ZONE * > GetZonesNeedingRefillAfterUpdate() const override
List of zones that cross out stitch zone, they'll need to be refilled for the punches.
void SetViaSize(int aVal)
std::unique_ptr< PCB_VIA > m_viaTemplate
PCB_VIA_STITCH & operator=(const PCB_VIA_STITCH &aOther)
std::vector< std::pair< wxString, const BOARD_ITEM * > > GetTemplateItems() const override
Named template items used by the generator.
PCB_VIA_STITCH(BOARD_ITEM *aParent=nullptr)
std::unique_ptr< ACTION_MENU > m_childContextMenu
static constexpr uint32_t POISSON_TILE_SEED
Fixed seed for baking the toroidal Poisson pattern.
int defaultPitch(BOARD *aBoard) const
void ShowPropertiesDialog(PCB_BASE_EDIT_FRAME *aEditFrame) override
void ClearAllExclusions()
Drop all manual exclusions.
VECTOR2I cellForPosition(const VECTOR2I &aPos) const
Convert an absolute board position to a (col, row) grid cell index.
void ClearExclusion(const VECTOR2I &aPos)
Remove a board position from the exclusion list for the current layout/mode.
ACTION_MENU * GetChildContextMenu(TOOL_INTERACTIVE *aTool) const override
Get a context menu when interacting with a generator child.
const STRING_ANY_MAP GetProperties() const override
void SetViaDrill(int aVal)
PCB_VIA_STITCH_MODE GetMode() const
std::set< VECTOR2I > buildPlacementCells(BOARD *aBoard) const
Walk the placement grid, run DRC clearance tests, and return the set of (col, row) cells where a via ...
static std::vector< ZONE * > collectAllZones(const BOARD *aBoard)
Grabs all zones we need to consider for via placement.
static const std::vector< VECTOR2D > & bakedPoissonTile()
Helper method to cache the poisson tile we pattern.
VECTOR2I GetPosition() const override
static constexpr int POISSON_TILE_PITCHES
Tile size for the POISSON layout, in units of pitch.
bool Update(GENERATOR_TOOL *, BOARD *, BOARD_COMMIT *) override
int defaultViaSize(BOARD *aBoard) const
int GetGuardedNetCode() const
Net being guarded in GUARD mode.
void SetNetCode(int aNetCode)
static const wxString GENERATOR_TYPE
void EditFinish(GENERATOR_TOOL *, BOARD *, BOARD_COMMIT *) override
int defaultViaDrill(BOARD *aBoard) const
std::set< PCB_VIA * > m_pendingRemovals
void Remove(GENERATOR_TOOL *, BOARD *, BOARD_COMMIT *) override
static const wxString DISPLAY_NAME
wxString m_lastGuardedNetName
void SetProperties(const STRING_ANY_MAP &aProps) override
bool m_lastUpdateChangedVias
void SetLayout(PCB_VIA_STITCH_LAYOUT aVal)
PCB_VIA_STITCH_LAYOUT m_layout
void ExcludePosition(const VECTOR2I &aPos)
Add a board position to the exclusion set so the next Update() skips it.
void OnZoneFillChanged(const std::vector< ZONE * > &aZones) override
Callback to be informed zones have changed.
void SetSeed(uint32_t aVal)
GRID_CONFIG m_childGridConfig
void InitializeDefaults(BOARD *aBoard)
Fill in any unset via-template and pitch values from the board's design settings.
std::set< VECTOR2I > m_excludedCells
VECTOR2I positionForCell(const VECTOR2I &aCell, int aPitch) const
Convert a (col, row) grid cell index to an absolute board position, including any stagger shift on od...
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.
void Mask(TYPE_ID aDerived, TYPE_ID aBase, const wxString &aName)
Sets a base class property as masked in a derived class.
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.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
int PointCount() const
Return the number of points (vertices) in this line chain.
const VECTOR2I & CPoint(int aIndex) const
Return a reference to a given point in the line chain.
Represent a set of closed polygons.
void BooleanAdd(const SHAPE_POLY_SET &b)
Perform boolean polyset union.
bool IsEmpty() const
Return true if the set is empty (no polygons at all)
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,...
void Inflate(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError, bool aSimplify=false)
Perform outline inflation/deflation.
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Appends a vertex at the end of the given outline/hole (default: the last outline)
void Simplify()
Simplify the polyset (merges overlapping polys, eliminates degeneracy/self-intersections)
int NewOutline()
Creates a new empty polygon in the set and returns its index.
void Deflate(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError)
void BooleanIntersection(const SHAPE_POLY_SET &b)
Perform boolean polyset intersection.
void BuildBBoxCaches() const
Construct BBoxCaches for Contains(), below.
int OutlineCount() const
Return the number of outlines in the set.
bool Contains(const VECTOR2I &aP, int aSubpolyIndex=-1, int aAccuracy=0, bool aUseBBoxCaches=false) const
Return true if a given subpolygon contains the point aP.
void BooleanSubtract(const SHAPE_POLY_SET &b)
Perform boolean polyset difference.
const SHAPE_LINE_CHAIN & COutline(int aIndex) const
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 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
T EuclideanNorm() const
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
Handle a list of polygons defining a copper zone.
void TransformOvalToPolygon(SHAPE_POLY_SET &aBuffer, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aWidth, int aError, ERROR_LOC aErrorLoc, int aMinSegCount=0)
Convert a oblong shape to a polygon, using multiple segments.
@ ROUND_ALL_CORNERS
All angles are rounded.
@ HOLE_CLEARANCE_CONSTRAINT
@ HOLE_TO_HOLE_CONSTRAINT
#define IN_EDIT
Item currently edited.
@ LAYER_VIA_STITCHING
Outline of via stitching generators.
PCB_LAYER_ID
A quick note on layer IDs:
std::vector< VECTOR2D > ToroidalUnitTile(double aMinDist, uint32_t aSeed)
Bridson's "Fast Poisson Disk Sampling in Arbitrary Dimensions" with toroidal boundary conditions on t...
static GENERATORS_MGR::REGISTER< PCB_TUNING_PATTERN > registerMe
static struct PCB_VIA_STITCH_DESC _PCB_VIA_STITCH_DESC
@ STITCH
Fill the outline with vias with a pattern.
@ GUARD
Place vias to guard a net contained within.
@ POISSON
Tiled poisson distribution.
@ STAGGERED
Odd rows shifted by half the pitch.
@ PLAIN
Regular row/column grid.
#define ENUM_TO_WXANY(type)
Macro to define read-only fields (no setter method available)
@ PT_SIZE
Size expressed in distance units (mm/inch)
@ PT_NET
Net selection property.
Static helper to register a generator.
Structure to hold the necessary information in order to index a vertex on a SHAPE_POLY_SET object: th...
const SHAPE_LINE_CHAIN chain
wxString result
Test unit parsing edge cases and error handling.
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_PAD_T
class PAD, a pad in a footprint
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D