KiCad PCB EDA Suite
Loading...
Searching...
No Matches
odb_feature.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 * Author: SYSUEric <[email protected]>.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#include "odb_feature.h"
22
23#include <sstream>
24#include <map>
25
26#include <wx/log.h>
27
28#include "pcb_shape.h"
29#include "odb_defines.h"
30#include "pcb_track.h"
31#include "pcb_textbox.h"
32#include "pcb_table.h"
33#include "zone.h"
34#include "board.h"
36#include "geometry/eda_angle.h"
37#include "odb_eda_data.h"
38#include "pcb_io_odbpp.h"
39#include <callback_gal.h>
40#include <string_utils.h>
41
42
43void FEATURES_MANAGER::AddFeatureLine( const VECTOR2I& aStart, const VECTOR2I& aEnd,
44 uint64_t aWidth )
45{
46 AddFeature<ODB_LINE>( ODB::AddXY( aStart ), ODB::AddXY( aEnd ),
48}
49
50
51void FEATURES_MANAGER::AddFeatureArc( const VECTOR2I& aStart, const VECTOR2I& aEnd,
52 const VECTOR2I& aCenter, uint64_t aWidth,
53 ODB_DIRECTION aDirection )
54{
55 AddFeature<ODB_ARC>( ODB::AddXY( aStart ), ODB::AddXY( aEnd ), ODB::AddXY( aCenter ),
56 AddCircleSymbol( ODB::SymDouble2String( aWidth ) ), aDirection );
57}
58
59
60void FEATURES_MANAGER::AddPadCircle( const VECTOR2I& aCenter, uint64_t aDiameter,
61 const EDA_ANGLE& aAngle, bool aMirror,
62 double aResize /*= 1.0 */ )
63{
65 AddCircleSymbol( ODB::SymDouble2String( aDiameter ) ), aAngle, aMirror,
66 aResize );
67}
68
69
70bool FEATURES_MANAGER::AddContour( const SHAPE_POLY_SET& aPolySet, int aOutline /*= 0*/,
71 FILL_T aFillType /*= FILL_T::FILLED_SHAPE*/ )
72{
73 // todo: args modify aPolySet.Polygon( aOutline ) instead of aPolySet
74
75 if( aPolySet.OutlineCount() < ( aOutline + 1 ) )
76 return false;
77
78 AddFeatureSurface( aPolySet.Polygon( aOutline ), aFillType );
79
80 return true;
81}
82
83
85{
86 int stroke_width = aShape.GetWidth();
87
88 switch( aShape.GetShape() )
89 {
90 case SHAPE_T::CIRCLE:
91 {
92 int diameter = aShape.GetRadius() * 2;
94 wxString innerDim = ODB::SymDouble2String( ( diameter - stroke_width / 2 ) );
95 wxString outerDim = ODB::SymDouble2String( ( stroke_width + diameter ) );
96
97 if( aShape.IsSolidFill() )
99 else
100 AddFeature<ODB_PAD>( ODB::AddXY( center ), AddRoundDonutSymbol( outerDim, innerDim ) );
101
102 break;
103 }
104
106 {
107 int width = std::abs( aShape.GetRectangleWidth() ) + stroke_width;
108 int height = std::abs( aShape.GetRectangleHeight() ) + stroke_width;
109 wxString rad = ODB::SymDouble2String( ( stroke_width / 2.0 ) );
111
112 if( aShape.IsSolidFill() )
113 {
116 ODB::SymDouble2String( height ), rad ) );
117 }
118 else
119 {
122 ODB::SymDouble2String( height ),
123 ODB::SymDouble2String( stroke_width ),
124 rad ) );
125 }
126
127 break;
128 }
129
130 case SHAPE_T::POLY:
131 {
132 int soldermask_min_thickness = 0;
133
134 // TODO: check if soldermask_min_thickness should be Stroke width
135
136 if( aLayer != UNDEFINED_LAYER && LSET( { F_Mask, B_Mask } ).Contains( aLayer ) )
137 soldermask_min_thickness = stroke_width;
138
139 int maxError = m_board->GetDesignSettings().m_MaxError;
140 SHAPE_POLY_SET poly_set;
141
142 if( soldermask_min_thickness == 0 )
143 {
144 poly_set = aShape.GetPolyShape().CloneDropTriangulation();
145 poly_set.Fracture();
146 }
147 else
148 {
149 SHAPE_POLY_SET initialPolys;
150
151 // add shapes inflated by aMinThickness/2 in areas
152 aShape.TransformShapeToPolygon( initialPolys, aLayer, 0, maxError, ERROR_OUTSIDE );
153 aShape.TransformShapeToPolygon( poly_set, aLayer, soldermask_min_thickness / 2 - 1,
154 maxError, ERROR_OUTSIDE );
155
156 poly_set.Simplify();
157 poly_set.Deflate( soldermask_min_thickness / 2 - 1,
159 poly_set.BooleanAdd( initialPolys );
160 poly_set.Fracture();
161 }
162
163 // ODB++ surface features can only represent closed polygons. We add a surface for
164 // the fill of the shape, if present, and add line segments for the outline, if present.
165 if( aShape.IsSolidFill() )
166 {
167 for( int ii = 0; ii < poly_set.OutlineCount(); ++ii )
168 {
169 AddContour( poly_set, ii, FILL_T::FILLED_SHAPE );
170
171 if( stroke_width != 0 )
172 {
173 for( int jj = 0; jj < poly_set.COutline( ii ).SegmentCount(); ++jj )
174 {
175 const SEG& seg = poly_set.COutline( ii ).CSegment( jj );
176 AddFeatureLine( seg.A, seg.B, stroke_width );
177 }
178 }
179 }
180 }
181 else
182 {
183 for( int ii = 0; ii < poly_set.OutlineCount(); ++ii )
184 {
185 for( int jj = 0; jj < poly_set.COutline( ii ).SegmentCount(); ++jj )
186 {
187 const SEG& seg = poly_set.COutline( ii ).CSegment( jj );
188 AddFeatureLine( seg.A, seg.B, stroke_width );
189 }
190 }
191 }
192
193 break;
194 }
195
196 case SHAPE_T::ARC:
197 {
199
200 AddFeatureArc( aShape.GetStart(), aShape.GetEnd(), aShape.GetCenter(), stroke_width, dir );
201 break;
202 }
203
204 case SHAPE_T::BEZIER:
205 {
206 const std::vector<VECTOR2I>& points = aShape.GetBezierPoints();
207
208 for( size_t i = 0; i < points.size() - 1; i++ )
209 AddFeatureLine( points[i], points[i + 1], stroke_width );
210
211 break;
212 }
213
214 case SHAPE_T::SEGMENT:
215 AddFeatureLine( aShape.GetStart(), aShape.GetEnd(), stroke_width );
216 break;
217
218 default:
219 wxLogError( wxT( "Unknown shape when adding ODB++ layer feature" ) );
220 break;
221 }
222
223 if( aShape.IsHatchedFill() )
224 {
225 for( int ii = 0; ii < aShape.GetHatching().OutlineCount(); ++ii )
227 }
228}
229
230
232 FILL_T aFillType /*= FILL_T::FILLED_SHAPE */ )
233{
234 AddFeature<ODB_SURFACE>( aPolygon, aFillType );
235}
236
237
239{
240 FOOTPRINT* fp = aPad.GetParentFootprint();
241 bool mirror = false;
242
243 if( aPad.GetOrientation() != ANGLE_0 )
244 {
245 if( fp && fp->IsFlipped() )
246 mirror = true;
247 }
248
249 int maxError = m_board->GetDesignSettings().m_MaxError;
250
251 VECTOR2I expansion{ 0, 0 };
252
253 if( aLayer != UNDEFINED_LAYER && LSET( { F_Mask, B_Mask } ).Contains( aLayer ) )
254 expansion.x = expansion.y = aPad.GetSolderMaskExpansion( aLayer );
255
256 if( aLayer != UNDEFINED_LAYER && LSET( { F_Paste, B_Paste } ).Contains( aLayer ) )
257 expansion = aPad.GetSolderPasteMargin( aLayer );
258
259 int mask_clearance = expansion.x;
260
261 VECTOR2I plotSize = aPad.GetSize( aLayer ) + 2 * expansion;
262
263 VECTOR2I center = aPad.ShapePos( aLayer );
264
265 wxString width = ODB::SymDouble2String( std::abs( plotSize.x ) );
266 wxString height = ODB::SymDouble2String( std::abs( plotSize.y ) );
267
268 switch( aPad.GetShape( aLayer ) )
269 {
271 {
272 wxString diam = ODB::SymDouble2String( plotSize.x );
273
275 mirror );
276
277 break;
278 }
280 {
281 if( mask_clearance > 0 )
282 {
283 wxString rad = ODB::SymDouble2String( mask_clearance );
284
285 AddFeature<ODB_PAD>( ODB::AddXY( center ), AddRoundRectSymbol( width, height, rad ),
286 aPad.GetOrientation(), mirror );
287 }
288 else
289 {
291 aPad.GetOrientation(), mirror );
292 }
293
294 break;
295 }
296 case PAD_SHAPE::OVAL:
297 {
299 aPad.GetOrientation(), mirror );
300 break;
301 }
303 {
304 wxString rad = ODB::SymDouble2String( aPad.GetRoundRectCornerRadius( aLayer ) );
305
306 AddFeature<ODB_PAD>( ODB::AddXY( center ), AddRoundRectSymbol( width, height, rad ),
307 aPad.GetOrientation(), mirror );
308
309 break;
310 }
312 {
313 int shorterSide = std::min( plotSize.x, plotSize.y );
314 int chamfer = std::max(
315 0, KiROUND( aPad.GetChamferRectRatio( aLayer ) * shorterSide ) );
316 wxString rad = ODB::SymDouble2String( chamfer );
317 int positions = aPad.GetChamferPositions( aLayer );
318
320 AddChamferRectSymbol( width, height, rad, positions ),
321 aPad.GetOrientation(), mirror );
322
323 break;
324 }
326 {
327 SHAPE_POLY_SET outline;
328
329 aPad.TransformShapeToPolygon( outline, aLayer, 0, maxError, ERROR_INSIDE );
330
331 // Shape polygon can have holes so use InflateWithLinkedHoles(), not Inflate()
332 // which can create bad shapes if margin.x is < 0
333
334 if( mask_clearance )
335 {
337 maxError );
338 }
339
340 for( int ii = 0; ii < outline.OutlineCount(); ++ii )
341 AddContour( outline, ii );
342
343 break;
344 }
346 {
347 SHAPE_POLY_SET shape;
348 aPad.MergePrimitivesAsPolygon( aLayer, &shape );
349
350 // as for custome shape, odb++ don't rotate the polygon,
351 // so we rotate the polygon in kicad anticlockwise
352
353 shape.Rotate( aPad.GetOrientation() );
354 shape.Move( center );
355
356 if( expansion != VECTOR2I( 0, 0 ) )
357 {
358 shape.InflateWithLinkedHoles( std::max( expansion.x, expansion.y ),
360 }
361
362 for( int ii = 0; ii < shape.OutlineCount(); ++ii )
363 AddContour( shape, ii );
364
365 break;
366 }
367 default: wxLogError( wxT( "Unknown pad type" ) ); break;
368 }
369}
370
371
372void FEATURES_MANAGER::InitFeatureList( PCB_LAYER_ID aLayer, std::vector<BOARD_ITEM*>& aItems )
373{
374 auto add_track = [&]( PCB_TRACK* track )
375 {
376 auto iter = GetODBPlugin()->GetViaTraceSubnetMap().find( track );
377
378 if( iter == GetODBPlugin()->GetViaTraceSubnetMap().end() )
379 {
380 wxLogError( wxT( "Failed to get subnet track data" ) );
381 return;
382 }
383
384 auto subnet = iter->second;
385
386 if( track->Type() == PCB_TRACE_T )
387 {
388 PCB_SHAPE shape( nullptr, SHAPE_T::SEGMENT );
389 shape.SetStart( track->GetStart() );
390 shape.SetEnd( track->GetEnd() );
391 shape.SetWidth( track->GetWidth() );
392
393 AddShape( shape );
394 subnet->AddFeatureID( EDA_DATA::FEATURE_ID::TYPE::COPPER, m_layerName,
395 m_featuresList.size() - 1 );
396 }
397 else if( track->Type() == PCB_ARC_T )
398 {
399 PCB_ARC* arc = static_cast<PCB_ARC*>( track );
400 PCB_SHAPE shape( nullptr, SHAPE_T::ARC );
401 shape.SetArcGeometry( arc->GetStart(), arc->GetMid(), arc->GetEnd() );
402 shape.SetWidth( arc->GetWidth() );
403
404 AddShape( shape );
405
406 subnet->AddFeatureID( EDA_DATA::FEATURE_ID::TYPE::COPPER, m_layerName,
407 m_featuresList.size() - 1 );
408 }
409 else
410 {
411 // add via
412 PCB_VIA* via = static_cast<PCB_VIA*>( track );
413
414 bool hole = false;
415
416 if( aLayer != PCB_LAYER_ID::UNDEFINED_LAYER )
417 {
418 hole = m_layerName.Contains( "plugging" );
419 }
420 else
421 {
422 hole = m_layerName.Contains( "drill" ) || m_layerName.Contains( "filling" )
423 || m_layerName.Contains( "capping" );
424 }
425
426 if( hole )
427 {
428 AddViaDrillHole( via, aLayer );
429 subnet->AddFeatureID( EDA_DATA::FEATURE_ID::TYPE::HOLE, m_layerName,
430 m_featuresList.size() - 1 );
431
432 // TODO: confirm TOOLING_HOLE
433 // AddSystemAttribute( *m_featuresList.back(), ODB_ATTR::PAD_USAGE::TOOLING_HOLE );
434
435 if( !m_featuresList.empty() )
436 {
439 *m_featuresList.back(),
440 ODB_ATTR::GEOMETRY{ "VIA_RoundD" + std::to_string( via->GetWidth( aLayer ) ) } );
441 }
442 }
443 else
444 {
445 // to draw via copper shape on copper layer
446 AddVia( via, aLayer );
447 subnet->AddFeatureID( EDA_DATA::FEATURE_ID::TYPE::COPPER, m_layerName,
448 m_featuresList.size() - 1 );
449
450 if( !m_featuresList.empty() )
451 {
454 *m_featuresList.back(),
455 ODB_ATTR::GEOMETRY{ "VIA_RoundD" + std::to_string( via->GetWidth( aLayer ) ) } );
456 }
457 }
458 }
459 };
460
461 auto add_zone = [&]( ZONE* zone )
462 {
463 SHAPE_POLY_SET zone_shape = zone->GetFilledPolysList( aLayer )->CloneDropTriangulation();
464
465 for( int ii = 0; ii < zone_shape.OutlineCount(); ++ii )
466 {
467 AddContour( zone_shape, ii );
468
469 auto iter = GetODBPlugin()->GetPlaneSubnetMap().find( std::make_pair( aLayer, zone ) );
470
471 if( iter == GetODBPlugin()->GetPlaneSubnetMap().end() )
472 {
473 wxLogError( wxT( "Failed to get subnet plane data" ) );
474 return;
475 }
476
477 iter->second->AddFeatureID( EDA_DATA::FEATURE_ID::TYPE::COPPER, m_layerName,
478 m_featuresList.size() - 1 );
479
480 if( zone->IsTeardropArea() && !m_featuresList.empty() )
481 AddSystemAttribute( *m_featuresList.back(), ODB_ATTR::TEAR_DROP{ true } );
482 }
483 };
484
485 auto add_text = [&]( BOARD_ITEM* item )
486 {
487 EDA_TEXT* text_item = nullptr;
488
489 if( PCB_TEXT* tmp_text = dynamic_cast<PCB_TEXT*>( item ) )
490 text_item = static_cast<EDA_TEXT*>( tmp_text );
491 else if( PCB_TEXTBOX* tmp_text = dynamic_cast<PCB_TEXTBOX*>( item ) )
492 text_item = static_cast<EDA_TEXT*>( tmp_text );
493
494 if( !text_item || !text_item->IsVisible() || text_item->GetShownText( false ).empty() )
495 return;
496
497 auto plot_text = [&]( const VECTOR2I& aPos, const wxString& aTextString,
498 const TEXT_ATTRIBUTES& aAttributes, KIFONT::FONT* aFont,
499 const KIFONT::METRICS& aFontMetrics )
500 {
502
503 TEXT_ATTRIBUTES attributes = aAttributes;
504 int penWidth = attributes.m_StrokeWidth;
505
506 if( penWidth == 0 && attributes.m_Bold ) // Use default values if aPenWidth == 0
507 penWidth =
508 GetPenSizeForBold( std::min( attributes.m_Size.x, attributes.m_Size.y ) );
509
510 if( penWidth < 0 )
511 penWidth = -penWidth;
512
513 attributes.m_StrokeWidth = penWidth;
514
515 std::list<VECTOR2I> pts;
516
517 auto push_pts = [&]()
518 {
519 if( pts.size() < 2 )
520 return;
521
522 // Polylines are only allowed for more than 3 points.
523 // Otherwise, we have to use a line
524
525 if( pts.size() < 3 )
526 {
527 PCB_SHAPE shape( nullptr, SHAPE_T::SEGMENT );
528 shape.SetStart( pts.front() );
529 shape.SetEnd( pts.back() );
530 shape.SetWidth( attributes.m_StrokeWidth );
531
532 AddShape( shape );
534 ODB_ATTR::STRING{ aTextString.ToStdString() } );
535 }
536 else
537 {
538 for( auto it = pts.begin(); std::next( it ) != pts.end(); ++it )
539 {
540 auto it2 = std::next( it );
541 PCB_SHAPE shape( nullptr, SHAPE_T::SEGMENT );
542 shape.SetStart( *it );
543 shape.SetEnd( *it2 );
544 shape.SetWidth( attributes.m_StrokeWidth );
545 AddShape( shape );
546
547 if( !m_featuresList.empty() )
548 {
550 ODB_ATTR::STRING{ aTextString.ToStdString() } );
551 }
552 }
553 }
554
555 pts.clear();
556 };
557
558 CALLBACK_GAL callback_gal(
559 empty_opts,
560 // Stroke callback
561 [&]( const VECTOR2I& aPt1, const VECTOR2I& aPt2 )
562 {
563 if( !pts.empty() )
564 {
565 if( aPt1 == pts.back() )
566 pts.push_back( aPt2 );
567 else if( aPt2 == pts.front() )
568 pts.push_front( aPt1 );
569 else if( aPt1 == pts.front() )
570 pts.push_front( aPt2 );
571 else if( aPt2 == pts.back() )
572 pts.push_back( aPt1 );
573 else
574 {
575 push_pts();
576 pts.push_back( aPt1 );
577 pts.push_back( aPt2 );
578 }
579 }
580 else
581 {
582 pts.push_back( aPt1 );
583 pts.push_back( aPt2 );
584 }
585 },
586 // Polygon callback
587 [&]( const SHAPE_LINE_CHAIN& aPoly )
588 {
589 if( aPoly.PointCount() < 3 )
590 return;
591
592 SHAPE_POLY_SET poly_set;
593 poly_set.AddOutline( aPoly );
594
595 for( int ii = 0; ii < poly_set.OutlineCount(); ++ii )
596 {
597 AddContour( poly_set, ii, FILL_T::FILLED_SHAPE );
598
599 if( !m_featuresList.empty() )
600 {
602 ODB_ATTR::STRING{ aTextString.ToStdString() } );
603 }
604 }
605 } );
606
607 aFont->Draw( &callback_gal, aTextString, aPos, aAttributes, aFontMetrics );
608
609 if( !pts.empty() )
610 push_pts();
611 };
612
613 bool isKnockout = false;
614
615 if( item->Type() == PCB_TEXT_T || item->Type() == PCB_FIELD_T )
616 isKnockout = static_cast<PCB_TEXT*>( item )->IsKnockout();
617 else if( item->Type() == PCB_TEXTBOX_T )
618 isKnockout = static_cast<PCB_TEXTBOX*>( item )->IsKnockout();
619
620 const KIFONT::METRICS& fontMetrics = item->GetFontMetrics();
621 KIFONT::FONT* font = text_item->GetDrawFont( nullptr );
622 wxString shownText( text_item->GetShownText( true ) );
623
624 if( shownText.IsEmpty() )
625 return;
626
627 VECTOR2I pos = text_item->GetTextPos();
628
629 TEXT_ATTRIBUTES attrs = text_item->GetAttributes();
630 attrs.m_StrokeWidth = text_item->GetEffectiveTextPenWidth();
631 attrs.m_Angle = text_item->GetDrawRotation();
632 attrs.m_Multiline = false;
633
634 if( isKnockout )
635 {
636 PCB_TEXT* text = static_cast<PCB_TEXT*>( item );
637 SHAPE_POLY_SET finalpolyset;
638
639 text->TransformTextToPolySet( finalpolyset, 0, m_board->GetDesignSettings().m_MaxError,
640 ERROR_INSIDE );
641 finalpolyset.Fracture();
642
643 for( int ii = 0; ii < finalpolyset.OutlineCount(); ++ii )
644 {
645 AddContour( finalpolyset, ii, FILL_T::FILLED_SHAPE );
646
647 if( !m_featuresList.empty() )
648 {
650 ODB_ATTR::STRING{ shownText.ToStdString() } );
651 }
652 }
653 }
654 else if( text_item->IsMultilineAllowed() )
655 {
656 std::vector<VECTOR2I> positions;
657 wxArrayString strings_list;
658 wxStringSplit( shownText, strings_list, '\n' );
659 positions.reserve( strings_list.Count() );
660
661 text_item->GetLinePositions( nullptr, positions, strings_list.Count() );
662
663 for( unsigned ii = 0; ii < strings_list.Count(); ii++ )
664 {
665 wxString& txt = strings_list.Item( ii );
666 plot_text( positions[ii], txt, attrs, font, fontMetrics );
667 }
668 }
669 else
670 {
671 plot_text( pos, shownText, attrs, font, fontMetrics );
672 }
673 };
674
675
676 auto add_shape = [&]( PCB_SHAPE* shape )
677 {
678 // FOOTPRINT* fp = shape->GetParentFootprint();
679 AddShape( *shape, aLayer );
680 };
681
682 auto add_pad = [&]( PAD* pad )
683 {
684 auto iter = GetODBPlugin()->GetPadSubnetMap().find( pad );
685
686 if( iter == GetODBPlugin()->GetPadSubnetMap().end() )
687 {
688 wxLogError( wxT( "Failed to get subnet top data" ) );
689 return;
690 }
691
692 if( aLayer != PCB_LAYER_ID::UNDEFINED_LAYER )
693 {
694 // FOOTPRINT* fp = pad->GetParentFootprint();
695
696 AddPadShape( *pad, aLayer );
697
698 iter->second->AddFeatureID( EDA_DATA::FEATURE_ID::TYPE::COPPER, m_layerName,
699 m_featuresList.size() - 1 );
700 if( !m_featuresList.empty() )
702
703 if( !pad->HasHole() && !m_featuresList.empty() )
704 AddSystemAttribute( *m_featuresList.back(), ODB_ATTR::SMD{ true } );
705 }
706 else
707 {
708 // drill layer round hole or slot hole
709 if( m_layerName.Contains( "drill" ) )
710 {
711 // here we exchange round hole or slot hole into pad to draw in drill layer
712 PAD dummy( *pad );
713 dummy.Padstack().SetMode( PADSTACK::MODE::NORMAL );
714
715 if( pad->GetDrillSizeX() == pad->GetDrillSizeY() )
716 dummy.SetShape( PADSTACK::ALL_LAYERS, PAD_SHAPE::CIRCLE ); // round hole shape
717 else
718 dummy.SetShape( PADSTACK::ALL_LAYERS, PAD_SHAPE::OVAL ); // slot hole shape
719
720 dummy.SetOffset( PADSTACK::ALL_LAYERS,
721 VECTOR2I( 0, 0 ) ); // use hole position not pad position
722 dummy.SetSize( PADSTACK::ALL_LAYERS, pad->GetDrillSize() );
723
724 AddPadShape( dummy, aLayer );
725
726 if( pad->GetAttribute() == PAD_ATTRIB::PTH )
727 {
728 // only plated holes link to subnet
729 iter->second->AddFeatureID( EDA_DATA::FEATURE_ID::TYPE::HOLE, m_layerName,
730 m_featuresList.size() - 1 );
731
732 if( !m_featuresList.empty() )
734 }
735 else
736 {
737 if( !m_featuresList.empty() )
739 }
740 }
741 }
742 // AddSystemAttribute( *m_featuresList.back(),
743 // ODB_ATTR::GEOMETRY{ "PAD_xxxx" } );
744 };
745
746 for( BOARD_ITEM* item : aItems )
747 {
748 switch( item->Type() )
749 {
750 case PCB_TRACE_T:
751 case PCB_ARC_T:
752 case PCB_VIA_T:
753 add_track( static_cast<PCB_TRACK*>( item ) );
754 break;
755
756 case PCB_ZONE_T:
757 add_zone( static_cast<ZONE*>( item ) );
758 break;
759
760 case PCB_PAD_T:
761 add_pad( static_cast<PAD*>( item ) );
762 break;
763
764 case PCB_SHAPE_T:
765 add_shape( static_cast<PCB_SHAPE*>( item ) );
766 break;
767
768 case PCB_TEXT_T:
769 case PCB_FIELD_T:
770 add_text( item );
771 break;
772
773 case PCB_TEXTBOX_T:
774 add_text( item );
775
776 if( static_cast<PCB_TEXTBOX*>( item )->IsBorderEnabled() )
777 add_shape( static_cast<PCB_TEXTBOX*>( item ) );
778
779 break;
780
781 case PCB_TABLE_T:
782 {
783 PCB_TABLE* table = static_cast<PCB_TABLE*>( item );
784
785 for( PCB_TABLECELL* cell : table->GetCells() )
786 add_text( cell );
787
788 table->DrawBorders(
789 [&]( const VECTOR2I& aPt1, const VECTOR2I& aPt2, const STROKE_PARAMS& aStroke )
790 {
791 int lineWidth = aStroke.GetWidth();
792
793 if( lineWidth > 0 )
794 AddFeatureLine( aPt1, aPt2, lineWidth );
795 } );
796
797 break;
798 }
799
800 case PCB_DIMENSION_T:
801 case PCB_TARGET_T:
803 case PCB_DIM_LEADER_T:
804 case PCB_DIM_CENTER_T:
805 case PCB_DIM_RADIAL_T:
807 //TODO: Add support for dimensions
808 break;
809
810 case PCB_BARCODE_T:
811 //TODO: Add support for barcodes
812 break;
813
814 default:
815 break;
816 }
817 }
818}
819
820
822{
823 if( !aVia->FlashLayer( aLayer ) )
824 return;
825
826 PAD dummy( nullptr ); // default pad shape is circle
827 dummy.SetPadstack( aVia->Padstack() );
828 dummy.SetPosition( aVia->GetStart() );
829
830 AddPadShape( dummy, aLayer );
831}
832
833
835{
836 PAD dummy( nullptr ); // default pad shape is circle
837 int hole = aVia->GetDrillValue();
838 dummy.SetPosition( aVia->GetStart() );
839 dummy.SetSize( PADSTACK::ALL_LAYERS, VECTOR2I( hole, hole ) );
840
841 AddPadShape( dummy, aLayer );
842}
843
844
845void FEATURES_MANAGER::GenerateProfileFeatures( std::ostream& ost ) const
846{
847 ost << "UNITS=" << PCB_IO_ODBPP::m_unitsStr << std::endl;
848 ost << "#\n#Num Features\n#" << std::endl;
849 ost << "F " << m_featuresList.size() << std::endl;
850
851 if( m_featuresList.empty() )
852 return;
853
854 ost << "#\n#Layer features\n#" << std::endl;
855
856 for( const auto& feat : m_featuresList )
857 {
858 feat->WriteFeatures( ost );
859 }
860}
861
862
863void FEATURES_MANAGER::GenerateFeatureFile( std::ostream& ost ) const
864{
865 ost << "UNITS=" << PCB_IO_ODBPP::m_unitsStr << std::endl;
866 ost << "#\n#Num Features\n#" << std::endl;
867 ost << "F " << m_featuresList.size() << std::endl << std::endl;
868
869 if( m_featuresList.empty() )
870 return;
871
872 ost << "#\n#Feature symbol names\n#" << std::endl;
873
874 for( const auto& [n, name] : m_allSymMap )
875 {
876 ost << "$" << n << " " << name << std::endl;
877 }
878
879 WriteAttributes( ost );
880
881 ost << "#\n#Layer features\n#" << std::endl;
882
883 for( const auto& feat : m_featuresList )
884 {
885 feat->WriteFeatures( ost );
886 }
887}
888
889
890void ODB_FEATURE::WriteFeatures( std::ostream& ost )
891{
892 switch( GetFeatureType() )
893 {
894 case FEATURE_TYPE::LINE: ost << "L "; break;
895
896 case FEATURE_TYPE::ARC: ost << "A "; break;
897
898 case FEATURE_TYPE::PAD: ost << "P "; break;
899
900 case FEATURE_TYPE::SURFACE: ost << "S "; break;
901 default: return;
902 }
903
904 WriteRecordContent( ost );
905 ost << std::endl;
906}
907
908
909void ODB_LINE::WriteRecordContent( std::ostream& ost )
910{
911 ost << m_start.first << " " << m_start.second << " " << m_end.first << " " << m_end.second
912 << " " << m_symIndex << " P 0";
913
914 WriteAttributes( ost );
915}
916
917
918void ODB_ARC::WriteRecordContent( std::ostream& ost )
919{
920 ost << m_start.first << " " << m_start.second << " " << m_end.first << " " << m_end.second
921 << " " << m_center.first << " " << m_center.second << " " << m_symIndex << " P 0 "
922 << ( m_direction == ODB_DIRECTION::CW ? "Y" : "N" );
923
924 WriteAttributes( ost );
925}
926
927
928void ODB_PAD::WriteRecordContent( std::ostream& ost )
929{
930 ost << m_center.first << " " << m_center.second << " ";
931
932 // TODO: support resize symbol
933 // ost << "-1" << " " << m_symIndex << " "
934 // << m_resize << " P 0 ";
935
936 ost << m_symIndex << " P 0 ";
937
938 if( m_mirror )
939 ost << "9 " << ODB::Double2String( m_angle.Normalize().AsDegrees() );
940 else
941 ost << "8 " << ODB::Double2String( ( ANGLE_360 - m_angle ).Normalize().AsDegrees() );
942
943 WriteAttributes( ost );
944}
945
946
947ODB_SURFACE::ODB_SURFACE( uint32_t aIndex, const SHAPE_POLY_SET::POLYGON& aPolygon,
948 FILL_T aFillType /*= FILL_T::FILLED_SHAPE*/ ) : ODB_FEATURE( aIndex )
949{
950 if( !aPolygon.empty() && aPolygon[0].PointCount() >= 3 )
951 {
952 m_surfaces = std::make_unique<ODB_SURFACE_DATA>( aPolygon );
953 if( aFillType != FILL_T::NO_FILL )
954 {
955 m_surfaces->AddPolygonHoles( aPolygon );
956 }
957 }
958 else
959 {
960 delete this;
961 }
962}
963
964
965void ODB_SURFACE::WriteRecordContent( std::ostream& ost )
966{
967 ost << "P 0";
968 WriteAttributes( ost );
969 ost << std::endl;
970 m_surfaces->WriteData( ost );
971 ost << "SE";
972}
973
974
976{
977 const std::vector<VECTOR2I>& pts = aPolygon[0].CPoints();
978 if( !pts.empty() )
979 {
980 if( m_polygons.empty() )
981 {
982 m_polygons.resize( 1 );
983 }
984
985 m_polygons.at( 0 ).reserve( pts.size() );
986 m_polygons.at( 0 ).emplace_back( pts.back() );
987
988 for( size_t jj = 0; jj < pts.size(); ++jj )
989 {
990 m_polygons.at( 0 ).emplace_back( pts.at( jj ) );
991 }
992 }
993}
994
995
997{
998 for( size_t ii = 1; ii < aPolygon.size(); ++ii )
999 {
1000 wxCHECK2( aPolygon[ii].PointCount() >= 3, continue );
1001
1002 const std::vector<VECTOR2I>& hole = aPolygon[ii].CPoints();
1003
1004 if( hole.empty() )
1005 continue;
1006
1007 if( m_polygons.size() <= ii )
1008 {
1009 m_polygons.resize( ii + 1 );
1010
1011 m_polygons[ii].reserve( hole.size() );
1012 }
1013
1014 m_polygons.at( ii ).emplace_back( hole.back() );
1015
1016 for( size_t jj = 0; jj < hole.size(); ++jj )
1017 {
1018 m_polygons.at( ii ).emplace_back( hole[jj] );
1019 }
1020 }
1021}
1022
1023
1024void ODB_SURFACE_DATA::WriteData( std::ostream& ost ) const
1025{
1026 ODB::CHECK_ONCE is_island;
1027
1028 for( const auto& contour : m_polygons )
1029 {
1030 if( contour.empty() )
1031 continue;
1032
1033 ost << "OB " << ODB::AddXY( contour.back().m_end ).first << " "
1034 << ODB::AddXY( contour.back().m_end ).second << " ";
1035
1036 if( is_island() )
1037 ost << "I";
1038 else
1039 ost << "H";
1040 ost << std::endl;
1041
1042 for( const auto& line : contour )
1043 {
1044 if( SURFACE_LINE::LINE_TYPE::SEGMENT == line.m_type )
1045 ost << "OS " << ODB::AddXY( line.m_end ).first << " "
1046 << ODB::AddXY( line.m_end ).second << std::endl;
1047 else
1048 ost << "OC " << ODB::AddXY( line.m_end ).first << " "
1049 << ODB::AddXY( line.m_end ).second << " " << ODB::AddXY( line.m_center ).first
1050 << " " << ODB::AddXY( line.m_center ).second << " "
1051 << ( line.m_direction == ODB_DIRECTION::CW ? "Y" : "N" ) << std::endl;
1052 }
1053 ost << "OE" << std::endl;
1054 }
1055}
const char * name
@ ERROR_OUTSIDE
@ ERROR_INSIDE
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
Definition box2.h:990
void WriteAttributes(std::ostream &ost, const std::string &prefix="") const
void AddSystemAttribute(Tr &r, Ta v)
void WriteAttributes(std::ostream &ost) const
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:83
FOOTPRINT * GetParentFootprint() const
const SHAPE_POLY_SET & GetHatching() const
Definition eda_shape.h:148
int GetRectangleWidth() const
SHAPE_POLY_SET & GetPolyShape()
Definition eda_shape.h:337
int GetRadius() const
SHAPE_T GetShape() const
Definition eda_shape.h:169
bool IsHatchedFill() const
Definition eda_shape.h:124
bool IsSolidFill() const
Definition eda_shape.h:117
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
Definition eda_shape.h:216
void SetStart(const VECTOR2I &aStart)
Definition eda_shape.h:178
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
Definition eda_shape.h:174
const std::vector< VECTOR2I > & GetBezierPoints() const
Definition eda_shape.h:321
void SetEnd(const VECTOR2I &aEnd)
Definition eda_shape.h:220
void SetArcGeometry(const VECTOR2I &aStart, const VECTOR2I &aMid, const VECTOR2I &aEnd)
Set the three controlling points for an arc.
int GetRectangleHeight() const
bool IsClockwiseArc() const
void SetWidth(int aWidth)
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition eda_text.h:80
const VECTOR2I & GetTextPos() const
Definition eda_text.h:273
bool IsMultilineAllowed() const
Definition eda_text.h:197
virtual bool IsVisible() const
Definition eda_text.h:187
virtual EDA_ANGLE GetDrawRotation() const
Definition eda_text.h:379
virtual KIFONT::FONT * GetDrawFont(const RENDER_SETTINGS *aSettings) const
Definition eda_text.cpp:659
const TEXT_ATTRIBUTES & GetAttributes() const
Definition eda_text.h:231
int GetEffectiveTextPenWidth(int aDefaultPenWidth=0) const
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultPenWidth.
Definition eda_text.cpp:477
void GetLinePositions(const RENDER_SETTINGS *aSettings, std::vector< VECTOR2I > &aPositions, int aLineCount) const
Populate aPositions with the position of each line of a multiline text, according to the vertical jus...
Definition eda_text.cpp:923
virtual wxString GetShownText(bool aAllowExtraText, int aDepth=0) const
Return the string actually shown after processing of the base text.
Definition eda_text.h:109
void AddPadShape(const PAD &aPad, PCB_LAYER_ID aLayer)
uint32_t AddRoundRectDonutSymbol(const wxString &aOuterWidth, const wxString &aOuterHeight, const wxString &aLineWidth, const wxString &aRadius)
void AddShape(const PCB_SHAPE &aShape, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
uint32_t AddRectSymbol(const wxString &aWidth, const wxString &aHeight)
void AddVia(const PCB_VIA *aVia, PCB_LAYER_ID aLayer)
PCB_IO_ODBPP * GetODBPlugin()
void InitFeatureList(PCB_LAYER_ID aLayer, std::vector< BOARD_ITEM * > &aItems)
void AddFeatureLine(const VECTOR2I &aStart, const VECTOR2I &aEnd, uint64_t aWidth)
void AddFeatureArc(const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aCenter, uint64_t aWidth, ODB_DIRECTION aDirection)
std::map< uint32_t, wxString > m_allSymMap
void GenerateFeatureFile(std::ostream &ost) const
void AddViaDrillHole(const PCB_VIA *aVia, PCB_LAYER_ID aLayer)
void AddPadCircle(const VECTOR2I &aCenter, uint64_t aDiameter, const EDA_ANGLE &aAngle, bool aMirror, double aResize=1.0)
void AddFeatureSurface(const SHAPE_POLY_SET::POLYGON &aPolygon, FILL_T aFillType=FILL_T::FILLED_SHAPE)
uint32_t AddRoundRectSymbol(const wxString &aWidth, const wxString &aHeight, const wxString &aRadius)
wxString m_layerName
uint32_t AddOvalSymbol(const wxString &aWidth, const wxString &aHeight)
void GenerateProfileFeatures(std::ostream &ost) const
std::list< std::unique_ptr< ODB_FEATURE > > m_featuresList
void AddFeature(Args &&... args)
uint32_t AddCircleSymbol(const wxString &aDiameter)
Definition odb_feature.h:95
uint32_t AddChamferRectSymbol(const wxString &aWidth, const wxString &aHeight, const wxString &aRadius, int aPositions)
uint32_t AddRoundDonutSymbol(const wxString &aOuterDim, const wxString &aInnerDim)
bool AddContour(const SHAPE_POLY_SET &aPolySet, int aOutline=0, FILL_T aFillType=FILL_T::FILLED_SHAPE)
bool IsFlipped() const
Definition footprint.h:524
FONT is an abstract base class for both outline and stroke fonts.
Definition font.h:131
LSET is a set of PCB_LAYER_IDs.
Definition lset.h:37
bool Contains(PCB_LAYER_ID aLayer) const
See if the layer set contains a PCB layer.
Definition lset.h:63
std::pair< wxString, wxString > m_end
std::pair< wxString, wxString > m_start
uint32_t m_symIndex
virtual void WriteRecordContent(std::ostream &ost) override
ODB_DIRECTION m_direction
std::pair< wxString, wxString > m_center
virtual void WriteRecordContent(std::ostream &ost)=0
virtual void WriteFeatures(std::ostream &ost)
virtual FEATURE_TYPE GetFeatureType()=0
ODB_FEATURE(uint32_t aIndex)
virtual void WriteRecordContent(std::ostream &ost) override
std::pair< wxString, wxString > m_start
std::pair< wxString, wxString > m_end
uint32_t m_symIndex
uint32_t m_symIndex
virtual void WriteRecordContent(std::ostream &ost) override
bool m_mirror
EDA_ANGLE m_angle
std::pair< wxString, wxString > m_center
void WriteData(std::ostream &ost) const
std::vector< std::vector< SURFACE_LINE > > m_polygons
ODB_SURFACE_DATA(const SHAPE_POLY_SET::POLYGON &aPolygon)
void AddPolygonHoles(const SHAPE_POLY_SET::POLYGON &aPolygon)
std::unique_ptr< ODB_SURFACE_DATA > m_surfaces
virtual void WriteRecordContent(std::ostream &ost) override
ODB_SURFACE(uint32_t aIndex, const SHAPE_POLY_SET::POLYGON &aPolygon, FILL_T aFillType=FILL_T::FILLED_SHAPE)
@ NORMAL
Shape is the same on all layers.
Definition padstack.h:171
static constexpr PCB_LAYER_ID ALL_LAYERS
! Temporary layer identifier to identify code that is not padstack-aware
Definition padstack.h:177
Definition pad.h:55
void MergePrimitivesAsPolygon(PCB_LAYER_ID aLayer, SHAPE_POLY_SET *aMergedPolygon, ERROR_LOC aErrorLoc=ERROR_INSIDE) const
Merge all basic shapes to a SHAPE_POLY_SET.
Definition pad.cpp:3139
int GetRoundRectCornerRadius(PCB_LAYER_ID aLayer) const
Definition pad.cpp:859
PAD_SHAPE GetShape(PCB_LAYER_ID aLayer) const
Definition pad.h:196
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aMaxError, ERROR_LOC aErrorLoc=ERROR_INSIDE, bool ignoreLineWidth=false) const override
Convert the pad shape to a closed polygon.
Definition pad.cpp:2472
int GetSolderMaskExpansion(PCB_LAYER_ID aLayer) const
Definition pad.cpp:1603
EDA_ANGLE GetOrientation() const
Return the rotation angle of the pad.
Definition pad.h:420
int GetChamferPositions(PCB_LAYER_ID aLayer) const
Definition pad.h:834
double GetChamferRectRatio(PCB_LAYER_ID aLayer) const
Definition pad.h:817
VECTOR2I GetSolderPasteMargin(PCB_LAYER_ID aLayer) const
Usually < 0 (mask shape smaller than pad)because the margin can be dependent on the pad size,...
Definition pad.cpp:1658
VECTOR2I ShapePos(PCB_LAYER_ID aLayer) const
Definition pad.cpp:1502
const VECTOR2I & GetSize(PCB_LAYER_ID aLayer) const
Definition pad.h:264
const VECTOR2I & GetMid() const
Definition pcb_track.h:347
std::map< std::pair< PCB_LAYER_ID, ZONE * >, EDA_DATA::SUB_NET_PLANE * > & GetPlaneSubnetMap()
std::map< PCB_TRACK *, EDA_DATA::SUB_NET * > & GetViaTraceSubnetMap()
std::map< const PAD *, EDA_DATA::SUB_NET_TOEPRINT * > & GetPadSubnetMap()
static std::string m_unitsStr
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
Definition pcb_shape.h:81
int GetWidth() const override
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const override
Convert the shape to a closed polygon.
const VECTOR2I & GetStart() const
Definition pcb_track.h:154
const VECTOR2I & GetEnd() const
Definition pcb_track.h:151
virtual int GetWidth() const
Definition pcb_track.h:148
bool FlashLayer(int aLayer) const
Check to see whether the via should have a pad on the specific layer.
const PADSTACK & Padstack() const
Definition pcb_track.h:463
int GetDrillValue() const
Calculate the drill value for vias (m_drill if > 0, or default drill value for the board).
Definition seg.h:42
VECTOR2I A
Definition seg.h:49
VECTOR2I B
Definition seg.h:50
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
const SEG CSegment(int aIndex) const
Return a constant copy of the aIndex segment in the line chain.
Represent a set of closed polygons.
void Rotate(const EDA_ANGLE &aAngle, const VECTOR2I &aCenter={ 0, 0 }) override
Rotate all vertices by a given angle.
void BooleanAdd(const SHAPE_POLY_SET &b)
Perform boolean polyset union.
int AddOutline(const SHAPE_LINE_CHAIN &aOutline)
Adds a new outline to the set and returns its index.
void Fracture()
Convert a set of polygons with holes to a single outline with "slits"/"fractures" connecting the oute...
POLYGON & Polygon(int aIndex)
Return the aIndex-th subpolygon in the set.
void Simplify()
Simplify the polyset (merges overlapping polys, eliminates degeneracy/self-intersections)
std::vector< SHAPE_LINE_CHAIN > POLYGON
represents a single polygon outline with holes.
void Deflate(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError)
int OutlineCount() const
Return the number of outlines in the set.
void InflateWithLinkedHoles(int aFactor, CORNER_STRATEGY aCornerStrategy, int aMaxError)
Perform outline inflation/deflation, using round corners.
void Move(const VECTOR2I &aVector) override
SHAPE_POLY_SET CloneDropTriangulation() const
const SHAPE_LINE_CHAIN & COutline(int aIndex) const
Simple container to manage line stroke parameters.
int GetWidth() const
Handle a list of polygons defining a copper zone.
Definition zone.h:74
@ CHAMFER_ALL_CORNERS
All angles are chamfered.
@ ROUND_ALL_CORNERS
All angles are rounded.
static constexpr EDA_ANGLE ANGLE_0
Definition eda_angle.h:411
static constexpr EDA_ANGLE ANGLE_360
Definition eda_angle.h:417
@ SEGMENT
Definition eda_shape.h:45
@ RECTANGLE
Use RECTANGLE instead of RECT to avoid collision in a Windows header.
Definition eda_shape.h:46
FILL_T
Definition eda_shape.h:56
@ FILLED_SHAPE
Fill with object color.
Definition eda_shape.h:58
int GetPenSizeForBold(int aTextSize)
Definition gr_text.cpp:37
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:60
@ F_Paste
Definition layer_ids.h:104
@ B_Mask
Definition layer_ids.h:98
@ F_Mask
Definition layer_ids.h:97
@ B_Paste
Definition layer_ids.h:105
@ UNDEFINED_LAYER
Definition layer_ids.h:61
std::pair< wxString, wxString > AddXY(const VECTOR2I &aVec)
Definition odb_util.cpp:191
wxString Double2String(double aVal)
Definition odb_util.cpp:151
wxString SymDouble2String(double aVal)
Definition odb_util.cpp:179
VECTOR2I GetShapePosition(const PCB_SHAPE &aShape)
Definition odb_util.cpp:202
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
Definition eda_angle.h:400
ODB_DIRECTION
Definition odb_feature.h:35
@ PTH
Plated through hole pad.
Definition padstack.h:98
@ CHAMFERED_RECT
Definition padstack.h:60
@ ROUNDRECT
Definition padstack.h:57
@ TRAPEZOID
Definition padstack.h:56
@ RECTANGLE
Definition padstack.h:54
std::vector< FAB_LAYER_COLOR > dummy
void wxStringSplit(const wxString &aText, wxArrayString &aStrings, wxChar aSplitter)
Split aString to a string list separated at aSplitter.
VECTOR2I center
VECTOR2I end
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
Definition typeinfo.h:88
@ PCB_DIM_ORTHOGONAL_T
class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y
Definition typeinfo.h:106
@ PCB_DIM_LEADER_T
class PCB_DIM_LEADER, a leader dimension (graphic item)
Definition typeinfo.h:103
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
Definition typeinfo.h:97
@ PCB_DIM_CENTER_T
class PCB_DIM_CENTER, a center point marking (graphic item)
Definition typeinfo.h:104
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
Definition typeinfo.h:93
@ PCB_ZONE_T
class ZONE, a copper pour area
Definition typeinfo.h:108
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
Definition typeinfo.h:92
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
Definition typeinfo.h:90
@ PCB_BARCODE_T
class PCB_BARCODE, a barcode (graphic item)
Definition typeinfo.h:101
@ PCB_TARGET_T
class PCB_TARGET, a target (graphic item)
Definition typeinfo.h:107
@ PCB_DIM_ALIGNED_T
class PCB_DIM_ALIGNED, a linear dimension (graphic item)
Definition typeinfo.h:102
@ PCB_PAD_T
class PAD, a pad in a footprint
Definition typeinfo.h:87
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
Definition typeinfo.h:98
@ PCB_DIMENSION_T
class PCB_DIMENSION_BASE: abstract dimension meta-type
Definition typeinfo.h:100
@ PCB_TABLE_T
class PCB_TABLE, table of PCB_TABLECELLs
Definition typeinfo.h:94
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
Definition typeinfo.h:96
@ PCB_DIM_RADIAL_T
class PCB_DIM_RADIAL, a radius or diameter dimension
Definition typeinfo.h:105
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:695