22#ifndef __PNS_PLACEMENT_ALGO_H
23#define __PNS_PLACEMENT_ALGO_H
73 virtual std::optional<VECTOR2I>
UnfixRoute() {
return std::nullopt; };
ALGO_BASE(ROUTER *aRouter)
Base class for PNS router board items.
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
Keep the router "world" - i.e.
virtual NODE * CurrentNode(bool aLoopsRemoved=false) const =0
Return the most recent board state.
virtual bool removeLoops(NODE *aNode, LINE &aLatest)
virtual bool IsPlacingVia() const
Return true if the placer is placing a via (or more vias).
virtual bool CommitPlacement()
virtual void FlipPosture()
Toggle the current posture (straight/diagonal) of the trace head.
virtual const VECTOR2I & CurrentEnd() const =0
Return the current end of the line(s) being placed/tuned.
virtual const ITEM_SET Traces()=0
Return all routed/tuned traces.
virtual bool Start(const VECTOR2I &aP, ITEM *aStartItem)=0
Start placement/drag operation at point aP, taking item aStartItem as anchor (unless NULL).
virtual ~PLACEMENT_ALGO()
virtual bool HasPlacedAnything() const
PLACEMENT_ALGO(ROUTER *aRouter)
virtual bool simplifyNewLine(NODE *aNode, LINKED_ITEM *aLatest)
Assemble a line starting from segment or arc aLatest, removes collinear segments and redundant vertic...
virtual bool AbortPlacement()
virtual bool Move(const VECTOR2I &aP, ITEM *aEndItem)=0
Move the end of the currently routed primtive(s) to the point aP, taking aEndItem as the anchor (if n...
virtual const VECTOR2I & CurrentStart() const =0
Return the current start of the line(s) being placed/tuned.
virtual int CurrentLayer() const =0
Return the layer of currently routed track.
virtual void SetOrthoMode(bool aOrthoMode)
Force the router to place a straight 90/45 degree trace (with the end as near to the cursor as possib...
virtual void GetModifiedNets(std::vector< NET_HANDLE > &aNets) const
Return the nets of all currently routed trace(s)
virtual const std::vector< NET_HANDLE > CurrentNets() const =0
Returns the net(s) of currently routed track(s).
virtual bool ToggleVia(bool aEnabled)
Enable/disable a via at the end of currently routed trace.
virtual std::optional< VECTOR2I > UnfixRoute()
virtual bool SetLayer(int aLayer)
Set the current routing layer.
virtual void UpdateSizes(const SIZES_SETTINGS &aSizes)
Perform on-the-fly update of the width, via diameter & drill size from a settings class.
virtual bool FixRoute(const VECTOR2I &aP, ITEM *aEndItem, bool aForceFinish=false)=0
Commit the currently routed items to the parent node, taking aP as the final end point and aEndItem a...
Push and Shove diff pair dimensions (gap) settings dialog.
VECTOR2< int32_t > VECTOR2I