KiCad PCB EDA Suite
Loading...
Searching...
No Matches
via_cross_section_geometry.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
21
22#include <algorithm>
25
26
27// The drawing is laid out on a fixed width grid whose height follows the layer count
28static constexpr double OUTER_TOP = 20.0;
29static constexpr double LAYER_PITCH = 10.0;
30
31static constexpr double COPPER_THICKNESS = 8.0;
32static constexpr double MASK_THICKNESS = 8.0;
33static constexpr double COVER_THICKNESS = 6.0;
34static constexpr double INNER_THICKNESS = 4.0;
35
37// BOARD_LEFT and BOARD_RIGHT are placed slightly off view so that the left and right
38// extremes are clipped, giving the graphic more of a sectional-drawing look.
39static constexpr double BOARD_LEFT = -2.0;
40static constexpr double BOARD_RIGHT = GRID_W + 4.0;
41static constexpr double HOLE_LEFT = GRID_W / 2 - 17.0;
42static constexpr double HOLE_RIGHT = GRID_W / 2 + 17.0;
43static constexpr double BARREL_LEFT = HOLE_LEFT - 5.0;
44static constexpr double BARREL_RIGHT = HOLE_RIGHT + 5.0;
45
46static constexpr double MAX_HALF_WIDTH = 60.0;
47static constexpr double MASK_CLEARANCE = 12.0;
48static constexpr double COVER_OVERHANG = 4.0;
49static constexpr double RING_GAP = 10.0;
50static constexpr double PLUG_DEPTH = 34.0;
51static constexpr double PLUG_ROUND = 12.0;
52
53
59
60
61static int innerLayersOf( const STATE& aState )
62{
63 if( aState.m_LayerDepths.size() >= 2 )
64 return (int) aState.m_LayerDepths.size() - 2;
65
66 return std::max( 0, aState.m_InnerLayers );
67}
68
69
70static double coreHeightFor( int aInnerLayers )
71{
72 return std::max( 76.0, LAYER_PITCH * ( aInnerLayers + 1 ) );
73}
74
75
76static PIECE rect( double aLeft, double aTop, double aRight, double aBottom, bool aMixed = false )
77{
78 PIECE shape;
79 shape.m_Rect = true;
80 shape.m_Points = { { aLeft, aTop }, { aRight, aBottom } };
81 shape.m_Mixed = aMixed;
82 return shape;
83}
84
85
86static PIECE polygon( std::vector<VIA_CROSS_SECTION_GEOMETRY::POINT> aPoints, bool aMixed = false )
87{
88 PIECE shape;
89 shape.m_Rect = false;
90 shape.m_Points = std::move( aPoints );
91 shape.m_Mixed = aMixed;
92 return shape;
93}
94
95
97{
98 return coreHeightFor( aInnerLayers ) + 2 * ( OUTER_TOP + COPPER_THICKNESS );
99}
100
101
103 int aCopperLayerCount )
104{
105 std::vector<int> centres;
106 std::vector<int> thicknesses;
107 int total = 0;
108
109 for( const BOARD_STACKUP_ITEM* item : aStackup.GetList() )
110 {
111 if( !item->IsEnabled() )
112 continue;
113
114 if( item->GetType() == BS_ITEM_TYPE_COPPER )
115 {
116 centres.push_back( total + item->GetThickness() / 2 );
117 thicknesses.push_back( item->GetThickness() );
118 total += item->GetThickness();
119 }
120 else if( item->GetType() == BS_ITEM_TYPE_DIELECTRIC )
121 {
122 for( int i = 0; i < item->GetSublayersCount(); i++ )
123 total += item->GetThickness( i );
124 }
125 }
126
127 aState.m_LayerDepths.clear();
128 aState.m_LayerThicknesses.clear();
129
130 if( total > 0 && (int) centres.size() == aCopperLayerCount )
131 {
132 for( size_t i = 0; i < centres.size(); i++ )
133 {
134 aState.m_LayerDepths.push_back( (double) centres[i] / total );
135 aState.m_LayerThicknesses.push_back( (double) thicknesses[i] / total );
136 }
137 }
138
139 return total;
140}
141
142
149
150
151double VIA_CROSS_SECTION_GEOMETRY::LayerCentre( int aOrdinal ) const
152{
153 return m_layerCentres[std::clamp( aOrdinal, 0, m_innerLayers + 1 )];
154}
155
156
158{
159 return m_bodies[static_cast<size_t>( aMaterial )];
160}
161
162
164{
165 const std::vector<double>& depths = aState.m_LayerDepths;
166 const std::vector<double>& thicknesses = aState.m_LayerThicknesses;
167 const bool realDepths = depths.size() >= 2;
168 const bool realThickness = realDepths && thicknesses.size() == depths.size();
169 const int innerLayers = m_innerLayers;
170 const int lastOrdinal = innerLayers + 1;
171 const double boardHeight = coreHeightFor( innerLayers ) + 2 * COPPER_THICKNESS;
172
173 auto shown = []( const std::optional<bool>& aFlag )
174 {
175 return !aFlag.has_value() || *aFlag;
176 };
177 auto mixed = []( const std::optional<bool>& aFlag )
178 {
179 return !aFlag.has_value();
180 };
181
182 // Copper is drawn at its stackup thickness when known, with a floor so it stays visible
183 // under the outlines at dialog size
184 auto copperThickness = [&]( int aOrdinal, double aFallback )
185 {
186 if( !realThickness )
187 return aFallback;
188
189 return std::max( std::min( 4.0, aFallback ), boardHeight * thicknesses[aOrdinal] );
190 };
191
192 const double outerTop = OUTER_TOP;
193 const double outerBottom = OUTER_TOP + boardHeight;
194 const double coreTop = outerTop + copperThickness( 0, COPPER_THICKNESS );
195 const double coreBottom = outerBottom - copperThickness( lastOrdinal, COPPER_THICKNESS );
196 const double maskTop = outerTop - MASK_THICKNESS;
197 const double maskBottom = outerBottom + MASK_THICKNESS;
198 const double coverTop = maskTop - COVER_THICKNESS;
199 const double coverBottom = maskBottom + COVER_THICKNESS;
200
201 // Widths are multiples of the hole diameter, clamped so the picture always fits. The mask is
202 // applied after backdrilling, so on a backdrilled side the opening surrounds the bore.
203 const double centre = ( HOLE_LEFT + HOLE_RIGHT ) / 2;
204 const double holeHalf = ( HOLE_RIGHT - HOLE_LEFT ) / 2;
205 const double padHalf = std::clamp( holeHalf * aState.m_PadRatio, BARREL_RIGHT - centre + 4, MAX_HALF_WIDTH );
206
207 auto boreHalf = [&]( double aRatio )
208 {
209 return std::clamp( holeHalf * aRatio, holeHalf + 2, MAX_HALF_WIDTH );
210 };
211
212 // Inner layers sit at their real depth when the stackup is known, evenly spaced otherwise
213 m_layerCentres.clear();
214
215 for( int ordinal = 0; ordinal <= lastOrdinal; ordinal++ )
216 {
217 if( ordinal == 0 )
218 {
219 m_layerCentres.push_back( ( outerTop + coreTop ) / 2 );
220 }
221 else if( ordinal == lastOrdinal )
222 {
223 m_layerCentres.push_back( ( coreBottom + outerBottom ) / 2 );
224 }
225 else if( realDepths )
226 {
227 double y = outerTop + boardHeight * depths[ordinal];
228 m_layerCentres.push_back( std::clamp( y, coreTop + INNER_THICKNESS, coreBottom - INNER_THICKNESS ) );
229 }
230 else
231 {
232 m_layerCentres.push_back( coreTop + ( coreBottom - coreTop ) * ordinal / ( innerLayers + 1 ) );
233 }
234 }
235
236 auto layerCentre = [&]( int aOrdinal )
237 {
238 return LayerCentre( aOrdinal );
239 };
240
241 double spacing = coreBottom - coreTop;
242
243 for( int i = 0; i <= innerLayers; i++ )
244 spacing = std::min( spacing, layerCentre( i + 1 ) - layerCentre( i ) );
245
246 auto innerThickness = [&]( int aOrdinal )
247 {
248 return copperThickness( aOrdinal, std::clamp( spacing / 2, 1.0, INNER_THICKNESS ) );
249 };
250
251 // A surface the via does not reach has no pad and nothing done to the hole there
252 const int viaTopOrdinal = std::clamp( aState.m_TopLayer, 0, lastOrdinal );
253 const int viaBottomOrdinal = std::clamp( aState.m_BottomLayer.value_or( lastOrdinal ), viaTopOrdinal, lastOrdinal );
254 const bool reachesFront = viaTopOrdinal == 0;
255 const bool reachesBack = viaBottomOrdinal == lastOrdinal;
256 const double viaTop = reachesFront ? outerTop : layerCentre( viaTopOrdinal ) - innerThickness( viaTopOrdinal ) / 2;
257 const double viaBottom =
258 reachesBack ? outerBottom : layerCentre( viaBottomOrdinal ) + innerThickness( viaBottomOrdinal ) / 2;
259
260 auto hasRing = [&]( int aOrdinal )
261 {
262 const std::vector<bool>& rings = aState.m_RingLayers;
263 return rings.size() != (size_t) lastOrdinal + 1 || rings[aOrdinal];
264 };
265
266 const bool throughVia = reachesFront && reachesBack;
267 const int frontRemoved = throughVia ? std::clamp( aState.m_BackdrillFrontLayers.value_or( 0 ), 0, lastOrdinal ) : 0;
268 const int backRemoved = throughVia ? std::clamp( aState.m_BackdrillBackLayers.value_or( 0 ), 0, lastOrdinal ) : 0;
269
270 const bool frontBored = frontRemoved > 0;
271 const bool backBored = backRemoved > 0;
272 const double frontBoreHalf = boreHalf( aState.m_BackdrillFrontWidthRatio );
273 const double backBoreHalf = boreHalf( aState.m_BackdrillBackWidthRatio );
274 const double frontOpenHalf = std::max( padHalf, frontBored ? frontBoreHalf : 0.0 ) + MASK_CLEARANCE;
275 const double backOpenHalf = std::max( padHalf, backBored ? backBoreHalf : 0.0 ) + MASK_CLEARANCE;
276
277 // A backdrill takes the pad and the barrel with it and a fab wants mask clearance around
278 // the bore, so nothing is drawn over it
279 const bool frontOpen = reachesFront && !frontBored;
280 const bool backOpen = reachesBack && !backBored;
281
282 // The features a fab can build together, with a mixed value taken as present
283 const bool filled = shown( aState.m_Filled );
284 const bool capped = shown( aState.m_Capped ) && VIA_PROTECTION_RULES::CapAllowed( filled );
285 const bool plugFront = shown( aState.m_PlugFront ) && VIA_PROTECTION_RULES::PlugAllowed( filled );
286 const bool plugBack = shown( aState.m_PlugBack ) && VIA_PROTECTION_RULES::PlugAllowed( filled );
287 const bool coverFront = shown( aState.m_CoverFront )
288 && VIA_PROTECTION_RULES::CoverAllowed( filled, shown( aState.m_TentFront ), plugFront );
289 const bool coverBack = shown( aState.m_CoverBack )
290 && VIA_PROTECTION_RULES::CoverAllowed( filled, shown( aState.m_TentBack ), plugBack );
291
292 // Backdrills reach from the cover surface to half way between the last removed layer and
293 // the first one kept
294 m_bores.clear();
295
296 if( frontBored )
297 {
298 double depth = ( layerCentre( frontRemoved - 1 ) + layerCentre( frontRemoved ) ) / 2;
299 m_bores.push_back( rect( centre - frontBoreHalf, coverTop, centre + frontBoreHalf, depth ) );
300 }
301
302 if( backBored )
303 {
304 int last = innerLayers + 1 - backRemoved;
305 double depth = ( layerCentre( last ) + layerCentre( last + 1 ) ) / 2;
306 m_bores.push_back( rect( centre - backBoreHalf, depth, centre + backBoreHalf, coverBottom ) );
307 }
308
309 // Widths are multiples of the hole diameter, depth is a fraction of the board, drawn against
310 // the real layer positions
311 m_cuts.clear();
312
313 auto postMachining = [&]( const POST_MACHINING& aCut, bool aFront )
314 {
315 if( !aCut.m_Mode.has_value() )
316 return;
317
318 const double halfWidth = std::clamp( holeHalf * aCut.m_WidthRatio, holeHalf, MAX_HALF_WIDTH );
319 const double depth = std::clamp( boardHeight * aCut.m_DepthFraction, 2.0, boardHeight - 2 );
320 const double surface = aFront ? outerTop : outerBottom;
321 const double edge = aFront ? coverTop - 2 : coverBottom + 2;
322 const double floor = aFront ? surface + depth : surface - depth;
323
324 switch( *aCut.m_Mode )
325 {
327 m_cuts.push_back(
328 rect( centre - halfWidth, std::min( edge, floor ), centre + halfWidth, std::max( edge, floor ) ) );
329 break;
330
332 m_cuts.push_back( polygon( { { centre - halfWidth, edge },
333 { centre + halfWidth, edge },
334 { centre + halfWidth, surface },
335 { centre + holeHalf, floor },
336 { centre - holeHalf, floor },
337 { centre - halfWidth, surface } } ) );
338 break;
339
340 default: break;
341 }
342 };
343
344 if( reachesFront )
345 postMachining( aState.m_PostMachiningFront, true );
346
347 if( reachesBack )
348 postMachining( aState.m_PostMachiningBack, false );
349
350 m_bodies.clear();
351
352 auto body = [&]( MATERIAL aMaterial, CLIP aClip ) -> std::vector<PIECE>&
353 {
354 m_bodies.push_back( { aMaterial, aClip, {} } );
355 return m_bodies.back().m_Pieces;
356 };
357
358 auto tentShape = [&]( bool aFront, bool aMixed )
359 {
360 if( aFront )
361 return rect( centre - frontOpenHalf, maskTop, centre + frontOpenHalf, outerTop, aMixed );
362 else
363 return rect( centre - backOpenHalf, outerBottom, centre + backOpenHalf, maskBottom, aMixed );
364 };
365
366 // Solder mask sits on the outer copper with an opening around the pad. A tent bridges it.
367 // The mask is painted first, so the copper's outline lands on the mask and not the reverse.
368 {
369 std::vector<PIECE>& mask = body( MATERIAL::SOLDER_MASK, CLIP::OVER_MASK );
370
371 if( reachesFront )
372 {
373 mask.push_back( rect( BOARD_LEFT, maskTop, centre - frontOpenHalf, outerTop ) );
374 mask.push_back( rect( centre + frontOpenHalf, maskTop, BOARD_RIGHT, outerTop ) );
375
376 if( frontOpen && shown( aState.m_TentFront ) )
377 mask.push_back( tentShape( true, mixed( aState.m_TentFront ) ) );
378 }
379 else
380 {
381 mask.push_back( rect( BOARD_LEFT, maskTop, BOARD_RIGHT, outerTop ) );
382 }
383
384 if( reachesBack )
385 {
386 mask.push_back( rect( BOARD_LEFT, outerBottom, centre - backOpenHalf, maskBottom ) );
387 mask.push_back( rect( centre + backOpenHalf, outerBottom, BOARD_RIGHT, maskBottom ) );
388
389 if( backOpen && shown( aState.m_TentBack ) )
390 mask.push_back( tentShape( false, mixed( aState.m_TentBack ) ) );
391 }
392 else
393 {
394 mask.push_back( rect( BOARD_LEFT, outerBottom, BOARD_RIGHT, maskBottom ) );
395 }
396 }
397
398 {
399 std::vector<PIECE>& core = body( MATERIAL::CORE, CLIP::UNDER_MASK );
400
401 core.push_back( rect( BOARD_LEFT, coreTop, BARREL_LEFT, coreBottom ) );
402 core.push_back( rect( BARREL_RIGHT, coreTop, BOARD_RIGHT, coreBottom ) );
403
404 if( !reachesFront )
405 core.push_back( rect( BARREL_LEFT, coreTop, BARREL_RIGHT, viaTop ) );
406
407 if( !reachesBack )
408 core.push_back( rect( BARREL_LEFT, viaBottom, BARREL_RIGHT, coreBottom ) );
409
410 // A buried hole fills with laminate resin at lamination, it is never left empty
411 if( !reachesFront && !reachesBack && !filled )
412 core.push_back( rect( HOLE_LEFT, viaTop, HOLE_RIGHT, viaBottom ) );
413 }
414
415 // Plugs are rounded blobs from each side. A fill supersedes them and stops at a cap. They
416 // are painted before the copper so the cap's outline lands on the fill, not the reverse.
417 auto plugShape = [&]( bool aFront, bool aMixed )
418 {
419 const double mouth = aFront ? viaTop : viaBottom;
420 const double flat = aFront ? std::min( viaTop + PLUG_DEPTH, viaBottom - PLUG_ROUND - 2 )
421 : std::max( viaBottom - PLUG_DEPTH, viaTop + PLUG_ROUND + 2 );
422 const double tip = aFront ? flat + PLUG_ROUND : flat - PLUG_ROUND;
423
424 std::vector<POINT> pts = { { HOLE_LEFT, mouth }, { HOLE_RIGHT, mouth }, { HOLE_RIGHT, flat } };
425
426 for( int i = 1; i < 8; i++ )
427 {
428 double t = i / 8.0;
429 double x = ( 1 - t ) * ( 1 - t ) * HOLE_RIGHT + 2 * ( 1 - t ) * t * centre + t * t * HOLE_LEFT;
430 double y = ( 1 - t ) * ( 1 - t ) * flat + 2 * ( 1 - t ) * t * tip + t * t * flat;
431 pts.push_back( { x, y } );
432 }
433
434 pts.push_back( { HOLE_LEFT, flat } );
435 return polygon( std::move( pts ), aMixed );
436 };
437
438 {
439 std::vector<PIECE>& plug = body( MATERIAL::PLUG, CLIP::UNDER_MASK );
440
441 if( filled )
442 {
443 plug.push_back( rect( HOLE_LEFT, capped && frontOpen ? coreTop : viaTop, HOLE_RIGHT,
444 capped && backOpen ? coreBottom : viaBottom, mixed( aState.m_Filled ) ) );
445 }
446 else
447 {
448 if( frontOpen && plugFront )
449 plug.push_back( plugShape( true, mixed( aState.m_PlugFront ) ) );
450
451 if( backOpen && plugBack )
452 plug.push_back( plugShape( false, mixed( aState.m_PlugBack ) ) );
453 }
454 }
455
456 // The outer layers, the plated barrel, the inner rings and a cap are one copper body. The
457 // outer layers are full copper, with the hole through them only where the via reaches them.
458 {
459 std::vector<PIECE>& copper = body( MATERIAL::COPPER, CLIP::UNDER_MASK );
460
461 if( reachesFront )
462 {
463 copper.push_back( rect( BOARD_LEFT, outerTop, BARREL_LEFT, coreTop ) );
464 copper.push_back( rect( BARREL_RIGHT, outerTop, BOARD_RIGHT, coreTop ) );
465 }
466 else
467 {
468 copper.push_back( rect( BOARD_LEFT, outerTop, BOARD_RIGHT, coreTop ) );
469 }
470
471 if( reachesBack )
472 {
473 copper.push_back( rect( BOARD_LEFT, coreBottom, BARREL_LEFT, outerBottom ) );
474 copper.push_back( rect( BARREL_RIGHT, coreBottom, BOARD_RIGHT, outerBottom ) );
475 }
476 else
477 {
478 copper.push_back( rect( BOARD_LEFT, coreBottom, BOARD_RIGHT, outerBottom ) );
479 }
480
481 copper.push_back( rect( BARREL_LEFT, viaTop, HOLE_LEFT, viaBottom ) );
482 copper.push_back( rect( HOLE_RIGHT, viaTop, BARREL_RIGHT, viaBottom ) );
483
484 // An inner layer outside the span runs across, one without a ring keeps clear
485 for( int i = 1; i <= innerLayers; i++ )
486 {
487 double t = innerThickness( i );
488 double y = layerCentre( i ) - t / 2;
489
490 if( i < viaTopOrdinal || i > viaBottomOrdinal )
491 {
492 copper.push_back( rect( BOARD_LEFT, y, BOARD_RIGHT, y + t ) );
493 }
494 else
495 {
496 double gap = hasRing( i ) ? 0.0 : RING_GAP;
497 copper.push_back( rect( BOARD_LEFT, y, BARREL_LEFT - gap, y + t ) );
498 copper.push_back( rect( BARREL_RIGHT + gap, y, BOARD_RIGHT, y + t ) );
499 }
500 }
501
502 if( capped )
503 {
504 if( frontOpen )
505 copper.push_back( rect( BARREL_LEFT, outerTop, BARREL_RIGHT, coreTop, mixed( aState.m_Capped ) ) );
506
507 if( backOpen )
508 copper.push_back(
509 rect( BARREL_LEFT, coreBottom, BARREL_RIGHT, outerBottom, mixed( aState.m_Capped ) ) );
510 }
511 }
512
513 // A cover is a second coat over the tent. Over a plug or a fill on an untented side it
514 // bridges the opening itself.
515 auto coverShape = [&]( bool aFront, bool aMixed )
516 {
517 if( aFront )
518 {
519 return rect( centre - frontOpenHalf - COVER_OVERHANG, coverTop, centre + frontOpenHalf + COVER_OVERHANG,
520 maskTop, aMixed );
521 }
522 else
523 {
524 return rect( centre - backOpenHalf - COVER_OVERHANG, maskBottom, centre + backOpenHalf + COVER_OVERHANG,
525 coverBottom, aMixed );
526 }
527 };
528
529 {
530 std::vector<PIECE>& cover = body( MATERIAL::COVER, CLIP::OVER_MASK );
531
532 if( frontOpen && coverFront )
533 {
534 cover.push_back( coverShape( true, mixed( aState.m_CoverFront ) ) );
535
536 if( !aState.m_TentFront.value_or( false ) )
537 cover.push_back( tentShape( true, mixed( aState.m_CoverFront ) ) );
538 }
539
540 if( backOpen && coverBack )
541 {
542 cover.push_back( coverShape( false, mixed( aState.m_CoverBack ) ) );
543
544 if( !aState.m_TentBack.value_or( false ) )
545 cover.push_back( tentShape( false, mixed( aState.m_CoverBack ) ) );
546 }
547 }
548}
@ BS_ITEM_TYPE_COPPER
@ BS_ITEM_TYPE_DIELECTRIC
Manage one layer needed to make a physical board.
Manage layers needed to make a physical board.
const std::vector< BOARD_STACKUP_ITEM * > & GetList() const
Base material class that can be used to derive other material implementations.
Definition material.h:236
double LayerCentre(int aOrdinal) const
Grid height of the centre of a copper layer, by ordinal.
CLIP
What is clipped out of a body.
static double GridHeightFor(int aInnerLayers)
Grid height for a board with the given number of inner copper layers.
const BODY & Body(MATERIAL aMaterial) const
MATERIAL
The materials, in the order they are painted.
static int SetLayersFromStackup(STATE &aState, const BOARD_STACKUP &aStackup, int aCopperLayerCount)
Fill the layer depths and thicknesses from a stackup, or leave them empty when it does not match the ...
bool PlugAllowed(bool aFilled)
A plug is a partial fill from one side. A filled hole has nothing left to plug.
bool CoverAllowed(bool aFilled, bool aTented, bool aPlugged)
A cover is a second coat over a tent, a plug or a fill.
bool CapAllowed(bool aFilled)
A cap is copper plated over a filled hole, so it needs the fill.
bool m_Rect
A rectangle holds its top left and bottom right corners, a polygon its outline.
std::optional< PAD_DRILL_POST_MACHINING_MODE > m_Mode
std::vector< bool > m_RingLayers
Which spanned copper layers keep an annular ring. Empty means all of them.
std::vector< double > m_LayerDepths
Depth of each copper layer centre and its thickness, as fractions of the board thickness,...
int m_TopLayer
Copper layers the via spans, as ordinals where 0 is the front layer and the inner count plus one is t...
std::optional< int > m_BackdrillFrontLayers
Copper layers removed from that side by the backdrill, 0 for no backdrill, and the backdrill diameter...
double m_PadRatio
Pad diameter over hole diameter.
static constexpr double GRID_W
VIA_CROSS_SECTION_GEOMETRY::STATE STATE
static constexpr double MASK_CLEARANCE
static constexpr double MASK_THICKNESS
static constexpr double COVER_OVERHANG
static constexpr double PLUG_DEPTH
static constexpr double INNER_THICKNESS
static constexpr double RING_GAP
static constexpr double OUTER_TOP
static constexpr double BARREL_RIGHT
VIA_CROSS_SECTION_GEOMETRY::PIECE PIECE
static PIECE rect(double aLeft, double aTop, double aRight, double aBottom, bool aMixed=false)
VIA_CROSS_SECTION_GEOMETRY::BODY BODY
static constexpr double LAYER_PITCH
static constexpr double HOLE_RIGHT
static constexpr double BARREL_LEFT
static constexpr double PLUG_ROUND
static constexpr double MAX_HALF_WIDTH
static int innerLayersOf(const STATE &aState)
static double coreHeightFor(int aInnerLayers)
static constexpr double COPPER_THICKNESS
static constexpr double HOLE_LEFT
VIA_CROSS_SECTION_GEOMETRY::CLIP CLIP
static constexpr double BOARD_RIGHT
static PIECE polygon(std::vector< VIA_CROSS_SECTION_GEOMETRY::POINT > aPoints, bool aMixed=false)
static constexpr double BOARD_LEFT
static constexpr double COVER_THICKNESS