36#define MAGIC_TEARDROP_PADVIA_NAME "$teardrop_padvia$"
37#define MAGIC_TEARDROP_TRACK_NAME "$teardrop_track$"
100 bool aFollowTracks =
true );
118 void collectVias( std::vector< VIAPAD >& aList )
const;
131 bool aRoundShapesOnly,
132 bool aIncludeNotDrilled )
const;
157 std::vector<VECTOR2I>& aPoly,
160 std::vector<VECTOR2I>& aPts )
const;
169 std::vector<VECTOR2I>& aPoly,
int aTdHeight,
170 int aTrackHalfWidth,
VIAPAD& aViaPad,
171 std::vector<VECTOR2I>& aPts )
const;
179 std::vector<VECTOR2I>& aCorners,
198 std::vector<VECTOR2I>& aPts )
const;
220 std::vector<VECTOR2I>& aPoints,
PCB_TRACK* aTrack)
const;
243 int* aEffectiveTeardropLen,
244 bool aFollowTracks,
TRACK_BUFFER& aTrackLookupList )
const;
281 *aLayer = aIdx & 0xFF;
282 *aNetcode = aIdx >> 8;
289 return ( aNetcode << 8 ) + ( aLayer & 0xFF );
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
virtual bool IsOnLayer(PCB_LAYER_ID aLayer) const
Test to see if this object is on the given layer.
Information pertinent to a Pcbnew printed circuit board.
The main frame for Pcbnew.
TEARDROP_MANAGER manage and build teardrop areas A teardrop area is a polygonal area (a copper ZONE) ...
TEARDROP_MANAGER(BOARD *aBoard, PCB_EDIT_FRAME *aFrame)
void collectTeardrops(std::vector< ZONE * > &aList) const
Build a list of all teardrops on the current board.
void collectVias(std::vector< VIAPAD > &aList) const
Collect and build the list of all vias from the given board.
void collectPadsCandidate(std::vector< VIAPAD > &aList, bool aDrilledViaPad, bool aRoundShapesOnly, bool aIncludeNotDrilled) const
Build a list of pads candidate for teardrops from the given board Pads with no net are not candidate ...
bool findAnchorPointsOnTrack(TEARDROP_PARAMETERS *aCurrParams, VECTOR2I &aStartPoint, VECTOR2I &aEndPoint, PCB_TRACK *&aTrack, VIAPAD &aViaPad, int *aEffectiveTeardropLen, bool aFollowTracks, TRACK_BUFFER &aTrackLookupList) const
void computeCurvedForRoundShape(TEARDROP_PARAMETERS *aCurrParams, std::vector< VECTOR2I > &aPoly, int aTrackHalfWidth, VECTOR2D aTrackDir, VIAPAD &aViaPad, std::vector< VECTOR2I > &aPts) const
Compute the curve part points for teardrops connected to a round shape The Bezier curve control point...
bool isViaAndTrackInSameZone(VIAPAD &aVia, PCB_TRACK *aTrack) const
int SetTeardrops(BOARD_COMMIT *aCommitter, bool aFollowTracks=true)
Set teardrops on a teardrop free board.
void setTeardropPriorities()
Set priority of created teardrops.
int RemoveTeardrops(BOARD_COMMIT *aCommitter, bool aCommitAfterRemove)
Remove all teardrops.
bool computeTeardropPolygonPoints(TEARDROP_PARAMETERS *aCurrParams, std::vector< VECTOR2I > &aCorners, PCB_TRACK *aTrack, VIAPAD &aVia, bool aFollowTracks, TRACK_BUFFER &aTrackLookupList) const
Compute all teardrop points of the polygon shape.
TEARDROP_PARAMETERS_LIST * m_prmsList
std::vector< ZONE * > m_createdTdList
bool ComputePointsOnPadVia(TEARDROP_PARAMETERS *aCurrParams, PCB_TRACK *aTrack, VIAPAD &aViaPad, std::vector< VECTOR2I > &aPts) const
Compute the 2 points on pad/via of the teardrop shape.
ZONE * createTeardrop(TEARDROP_VARIANT aTeardropVariant, std::vector< VECTOR2I > &aPoints, PCB_TRACK *aTrack) const
Creates a teardrop (a ZONE item) from its polygonal shape, track netcode and layer.
PCB_TRACK * findTouchingTrack(EDA_ITEM_FLAGS &aMatchType, PCB_TRACK *aTrackRef, const VECTOR2I &aEndPoint, TRACK_BUFFER &aTrackLookupList) const
Find a track connected to the end of another track.
void computeCurvedForRectShape(TEARDROP_PARAMETERS *aCurrParams, std::vector< VECTOR2I > &aPoly, int aTdHeight, int aTrackHalfWidth, VIAPAD &aViaPad, std::vector< VECTOR2I > &aPts) const
Compute the curve part points for teardrops connected to a rectangular/polygonal shape The Bezier cur...
int addTeardropsOnTracks(BOARD_COMMIT *aCommitter)
Add teardrop on tracks of different sizes connected by their end.
TEARDROP_PARAMETERS_LIST is a helper class to handle the list of TEARDROP_PARAMETERS needed to build ...
TEARDROP_PARAMETARS is a helper class to handle parameters needed to build teardrops for a board thes...
int idxFromLayNet(int aLayer, int aNetcode) const
void AddTrack(PCB_TRACK *aTrack, int aLayer, int aNetcode)
Add a track in buffer, in space grouping tracks having the same netcode and the same layer.
std::map< int, std::vector< PCB_TRACK * > * > m_map_tracks
static void GetNetcodeAndLayerFromIndex(int aIdx, int *aLayer, int *aNetcode)
std::vector< PCB_TRACK * > * GetTrackList(int aLayer, int aNetcode)
std::map< int, std::vector< PCB_TRACK * > * > & GetBuffer()
Handle a list of polygons defining a copper zone.
std::uint32_t EDA_ITEM_FLAGS
PCB_LAYER_ID
A quick note on layer IDs:
Stores info of a pad, via or track end to build a teardrop.
BOARD_CONNECTED_ITEM * m_Parent
bool IsOnLayer(PCB_LAYER_ID aLayer) const