KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pns_meander_placer_base.h
Go to the documentation of this file.
1/*
2 * KiRouter - a push-and-(sometimes-)shove PCB router
3 *
4 * Copyright (C) 2013-2015 CERN
5 * Copyright (C) 2016-2021 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * @author Tomasz Wlostowski <[email protected]>
8 *
9 * This program is free software: you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation, either version 3 of the License, or (at your
12 * option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23#ifndef __PNS_MEANDER_PLACER_BASE_H
24#define __PNS_MEANDER_PLACER_BASE_H
25
26#include <math/vector2d.h>
27
29
30#include "pns_node.h"
31#include "pns_line.h"
32#include "pns_placement_algo.h"
33#include "pns_meander.h"
34
35namespace PNS {
36
37class ROUTER;
38class SHOVE;
39class OPTIMIZER;
40
46{
47public:
52 TUNED
53 };
54
55 MEANDER_PLACER_BASE( ROUTER* aRouter );
56 virtual ~MEANDER_PLACER_BASE();
57
61 virtual long long int TuningResult() const = 0;
62
66 virtual TUNING_STATUS TuningStatus() const = 0;
67
73 virtual void AmplitudeStep( int aSign );
74
80 virtual void SpacingStep( int aSign );
81
87 virtual int Clearance();
88
94 virtual const MEANDER_SETTINGS& MeanderSettings() const;
95
96 /*
97 * Set the current meandering configuration.
98 *
99 * @param aSettings the settings.
100 */
101 virtual void UpdateSettings( const MEANDER_SETTINGS& aSettings);
102
110 virtual bool CheckFit( MEANDER_SHAPE* aShape )
111 {
112 return false;
113 }
114
115 int GetTotalPadToDieLength( const LINE& aLine ) const;
116
117 virtual const ITEM_SET TunedPath() = 0;
118
119protected:
124 void tuneLineLength( MEANDERED_LINE& aTuned, long long int aElongation );
125
126 VECTOR2I getSnappedStartPoint( LINKED_ITEM* aStartItem, VECTOR2I aStartPoint );
127
133 long long int lineLength( const ITEM_SET& aLine, const SOLID* aStartPad, const SOLID* aEndPad ) const;
134
137
140
143
146
151};
152
153}
154
155#endif // __PNS_MEANDER_PLACER_BASE_H
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
Definition: pns_line.h:62
Represent a set of meanders fitted over a single or two lines.
Definition: pns_meander.h:425
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)
void tuneLineLength(MEANDERED_LINE &aTuned, long long int aElongation)
Take a set of meanders in aTuned and tunes their length to extend the original line length by aElonga...
TUNING_STATUS
< Result of the length tuning operation
virtual void SpacingStep(int aSign)
Increase/decrease the current meandering spacing by one step.
int m_currentWidth
Meander settings.
virtual bool CheckFit(MEANDER_SHAPE *aShape)
Checks if it's OK to place the shape aShape (i.e.
MEANDER_SETTINGS m_settings
The current end point.
virtual int Clearance()
Return the clearance of the track(s) being length tuned.
virtual const ITEM_SET TunedPath()=0
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.
NODE * m_world
Width of the meandered trace(s).
VECTOR2I getSnappedStartPoint(LINKED_ITEM *aStartItem, VECTOR2I aStartPoint)
long long int lineLength(const ITEM_SET &aLine, const SOLID *aStartPad, const SOLID *aEndPad) const
Calculate the total length of the line represented by an item set (tracks and vias)
int GetTotalPadToDieLength(const LINE &aLine) const
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.
Definition: pns_meander.h:68
The geometry of a single meander.
Definition: pns_meander.h:128
Keep the router "world" - i.e.
Definition: pns_node.h:231
Push and Shove diff pair dimensions (gap) settings dialog.