KiCad PCB EDA Suite
Loading...
Searching...
No Matches
board_adapter.h
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 (C) 2015-2016 Mario Luzeiro <[email protected]>
5 * Copyright (C) 2023 CERN
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#ifndef BOARD_ADAPTER_H
23#define BOARD_ADAPTER_H
24
25#include <array>
26#include <optional>
27#include <vector>
31#include <gal/3d/camera.h>
32#include <3d_enums.h>
36
37#include <layer_ids.h>
38#include <pcb_base_frame.h>
39#include <pcb_text.h>
40#include <pcb_textbox.h>
41#include <pcb_table.h>
42#include <pcb_shape.h>
43#include <pcb_dimension.h>
44#include <reporter.h>
46#include <stop_token>
47
48class COLOR_SETTINGS;
49class FOOTPRINT;
50class PAD;
51class PCB_BARCODE;
52class PCB_TEXTBOX;
53class PCB_TRACK;
54class ZONE;
55
57typedef std::map<PCB_LAYER_ID, BVH_CONTAINER_2D*> MAP_CONTAINER_2D_BASE;
58
60typedef std::map<PCB_LAYER_ID, SHAPE_POLY_SET*> MAP_POLY;
61
65#define RANGE_SCALE_3D 8.0f
66
67
72{
73public:
75
77
83 void Set3dCacheManager( S3D_CACHE* aCacheMgr ) noexcept { m_3dModelManager = aCacheMgr; }
84 S3D_CACHE* Get3dCacheManager() const noexcept { return m_3dModelManager; }
85
93 bool Is3dLayerEnabled( PCB_LAYER_ID aLayer, const std::bitset<LAYER_3D_END>& aVisibilityFlags ) const;
94
98 bool IsFootprintShown( const FOOTPRINT* aFootprint ) const;
99
105 wxString GetFootprintLibraryPath( const FOOTPRINT* aFootprint ) const;
106
112 void SetBoard( BOARD* aBoard ) noexcept { m_board = aBoard; }
113 const BOARD* GetBoard() const noexcept { return m_board; }
114
115 void ReloadColorSettings() noexcept;
116
120 std::map<int, COLOR4D> GetLayerColors() const;
121
122 std::map<int, COLOR4D> GetDefaultColors() const;
123 void SetLayerColors( const std::map<int, COLOR4D>& aColors );
124
125 std::bitset<LAYER_3D_END> GetVisibleLayers() const;
127 void SetVisibleLayers( const std::bitset<LAYER_3D_END>& aLayers );
128
130 void SetVisibilityOverride( const std::optional<std::bitset<LAYER_3D_END>>& aLayers )
131 {
132 m_visibilityOverride = aLayers;
133 }
134
136
143 void InitSettings( std::shared_ptr<REPORTER> aStatusReporter, std::shared_ptr<REPORTER> aWarningReporter );
144
151 void CreateLayers( std::shared_ptr<REPORTER> aStatusReporter, std::stop_token aStop = std::stop_token() );
152
158 double BiuTo3dUnits() const noexcept { return m_biuTo3Dunits; }
159
165 const BBOX_3D& GetBBox() const noexcept { return m_boardBoundingBox; }
166
170 float GetBoardBodyThickness() const noexcept { return m_boardBodyThickness3DU; }
171
176
180 float GetFrontCopperThickness() const noexcept { return m_frontCopperThickness3DU; }
181 float GetBackCopperThickness() const noexcept { return m_backCopperThickness3DU; }
182
186 int GetHolePlatingThickness() const noexcept;
187
193 VECTOR2I GetBoardSize() const noexcept { return m_boardSize; }
194
200 VECTOR2I GetBoardPos() const noexcept { return m_boardPos; }
201
207 const SFVEC3F& GetBoardCenter() const noexcept { return m_boardCenter; }
208
216 float GetFootprintZPos( bool aIsFlipped ) const ;
217
223 glm::mat4 GetFootprintMatrix( const FOOTPRINT& aFootprint ) const;
224
230 const SHAPE_POLY_SET& GetBoardPoly() const noexcept { return m_board_poly; }
231
238 SFVEC4F GetLayerColor( int aLayerId ) const;
239
244 SFVEC4F GetColor( const COLOR4D& aColor ) const;
245
246 SFVEC2F GetSphericalCoord( int i ) const;
247
254 float GetLayerTopZPos( PCB_LAYER_ID aLayerId ) const noexcept
255 {
256 auto it = m_layerZcoordTop.find( aLayerId );
257
258 if( it != m_layerZcoordTop.end() )
259 return it->second;
260 else
261 return -( m_boardBodyThickness3DU / 2.0f );
262 }
263
270 float GetLayerBottomZPos( PCB_LAYER_ID aLayerId ) const noexcept
271 {
272 auto it = m_layerZcoordBottom.find( aLayerId );
273
274 if( it != m_layerZcoordBottom.end() )
275 return it->second;
276 else
278 }
279
285 const MAP_CONTAINER_2D_BASE& GetLayerMap() const noexcept { return m_layerMap; }
286 const BVH_CONTAINER_2D* GetPlatedPadsFront() const noexcept { return m_platedPadsFront; }
287 const BVH_CONTAINER_2D* GetPlatedPadsBack() const noexcept { return m_platedPadsBack; }
289 const BVH_CONTAINER_2D* GetOffboardPadsBack() const noexcept { return m_offboardPadsBack; }
290
291 const MAP_CONTAINER_2D_BASE& GetLayerHoleMap() const noexcept { return m_layerHoleMap; }
292 const BVH_CONTAINER_2D& GetTH_IDs() const noexcept { return m_TH_IDs; }
293 const BVH_CONTAINER_2D& GetTH_ODs() const noexcept { return m_TH_ODs; }
294
302 const SHAPE_POLY_SET& GetTH_ODPolys() const noexcept
303 {
304 return m_TH_ODPolys;
305 }
306
307 const BVH_CONTAINER_2D& GetViaAnnuli() const noexcept
308 {
309 return m_viaAnnuli;
310 }
311
312 const SHAPE_POLY_SET& GetViaAnnuliPolys() const noexcept
313 {
314 return m_viaAnnuliPolys;
315 }
316
317 const SHAPE_POLY_SET& GetNPTH_ODPolys() const noexcept
318 {
319 return m_NPTH_ODPolys;
320 }
321
325 const BVH_CONTAINER_2D& GetViaTH_ODs() const noexcept
326 {
327 return m_viaTH_ODs;
328 }
329
330 const SHAPE_POLY_SET& GetViaTH_ODPolys() const noexcept
331 {
332 return m_viaTH_ODPolys;
333 }
334
340 {
342 }
343
344 const SHAPE_POLY_SET& GetBackBackdrillPolys() const noexcept
345 {
347 }
348
350 {
352 }
353
355 {
357 }
358
364 {
366 }
367
372 {
374 }
375
381 {
383 }
384
389 {
391 }
392
397 {
399 }
400
405 {
407 }
408
413 {
415 }
416
421 {
423 }
424
425 unsigned int GetViaCount() const noexcept { return m_viaCount; }
426 unsigned int GetHoleCount() const noexcept { return m_holeCount; }
427
431 float GetAverageViaHoleDiameter() const noexcept { return m_averageViaHoleDiameter; }
432
436 float GetAverageHoleDiameter() const noexcept { return m_averageHoleDiameter; }
437
441 float GetAverageTrackWidth() const noexcept { return m_averageTrackWidth; }
442
447 unsigned int GetCircleSegmentCount( float aDiameter3DU ) const;
448
453 unsigned int GetCircleSegmentCount( int aDiameterBIU ) const;
454
460 const MAP_POLY& GetPolyMap() const noexcept { return m_layers_poly; }
461
466
471
472 const MAP_POLY& GetHoleIdPolysMap() const noexcept { return m_layerHoleIdPolys; }
473 const MAP_POLY& GetHoleOdPolysMap() const noexcept { return m_layerHoleOdPolys; }
474
476 {
477 return m_IsPreviewer || m_Cfg->m_Render.show_missing_models;
478 }
479
480private:
486 bool createBoardPolygon( wxString* aErrorMsg );
487 void createLayers( std::shared_ptr<REPORTER> aStatusReporter, std::stop_token aStop );
488 void destroyLayers();
489
490 // Helper functions to create the board
491
496 void createTrackWithMargin( const PCB_TRACK* aTrack, CONTAINER_2D_BASE* aDstContainer, PCB_LAYER_ID aLayer,
497 int aMargin = 0, const BOARD_ITEM* aOwner = nullptr );
498
499 // Generate the pad shape on board layers. The pad hole is not generated by createPadWithMargin
500 void createPadWithMargin( const PAD *aPad, CONTAINER_2D_BASE* aDstContainer, PCB_LAYER_ID aLayer,
501 const VECTOR2I& aMargin ) const;
502
503 // Generate the hole shape of aPad, stored in aDstContainer
504 void createPadHoleShape( const PAD* aPad, CONTAINER_2D_BASE* aDstContainer, int aInflateValue );
505
506 void addPads( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aDstContainer, PCB_LAYER_ID aLayerId );
507
508 void addFootprintShapes( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aDstContainer, PCB_LAYER_ID aLayerId,
509 const std::bitset<LAYER_3D_END>& aVisibilityFlags );
510
511 void addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aDstContainer, const BOARD_ITEM* aOwner );
512
513 void addBarCode( const PCB_BARCODE* aBarCode, CONTAINER_2D_BASE* aDstContainer, const BOARD_ITEM* aOwner );
514
515 void addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aContainer, const BOARD_ITEM* aOwner,
516 PCB_LAYER_ID aLayer );
517
518 void addShape( const PCB_DIMENSION_BASE* aDimension, CONTAINER_2D_BASE* aDstContainer, const BOARD_ITEM* aOwner );
519
520 void addShape( const PCB_TEXTBOX* aTextBox, CONTAINER_2D_BASE* aContainer, const BOARD_ITEM* aOwner );
521
522 void addTable( const PCB_TABLE* aTable, CONTAINER_2D_BASE* aContainer, const BOARD_ITEM* aOwner );
523
524 void addSolidAreasShapes( const ZONE* aZone, CONTAINER_2D_BASE* aDstContainer, PCB_LAYER_ID aLayerId );
525
526 void createArcSegments( const VECTOR2I& aCentre, const VECTOR2I& aStart, const EDA_ANGLE& aArcAngle,
527 int aCircleToSegmentsCount, int aWidth, CONTAINER_2D_BASE* aContainer,
528 const BOARD_ITEM& aOwner );
529
530 void buildPadOutlineAsSegments( const PAD* aPad, PCB_LAYER_ID aLayer, CONTAINER_2D_BASE* aDstContainer,
531 int aWidth );
532
533public:
534 static std::vector<CUSTOM_COLOR_ITEM> g_SilkColors;
535 static std::vector<CUSTOM_COLOR_ITEM> g_MaskColors;
536 static std::vector<CUSTOM_COLOR_ITEM> g_PasteColors;
537 static std::vector<CUSTOM_COLOR_ITEM> g_FinishColors;
538 static std::vector<CUSTOM_COLOR_ITEM> g_BoardColors;
539
552
553public:
555
560
580
581 std::map<int, COLOR4D> m_ColorOverrides;
582 std::map<int, COLOR4D> m_BoardEditorColors;
583
584private:
587
588 std::optional<std::bitset<LAYER_3D_END>> m_visibilityOverride;
589
594
597
600
603
606
611
616
618
621
626
631
636
641
643
646
647 std::map<PCB_LAYER_ID, float> m_layerZcoordTop;
648 std::map<PCB_LAYER_ID, float> m_layerZcoordBottom;
649
657
658 unsigned int m_trackCount;
660 unsigned int m_viaCount;
662 unsigned int m_holeCount;
664
670 static const wxChar* m_logTrace;
671
672};
673
674
675#endif // BOARD_ADAPTER_H
declared enumerations and flags
Bounding Box class definition.
std::map< PCB_LAYER_ID, SHAPE_POLY_SET * > MAP_POLY
A type that stores polysets for each layer id.
std::map< PCB_LAYER_ID, BVH_CONTAINER_2D * > MAP_CONTAINER_2D_BASE
A type that stores a container of 2d objects for each layer id.
Define an abstract camera.
MAP_CONTAINER_2D_BASE m_layerHoleMap
Holes for each layer.
const BVH_CONTAINER_2D & GetBackBackdrillCutouts() const noexcept
std::map< int, COLOR4D > m_BoardEditorColors
list of colors used by the board editor
double BiuTo3dUnits() const noexcept
Board integer units To 3D units.
BVH_CONTAINER_2D * m_offboardPadsBack
SFVEC4F m_BgColorTop
background top color
SFVEC4F m_ECO2Color
BVH_CONTAINER_2D m_frontCounterboreCutouts
Counterbore cutouts on front (top)
void SetVisibleLayers(const std::bitset< LAYER_3D_END > &aLayers)
static std::vector< CUSTOM_COLOR_ITEM > g_PasteColors
float m_solderPasteLayerThickness3DU
const MAP_CONTAINER_2D_BASE & GetLayerHoleMap() const noexcept
SFVEC4F GetLayerColor(int aLayerId) const
Get the technical color of a layer.
const BVH_CONTAINER_2D & GetBackCounterboreCutouts() const noexcept
Get the container of counterbore cutout geometry for the back (bottom) side.
std::map< PCB_LAYER_ID, float > m_layerZcoordBottom
Bottom (Start) Z pos of each layer.
void CreateLayers(std::shared_ptr< REPORTER > aStatusReporter, std::stop_token aStop=std::stop_token())
Creates the layers for the board, should be called after InitSettings.
S3D_CACHE * m_3dModelManager
SHAPE_POLY_SET m_BackBackdrillPolys
Board back backdrill polygons B.Cu->in.
const SHAPE_POLY_SET * GetFrontPlatedCopperPolys()
SHAPE_POLY_SET m_backCounterborePolys
Counterbore outer diameters on back.
VECTOR2I m_boardPos
Board center position in board internal units.
float m_backCopperThickness3DU
bool GetUseBoardEditorCopperLayerColors() const
SHAPE_POLY_SET m_TH_ODPolys
PTH outer diameters.
static KIGFX::COLOR4D g_DefaultComments
SFVEC4F m_SolderPasteColor
BBOX_3D m_boardBoundingBox
3D bounding box of the board in 3D units.
void createLayers(std::shared_ptr< REPORTER > aStatusReporter, std::stop_token aStop)
static KIGFX::COLOR4D g_DefaultBoardBody
SFVEC4F m_UserDefinedLayerColor[45]
const SHAPE_POLY_SET & GetFrontBackdrillPolys() const noexcept
Get the secondary and tertiary drill polygons.
const SHAPE_POLY_SET & GetBoardPoly() const noexcept
Get the current polygon of the epoxy board.
void addPads(const FOOTPRINT *aFootprint, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayerId)
const BVH_CONTAINER_2D & GetFrontBackdrillCutouts() const noexcept
const SHAPE_POLY_SET & GetNPTH_ODPolys() const noexcept
static KIGFX::COLOR4D g_DefaultAdhesive
unsigned int m_viaCount
static KIGFX::COLOR4D g_DefaultFabColor
const BVH_CONTAINER_2D * GetOffboardPadsFront() const noexcept
BVH_CONTAINER_2D m_frontCountersinkCutouts
Countersink cutouts on front (top)
static KIGFX::COLOR4D g_DefaultSolderMask
std::map< int, COLOR4D > GetLayerColors() const
Build a color list which is used to store colors layers.
static std::vector< CUSTOM_COLOR_ITEM > g_BoardColors
const SHAPE_POLY_SET & GetViaTH_ODPolys() const noexcept
const MAP_POLY & GetPolyMap() const noexcept
Get map of polygon's layers.
MAP_POLY m_layerHoleOdPolys
Hole outer diameters (per layer)
void addSolidAreasShapes(const ZONE *aZone, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayerId)
VECTOR2I GetBoardSize() const noexcept
Get the board size.
std::optional< std::bitset< LAYER_3D_END > > m_visibilityOverride
static std::vector< CUSTOM_COLOR_ITEM > g_MaskColors
const MAP_POLY & GetHoleOdPolysMap() const noexcept
bool ShowMissingModels()
static std::vector< CUSTOM_COLOR_ITEM > g_SilkColors
SHAPE_POLY_SET * m_frontPlatedCopperPolys
MAP_CONTAINER_2D_BASE m_layerMap
2D elements for each layer.
BVH_CONTAINER_2D m_TH_ODs
List of PTH outer diameters.
float m_frontMaskThickness3DU
float GetAverageTrackWidth() const noexcept
unsigned int m_trackCount
const BBOX_3D & GetBBox() const noexcept
Get the board outline bounding box.
float m_averageTrackWidth
SHAPE_POLY_SET m_board_poly
Board outline polygon.
std::bitset< LAYER_3D_END > GetVisibleLayers() const
SFVEC4F m_SolderMaskColorBot
bool m_IsPreviewer
true if we're in a 3D preview panel, false for the standard 3D viewer
void addFootprintShapes(const FOOTPRINT *aFootprint, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayerId, const std::bitset< LAYER_3D_END > &aVisibilityFlags)
void createArcSegments(const VECTOR2I &aCentre, const VECTOR2I &aStart, const EDA_ANGLE &aArcAngle, int aCircleToSegmentsCount, int aWidth, CONTAINER_2D_BASE *aContainer, const BOARD_ITEM &aOwner)
VECTOR2I GetBoardPos() const noexcept
Get the board center.
MAP_POLY m_layerHoleIdPolys
Hole inner diameters (per layer)
int GetHolePlatingThickness() const noexcept
Get the hole plating thickness (NB: in BOARD UNITS!).
const SHAPE_POLY_SET & GetBackCountersinkPolys() const noexcept
Get the polygon set of countersink outer diameters for the back (bottom) side.
const SHAPE_POLY_SET & GetBackBackdrillPolys() const noexcept
const BVH_CONTAINER_2D & GetViaAnnuli() const noexcept
float GetLayerBottomZPos(PCB_LAYER_ID aLayerId) const noexcept
Get the bottom z position.
static KIGFX::COLOR4D g_DefaultECOs
const BVH_CONTAINER_2D * GetOffboardPadsBack() const noexcept
const SHAPE_POLY_SET & GetFrontCountersinkPolys() const noexcept
Get the polygon set of countersink outer diameters for the front (top) side.
const BVH_CONTAINER_2D & GetTH_IDs() const noexcept
SFVEC4F m_SolderMaskColorTop
SFVEC4F GetColor(const COLOR4D &aColor) const
SHAPE_POLY_SET m_viaAnnuliPolys
Via annular ring outer diameters.
BVH_CONTAINER_2D * m_offboardPadsFront
float m_averageViaHoleDiameter
BVH_CONTAINER_2D m_viaTH_ODs
List of via hole outer diameters.
SHAPE_POLY_SET m_frontCounterborePolys
Counterbore outer diameters on front.
static KIGFX::COLOR4D g_DefaultBackgroundTop
const SHAPE_POLY_SET & GetFrontCounterborePolys() const noexcept
Get the polygon set of counterbore outer diameters for the front (top) side.
const BVH_CONTAINER_2D * GetPlatedPadsBack() const noexcept
BVH_CONTAINER_2D m_frontBackdrillCutouts
Backdrill cutouts to the front of the board (may come from either secondary or tertiary drills)
glm::mat4 GetFootprintMatrix(const FOOTPRINT &aFootprint) const
Build the transform from footprint-local model units to 3D world units.
const MAP_POLY & GetHoleIdPolysMap() const noexcept
float GetBackCopperThickness() const noexcept
SFVEC4F m_FFabColor
float m_averageHoleDiameter
static KIGFX::COLOR4D g_DefaultSurfaceFinish
SFVEC4F m_CopperColor
SHAPE_POLY_SET m_viaTH_ODPolys
Via hole outer diameters.
void ReloadColorSettings() noexcept
void createPadWithMargin(const PAD *aPad, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayer, const VECTOR2I &aMargin) const
float GetAverageViaHoleDiameter() const noexcept
void addBarCode(const PCB_BARCODE *aBarCode, CONTAINER_2D_BASE *aDstContainer, const BOARD_ITEM *aOwner)
static std::vector< CUSTOM_COLOR_ITEM > g_FinishColors
SFVEC2F GetSphericalCoord(int i) const
unsigned int GetViaCount() const noexcept
const BOARD * GetBoard() const noexcept
BVH_CONTAINER_2D * m_platedPadsBack
std::bitset< LAYER_3D_END > GetDefaultVisibleLayers() const
SFVEC4F m_BCourtyardColor
void InitSettings(std::shared_ptr< REPORTER > aStatusReporter, std::shared_ptr< REPORTER > aWarningReporter)
Function to be called by the render when it need to reload the settings for the board.
void SetBoard(BOARD *aBoard) noexcept
Set current board to be rendered.
void buildPadOutlineAsSegments(const PAD *aPad, PCB_LAYER_ID aLayer, CONTAINER_2D_BASE *aDstContainer, int aWidth)
const SFVEC3F & GetBoardCenter() const noexcept
The board center position in 3D units.
std::map< PCB_LAYER_ID, float > m_layerZcoordTop
Top (End) Z pos of each layer in 3D units.
float GetFootprintZPos(bool aIsFlipped) const
Get the position of the footprint in 3d integer units considering if it is flipped or not.
float m_frontCopperThickness3DU
float m_backMaskThickness3DU
SFVEC4F m_AdhesiveColor
float GetNonCopperLayerThickness() const noexcept
Get the non copper layers thickness (in 3D units).
static KIGFX::COLOR4D g_DefaultSolderPaste
float GetLayerTopZPos(PCB_LAYER_ID aLayerId) const noexcept
Get the top z position.
const BVH_CONTAINER_2D & GetTH_ODs() const noexcept
wxString GetFootprintLibraryPath(const FOOTPRINT *aFootprint) const
Return the directory of aFootprint's library.
float m_boardBodyThickness3DU
const MAP_CONTAINER_2D_BASE & GetLayerMap() const noexcept
Get the map of containers that have the objects per layer.
MAP_POLY m_layers_poly
Amalgamated polygon contours for various types of items.
VECTOR2I m_boardSize
Board size in board internal units.
SHAPE_POLY_SET * m_backPlatedCopperPolys
void SetLayerColors(const std::map< int, COLOR4D > &aColors)
EDA_3D_VIEWER_SETTINGS * m_Cfg
std::map< int, COLOR4D > m_ColorOverrides
allows to override color scheme colors
SFVEC4F m_SilkScreenColorTop
void addTable(const PCB_TABLE *aTable, CONTAINER_2D_BASE *aContainer, const BOARD_ITEM *aOwner)
unsigned int GetHoleCount() const noexcept
SFVEC4F m_SilkScreenColorBot
bool IsFootprintShown(const FOOTPRINT *aFootprint) const
Test if footprint should be displayed in relation to attributes and the flags.
void createPadHoleShape(const PAD *aPad, CONTAINER_2D_BASE *aDstContainer, int aInflateValue)
void SetVisibilityOverride(const std::optional< std::bitset< LAYER_3D_END > > &aLayers)
Temporarily override preview visibility without changing the saved render settings.
const BVH_CONTAINER_2D * GetPlatedPadsFront() const noexcept
unsigned int GetCircleSegmentCount(float aDiameter3DU) const
SFVEC4F m_FCourtyardColor
static KIGFX::COLOR4D g_DefaultCourtyardColor
SHAPE_POLY_SET m_frontCountersinkPolys
Countersink outer diameters on front.
SFVEC4F m_BFabColor
float m_nonCopperLayerThickness3DU
float GetFrontCopperThickness() const noexcept
Get the copper layer thicknesses (in 3D units).
const BVH_CONTAINER_2D & GetViaTH_ODs() const noexcept
BVH_CONTAINER_2D m_backBackdrillCutouts
Backdrill cutouts to the back of the board (may come from either secondary or tertiary drills)
unsigned int m_holeCount
BVH_CONTAINER_2D m_viaAnnuli
List of via annular rings.
float GetBoardBodyThickness() const noexcept
Get the board body thickness, including internal copper layers (in 3D units).
const BVH_CONTAINER_2D & GetFrontCountersinkCutouts() const noexcept
Get the container of countersink cutout geometry for the front (top) side.
const SHAPE_POLY_SET & GetBackCounterborePolys() const noexcept
Get the polygon set of counterbore outer diameters for the back (bottom) side.
SFVEC4F m_BoardBodyColor
bool createBoardPolygon(wxString *aErrorMsg)
Create the board outline polygon.
float GetAverageHoleDiameter() const noexcept
const SHAPE_POLY_SET & GetViaAnnuliPolys() const noexcept
BVH_CONTAINER_2D m_backCountersinkCutouts
Countersink cutouts on back (bottom)
BVH_CONTAINER_2D m_backCounterboreCutouts
Counterbore cutouts on back (bottom)
std::map< int, COLOR4D > GetDefaultColors() const
BVH_CONTAINER_2D m_TH_IDs
List of PTH inner diameters.
SFVEC4F m_UserCommentsColor
static KIGFX::COLOR4D g_DefaultSilkscreen
BVH_CONTAINER_2D * m_platedPadsFront
void Set3dCacheManager(S3D_CACHE *aCacheMgr) noexcept
Update the cache manager pointer.
void addShape(const PCB_SHAPE *aShape, CONTAINER_2D_BASE *aContainer, const BOARD_ITEM *aOwner, PCB_LAYER_ID aLayer)
SFVEC3F m_boardCenter
3D center position of the board in 3D units.
SHAPE_POLY_SET m_NPTH_ODPolys
NPTH outer diameters.
SHAPE_POLY_SET m_backCountersinkPolys
Countersink outer diameters on back.
static KIGFX::COLOR4D g_DefaultBackgroundBot
SHAPE_POLY_SET m_FrontBackdrillPolys
Board front backdril polygons F.Cu->in.
bool Is3dLayerEnabled(PCB_LAYER_ID aLayer, const std::bitset< LAYER_3D_END > &aVisibilityFlags) const
Check if a layer is enabled.
SFVEC4F m_ECO1Color
SFVEC4F m_UserDrawingsColor
const SHAPE_POLY_SET * GetBackPlatedCopperPolys()
S3D_CACHE * Get3dCacheManager() const noexcept
const BVH_CONTAINER_2D & GetBackCountersinkCutouts() const noexcept
Get the container of countersink cutout geometry for the back (bottom) side.
double m_biuTo3Dunits
Scale factor to convert board internal units.
const BVH_CONTAINER_2D & GetFrontCounterboreCutouts() const noexcept
Get the container of counterbore cutout geometry for the front (top) side.
SFVEC4F m_BgColorBot
background bottom color
const SHAPE_POLY_SET & GetTH_ODPolys() const noexcept
Get through hole outside diameter 2D polygons.
void createTrackWithMargin(const PCB_TRACK *aTrack, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayer, int aMargin=0, const BOARD_ITEM *aOwner=nullptr)
void addText(const EDA_TEXT *aText, CONTAINER_2D_BASE *aDstContainer, const BOARD_ITEM *aOwner)
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:99
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:411
Color settings are a bit different than most of the settings objects in that there can be more than o...
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition eda_text.h:94
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:101
Definition pad.h:61
Abstract dimension API.
Cache for storing the 3D shapes.
Definition 3d_cache.h:53
Represent a set of closed polygons.
Handle a list of polygons defining a copper zone.
Definition zone.h:70
static const wxChar * m_logTrace
Trace mask used to enable or disable debug output for this class.
@ LAYER_3D_END
Definition layer_ids.h:689
PCB_LAYER_ID
A quick note on layer IDs:
Definition layer_ids.h:56
STL namespace.
Declaration of the cogl_att_list class.
Manage a bounding box defined by two SFVEC3F min max points.
Definition bbox_3d.h:39
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708
glm::vec2 SFVEC2F
Definition xv3d_types.h:38
glm::vec3 SFVEC3F
Definition xv3d_types.h:40
glm::vec4 SFVEC4F
Definition xv3d_types.h:42