KiCad PCB EDA Suite
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 <mrluzeiro@ua.pt>
5  * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #ifndef BOARD_ADAPTER_H
26 #define BOARD_ADAPTER_H
27 
28 #include <array>
29 #include <vector>
30 #include "../3d_rendering/3d_render_raytracing/accelerators/container_2d.h"
31 #include "../3d_rendering/3d_render_raytracing/accelerators/container_3d.h"
32 #include "../3d_rendering/3d_render_raytracing/shapes3D/bbox_3d.h"
33 #include "../3d_rendering/camera.h"
34 #include "../3d_enums.h"
35 #include "../3d_cache/3d_cache.h"
36 #include "../common_ogl/ogl_attr_list.h"
37 
38 #include <layer_ids.h>
39 #include <pad.h>
40 #include <pcb_track.h>
41 #include <wx/gdicmn.h>
42 #include <pcb_base_frame.h>
43 #include <pcb_text.h>
44 #include <pcb_shape.h>
45 #include <pcb_dimension.h>
46 #include <zone.h>
47 #include <footprint.h>
48 #include <reporter.h>
50 
52 
54 typedef std::map< PCB_LAYER_ID, BVH_CONTAINER_2D *> MAP_CONTAINER_2D_BASE;
55 
57 typedef std::map< PCB_LAYER_ID, SHAPE_POLY_SET *> MAP_POLY;
58 
62 #define RANGE_SCALE_3D 8.0f
63 
64 
69 {
70 public:
71  BOARD_ADAPTER();
72 
74 
80  void Set3dCacheManager( S3D_CACHE* aCachePointer ) noexcept
81  {
82  m_3dModelManager = aCachePointer;
83  }
84 
88  S3D_CACHE* Get3dCacheManager() const noexcept
89  {
90  return m_3dModelManager;
91  }
92 
99  bool GetFlag( DISPLAY3D_FLG aFlag ) const ;
100 
107  void SetFlag( DISPLAY3D_FLG aFlag, bool aState );
108 
114  bool Is3dLayerEnabled( PCB_LAYER_ID aLayer ) const;
115 
119  bool IsFootprintShown( FOOTPRINT_ATTR_T aFPAttributes ) const;
120 
126  void SetBoard( BOARD* aBoard ) noexcept
127  {
128  m_board = aBoard;
129  }
130 
136  const BOARD* GetBoard() const noexcept
137  {
138  return m_board;
139  }
140 
141  void SetColorSettings( COLOR_SETTINGS* aSettings ) noexcept
142  {
143  m_colors = aSettings;
144  }
145 
152  void InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningReporter );
153 
159  double BiuTo3dUnits() const noexcept
160  {
161  return m_biuTo3Dunits;
162  }
163 
169  const BBOX_3D& GetBBox() const noexcept
170  {
171  return m_boardBoundingBox;
172  }
173 
179  float GetEpoxyThickness() const noexcept
180  {
181  return m_epoxyThickness3DU;
182  }
183 
189  float GetNonCopperLayerThickness() const noexcept
190  {
192  }
193 
199  float GetCopperThickness() const noexcept
200  {
201  return m_copperThickness3DU;
202  }
203 
209  int GetHolePlatingThickness() const noexcept;
210 
216  wxSize GetBoardSize() const noexcept
217  {
218  return m_boardSize;
219  }
220 
226  wxPoint GetBoardPos() const noexcept
227  {
228  return m_boardPos;
229  }
230 
236  const SFVEC3F& GetBoardCenter() const noexcept
237  {
238  return m_boardCenter;
239  }
240 
248  float GetFootprintZPos( bool aIsFlipped ) const ;
249 
255  GRID3D_TYPE GetGridType() const noexcept
256  {
257  return m_gridType;
258  }
259 
265  void SetGridType( GRID3D_TYPE aGridType ) noexcept
266  {
267  m_gridType = aGridType;
268  }
269 
276 
283 
287  void SetRenderEngine( RENDER_ENGINE aRenderEngine ) noexcept
288  {
289  m_renderEngine = aRenderEngine;
290  }
291 
296  {
297  return m_renderEngine;
298  }
299 
303  void SetMaterialMode( MATERIAL_MODE aMaterialMode ) noexcept
304  {
305  m_materialMode = aMaterialMode;
306  }
307 
312  {
313  return m_materialMode;
314  }
315 
321  const SHAPE_POLY_SET& GetBoardPoly() const noexcept
322  {
323  return m_board_poly;
324  }
325 
332  SFVEC4F GetLayerColor( PCB_LAYER_ID aLayerId ) const;
333 
340  SFVEC4F GetItemColor( int aItemId ) const;
341 
346  SFVEC4F GetColor( const COLOR4D& aColor ) const;
347 
354  float GetLayerTopZPos( PCB_LAYER_ID aLayerId ) const noexcept
355  {
356  return m_layerZcoordTop[aLayerId];
357  }
358 
365  float GetLayerBottomZPos( PCB_LAYER_ID aLayerId ) const noexcept
366  {
367  return m_layerZcoordBottom[aLayerId];
368  }
369 
375  const MAP_CONTAINER_2D_BASE& GetLayerMap() const noexcept
376  {
377  return m_layerMap;
378  }
379 
380  const BVH_CONTAINER_2D* GetPlatedPadsFront() const noexcept
381  {
382  return m_platedPadsFront;
383  }
384 
385  const BVH_CONTAINER_2D* GetPlatedPadsBack() const noexcept
386  {
387  return m_platedPadsBack;
388  }
389 
395  const MAP_CONTAINER_2D_BASE& GetLayerHoleMap() const noexcept
396  {
397  return m_layerHoleMap;
398  }
399 
405  const BVH_CONTAINER_2D& GetThroughHoleOds() const noexcept
406  {
407  return m_throughHoleOds;
408  }
409 
416  {
418  }
419 
427  const SHAPE_POLY_SET& GetThroughHoleOdPolys() const noexcept
428  {
429  return m_throughHoleOdPolys;
430  }
431 
433  {
435  }
436 
438  {
440  }
441 
445  const BVH_CONTAINER_2D& GetThroughHoleViaOds() const noexcept
446  {
447  return m_throughHoleViaOds;
448  }
449 
450  const SHAPE_POLY_SET& GetThroughHoleViaOdPolys() const noexcept
451  {
453  }
454 
460  const BVH_CONTAINER_2D& GetThroughHoleIds() const noexcept
461  {
462  return m_throughHoleIds;
463  }
464 
470  unsigned int GetViaCount() const noexcept
471  {
472  return m_viaCount;
473  }
474 
480  unsigned int GetHoleCount() const noexcept
481  {
482  return m_holeCount;
483  }
484 
490  float GetAverageViaHoleDiameter() const noexcept
491  {
493  }
494 
500  float GetAverageHoleDiameter() const noexcept
501  {
502  return m_averageHoleDiameter;
503  }
504 
510  float GetAverageTrackWidth() const noexcept
511  {
512  return m_averageTrackWidth;
513  }
514 
519  unsigned int GetCircleSegmentCount( float aDiameter3DU ) const;
520 
525  unsigned int GetCircleSegmentCount( int aDiameterBIU ) const;
526 
532  const MAP_POLY& GetPolyMap() const noexcept
533  {
534  return m_layers_poly;
535  }
536 
538  {
539  return m_frontPlatedPadPolys;
540  }
541 
543  {
544  return m_backPlatedPadPolys;
545  }
546 
547  const MAP_POLY& GetHoleIdPolysMap() const noexcept
548  {
549  return m_layerHoleIdPolys;
550  }
551 
552  const MAP_POLY& GetHoleOdPolysMap() const noexcept
553  {
554  return m_layerHoleOdPolys;
555  }
556 
557 private:
563  bool createBoardPolygon( wxString* aErrorMsg );
564  void createLayers( REPORTER* aStatusReporter );
565  void destroyLayers();
566 
567  // Helper functions to create the board
568  void createTrack( const PCB_TRACK* aTrack, CONTAINER_2D_BASE* aDstContainer,
569  int aClearanceValue );
570 
571  void createPadWithClearance( const PAD *aPad, CONTAINER_2D_BASE* aDstContainer,
572  PCB_LAYER_ID aLayer, const wxSize& aClearanceValue ) const;
573 
574  OBJECT_2D* createPadWithDrill( const PAD* aPad, int aInflateValue );
575 
576  void addPadsWithClearance( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aDstContainer,
577  PCB_LAYER_ID aLayerId, int aInflateValue,
578  bool aSkipNPTHPadsWihNoCopper, bool aSkipPlatedPads,
579  bool aSkipNonPlatedPads );
580 
581  void addFootprintShapesWithClearance( const FOOTPRINT* aFootprint,
582  CONTAINER_2D_BASE* aDstContainer,
583  PCB_LAYER_ID aLayerId, int aInflateValue );
584 
585  void addShapeWithClearance( const PCB_TEXT* aText, CONTAINER_2D_BASE* aDstContainer,
586  PCB_LAYER_ID aLayerId, int aClearanceValue );
587 
588  void addShapeWithClearance( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aDstContainer,
589  PCB_LAYER_ID aLayerId, int aClearanceValue );
590 
591  void addShapeWithClearance( const PCB_DIMENSION_BASE* aDimension,
592  CONTAINER_2D_BASE* aDstContainer, PCB_LAYER_ID aLayerId,
593  int aClearanceValue );
594 
595  void addSolidAreasShapes( const ZONE* aZoneContainer, CONTAINER_2D_BASE* aDstContainer,
596  PCB_LAYER_ID aLayerId );
597 
598  void transformArcToSegments( const wxPoint& aCentre, const wxPoint& aStart, double aArcAngle,
599  int aCircleToSegmentsCount, int aWidth,
600  CONTAINER_2D_BASE* aDstContainer, const BOARD_ITEM& aBoardItem );
601 
602  void buildPadOutlineAsSegments( const PAD* aPad, CONTAINER_2D_BASE* aDstContainer, int aWidth );
603 
604  // Helper functions to create poly contours
605  void buildPadOutlineAsPolygon( const PAD* aPad, SHAPE_POLY_SET& aCornerBuffer,
606  int aWidth) const;
607 
608  void transformFPShapesToPolygon( const FOOTPRINT* aFootprint, PCB_LAYER_ID aLayer,
609  SHAPE_POLY_SET& aCornerBuffer ) const;
610 
611 public:
617 
625 
626 public:
636 
638 
639  // Raytracing light colors
643 
644  std::vector<SFVEC3F> m_RtLightColor;
645  std::vector<SFVEC2F> m_RtLightSphericalCoords;
646 
647  // Raytracing options
653 
657 
658 private:
662 
663  std::vector< bool > m_drawFlags;
668 
669 
670  wxPoint m_boardPos;
671  wxSize m_boardSize;
674 
675 
678 
681 
684 
687 
690 
693 
696 
699 
701 
703 
704 
707 
710 
713 
716 
719 
722 
725 
727  unsigned int m_copperLayersCount;
728 
731 
733  std::array<float, PCB_LAYER_ID_COUNT> m_layerZcoordTop;
734 
736  std::array<float, PCB_LAYER_ID_COUNT> m_layerZcoordBottom;
737 
740 
743 
746 
749 
751  unsigned int m_trackCount;
752 
755 
757  unsigned int m_viaCount;
758 
761 
763  unsigned int m_holeCount;
764 
767 
774  static const wxChar* m_logTrace;
775 
776 };
777 
778 
780 {
781 public:
782  virtual BOARD_ADAPTER& GetAdapter() = 0;
783  virtual CAMERA& GetCurrentCamera() = 0;
784 
785  virtual ~EDA_3D_BOARD_HOLDER() {};
786 };
787 
788 #endif // BOARD_ADAPTER_H
BVH_CONTAINER_2D m_throughHoleViaOds
List of through hole via inner diameters.
GRID3D_TYPE GetGridType() const noexcept
Get the current grid.
bool GetFlag(DISPLAY3D_FLG aFlag) const
Get a configuration status of a flag.
BVH_CONTAINER_2D * m_platedPadsFront
int m_RtShadowSampleCount
SFVEC4F m_SilkScreenColorBot
in realistic mode: SilkScreen color ( bot )
SHAPE_POLY_SET * m_backPlatedPadPolys
Polygon contours for hole outer diameters for each layer.
float m_solderPasteLayerThickness3DU
Number of tracks in the board.
BVH_CONTAINER_2D m_throughHoleIds
List of through hole vias with the radius of the hole inflated with the copper thickness.
bool IsFootprintShown(FOOTPRINT_ATTR_T aFPAttributes) const
Test if footprint should be displayed in relation to attributes and the flags.
void buildPadOutlineAsSegments(const PAD *aPad, CONTAINER_2D_BASE *aDstContainer, int aWidth)
float m_nonCopperLayerThickness3DU
solder paste layers thickness in 3D units.
SHAPE_POLY_SET * m_frontPlatedPadPolys
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:49
std::map< PCB_LAYER_ID, SHAPE_POLY_SET * > MAP_POLY
A type that stores polysets for each layer id.
Definition: board_adapter.h:57
void SetAntiAliasingMode(ANTIALIASING_MODE aAAmode)
Set the current antialiasing mode value.
const SHAPE_POLY_SET & GetOuterNonPlatedThroughHolePoly() const noexcept
OBJECT_2D * createPadWithDrill(const PAD *aPad, int aInflateValue)
Manage a bounding box defined by two SFVEC3F min max points.
Definition: bbox_3d.h:41
SFVEC4F GetColor(const COLOR4D &aColor) const
float m_averageHoleDiameter
const BVH_CONTAINER_2D & GetThroughHoleAnnularRings() const noexcept
Get the through hole annular rings container.
glm::vec4 SFVEC4F
Definition: xv3d_types.h:46
static KIGFX::COLOR4D g_DefaultSilkscreen
const SHAPE_POLY_SET & GetThroughHoleOdPolys() const noexcept
Get through hole outside diameter 2D polygons.
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
Set the status of a flag.
COLOR_SETTINGS * m_colors
float GetAverageTrackWidth() const noexcept
Average width of the tracks.
SFVEC4F m_SolderMaskColorTop
in realistic mode: solder mask color ( top )
void createPadWithClearance(const PAD *aPad, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayer, const wxSize &aClearanceValue) const
SHAPE_POLY_SET m_throughHoleAnnularRingPolys
const MAP_CONTAINER_2D_BASE & GetLayerMap() const noexcept
Get the map of containers that have the objects per layer.
MAP_CONTAINER_2D_BASE m_layerMap
2D elements for each layer.
void transformArcToSegments(const wxPoint &aCentre, const wxPoint &aStart, double aArcAngle, int aCircleToSegmentsCount, int aWidth, CONTAINER_2D_BASE *aDstContainer, const BOARD_ITEM &aBoardItem)
void transformFPShapesToPolygon(const FOOTPRINT *aFootprint, PCB_LAYER_ID aLayer, SHAPE_POLY_SET &aCornerBuffer) const
static KIGFX::COLOR4D g_DefaultSurfaceFinish
float GetAverageHoleDiameter() const noexcept
Average diameter of through holes.
float GetNonCopperLayerThickness() const noexcept
Get the current non copper layers thickness.
BVH_CONTAINER_2D m_throughHoleOds
List of plated through hole annular rings.
void InitSettings(REPORTER *aStatusReporter, REPORTER *aWarningReporter)
Function to be called by the render when it need to reload the settings for the board.
std::vector< SFVEC2F > m_RtLightSphericalCoords
SFVEC4F m_BoardBodyColor
in realistic mode: FR4 board color
SFVEC4F m_SolderPasteColor
in realistic mode: solder paste color
SHAPE_POLY_SET m_throughHoleViaOdPolys
Polygon contours for through hole via annular rings.
Abstract dimension API.
Definition: pcb_dimension.h:95
float m_averageTrackWidth
Number of through hole vias in the board.
SFVEC4F m_SolderMaskColorBot
in realistic mode: solder mask color ( bot )
void SetGridType(GRID3D_TYPE aGridType) noexcept
Set the current grid.
const SHAPE_POLY_SET & GetThroughHoleViaOdPolys() const noexcept
wxPoint m_boardPos
Board center position in board internal units.
const SHAPE_POLY_SET * GetFrontPlatedPadPolys()
std::vector< CUSTOM_COLOR_ITEM > CUSTOM_COLORS_LIST
Cache for storing the 3D shapes.
Definition: 3d_cache.h:52
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:70
std::array< float, PCB_LAYER_ID_COUNT > m_layerZcoordBottom
Copper thickness in 3D units.
float m_epoxyThickness3DU
Non copper layers thickness in 3D units.
void addFootprintShapesWithClearance(const FOOTPRINT *aFootprint, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayerId, int aInflateValue)
static CUSTOM_COLORS_LIST g_BoardColors
float m_copperThickness3DU
Epoxy thickness in 3D units.
static KIGFX::COLOR4D g_DefaultBackgroundBot
MAP_POLY m_layerHoleIdPolys
Polygon contours for non plated through hole outer diameters.
float m_RtSpreadRefractions
SFVEC3F m_RtCameraLightColor
FOOTPRINT_ATTR_T
The set of attributes allowed within a FOOTPRINT, using FOOTPRINT::SetAttributes() and FOOTPRINT::Get...
Definition: footprint.h:66
const SHAPE_POLY_SET * GetBackPlatedPadPolys()
static CUSTOM_COLORS_LIST g_FinishColors
const SHAPE_POLY_SET & GetThroughHoleAnnularRingPolys() const noexcept
void SetBoard(BOARD *aBoard) noexcept
Set current board to be rendered.
const BVH_CONTAINER_2D & GetThroughHoleIds() const noexcept
Get the through hole inner diameter container.
Classes used in Pcbnew, CvPcb and GerbView.
static CUSTOM_COLORS_LIST g_PasteColors
RENDER_ENGINE GetRenderEngine() const noexcept
A class used to derive camera objects from.
Definition: camera.h:77
bool Is3dLayerEnabled(PCB_LAYER_ID aLayer) const
Check if a layer is enabled.
static KIGFX::COLOR4D g_DefaultSolderMask
static KIGFX::COLOR4D g_DefaultBoardBody
void addShapeWithClearance(const PCB_TEXT *aText, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayerId, int aClearanceValue)
const BVH_CONTAINER_2D * GetPlatedPadsBack() const noexcept
int m_RtRecursiveReflectionCount
float m_RtSpreadReflections
SFVEC4F m_BgColorTop
background top color
unsigned int m_trackCount
Track average width.
std::vector< bool > m_drawFlags
std::array< float, PCB_LAYER_ID_COUNT > m_layerZcoordTop
Bottom (Start) Z position of each layer in 3D units.
void Set3dCacheManager(S3D_CACHE *aCachePointer) noexcept
Update the cache manager pointer.
Definition: board_adapter.h:80
GRID3D_TYPE m_gridType
SHAPE_POLY_SET m_board_poly
Board outline polygon.
S3D_CACHE * Get3dCacheManager() const noexcept
Return the 3D cache manager pointer.
Definition: board_adapter.h:88
BVH_CONTAINER_2D * m_platedPadsBack
The holes per each layer.
BBOX_3D m_boardBoundingBox
3D bounding box of the board in 3D units.
Represent a set of closed polygons.
wxPoint GetBoardPos() const noexcept
Get the board center.
float GetLayerTopZPos(PCB_LAYER_ID aLayerId) const noexcept
Get the top z position.
MAP_POLY m_layerHoleOdPolys
Polygon contours for hole inner diameters for each layer.
void buildPadOutlineAsPolygon(const PAD *aPad, SHAPE_POLY_SET &aCornerBuffer, int aWidth) const
MAP_CONTAINER_2D_BASE m_layerHoleMap
List of through holes with the radius of the hole inflated with the copper thickness.
float GetLayerBottomZPos(PCB_LAYER_ID aLayerId) const noexcept
Get the bottom z position.
void addSolidAreasShapes(const ZONE *aZoneContainer, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayerId)
MATERIAL_MODE GetMaterialMode() const noexcept
SFVEC3F m_RtLightColorTop
static KIGFX::COLOR4D g_DefaultBackgroundTop
void SetMaterialMode(MATERIAL_MODE aMaterialMode) noexcept
double BiuTo3dUnits() const noexcept
Board integer units To 3D units.
void addPadsWithClearance(const FOOTPRINT *aFootprint, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayerId, int aInflateValue, bool aSkipNPTHPadsWihNoCopper, bool aSkipPlatedPads, bool aSkipNonPlatedPads)
const BOARD * GetBoard() const noexcept
Get current board to be rendered.
const MAP_POLY & GetHoleIdPolysMap() const noexcept
double m_biuTo3Dunits
Top (End) Z position of each layer in 3D units.
SFVEC4F m_BgColorBot
background bottom color
void createTrack(const PCB_TRACK *aTrack, CONTAINER_2D_BASE *aDstContainer, int aClearanceValue)
ANTIALIASING_MODE
Anti-aliasing options.
Definition: ogl_attr_list.h:34
Handle a list of polygons defining a copper zone.
Definition: zone.h:56
BVH_CONTAINER_2D m_throughHoleAnnularRings
List of through hole inner diameters.
const BVH_CONTAINER_2D & GetThroughHoleOds() const noexcept
Get the inflated through hole outside diameters container.
const MAP_POLY & GetHoleOdPolysMap() const noexcept
unsigned int m_viaCount
Computed average diameter of the via holes in 3D units.
int m_RtRecursiveRefractionCount
std::vector< SFVEC3F > m_RtLightColor
const SHAPE_POLY_SET & GetBoardPoly() const noexcept
Get the current polygon of the epoxy board.
MATERIAL_MODE
Render 3d model shape materials mode.
Definition: 3d_enums.h:118
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.
Definition: board_adapter.h:51
int m_RtRefractionSampleCount
SFVEC4F GetItemColor(int aItemId) const
Get the technical color of a layer.
void createLayers(REPORTER *aStatusReporter)
void SetRenderEngine(RENDER_ENGINE aRenderEngine) noexcept
GRID3D_TYPE
Grid types.
Definition: 3d_enums.h:99
MAP_POLY m_layers_poly
const MAP_POLY & GetPolyMap() const noexcept
Get map of polygon's layers.
float GetFootprintZPos(bool aIsFlipped) const
Get the position of the footprint in 3d integer units considering if it is flipped or not.
DISPLAY3D_FLG
Flags used in rendering options.
Definition: 3d_enums.h:34
RENDER_ENGINE m_renderEngine
S3D_CACHE * m_3dModelManager
const BBOX_3D & GetBBox() const noexcept
Get the board outling bounding box.
unsigned int GetViaCount() const noexcept
Get number of vias in this board.
wxSize m_boardSize
Board size in board internal units.
unsigned int GetHoleCount() const noexcept
Get number of holes in this board.
SFVEC4F GetLayerColor(PCB_LAYER_ID aLayerId) const
Get the technical color of a layer.
MATERIAL_MODE m_materialMode
const BVH_CONTAINER_2D * GetPlatedPadsFront() const noexcept
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
ANTIALIASING_MODE GetAntiAliasingMode() const
Get the current antialiasing mode value.
virtual ~EDA_3D_BOARD_HOLDER()
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:190
static KIGFX::COLOR4D g_DefaultSolderPaste
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:65
glm::vec3 SFVEC3F
Definition: xv3d_types.h:44
unsigned int m_copperLayersCount
Scale factor to convert board internal units to 3D units normalized between -1.0 and 1....
const BVH_CONTAINER_2D & GetThroughHoleViaOds() const noexcept
bool createBoardPolygon(wxString *aErrorMsg)
Create the board outline polygon.
SFVEC4F m_CopperColor
in realistic mode: copper color
const SFVEC3F & GetBoardCenter() const noexcept
The board center position in 3D units.
BVH_CONTAINER_2D m_throughHoleViaIds
Number of copper layers actually used by the board.
virtual CAMERA & GetCurrentCamera()=0
float GetAverageViaHoleDiameter() const noexcept
Thee average diameter of the via holes.
RENDER_ENGINE
Render engine mode.
Definition: 3d_enums.h:110
SFVEC3F m_OpenGlSelectionColor
Color settings are a bit different than most of the settings objects in that there can be more than o...
SFVEC4F m_SilkScreenColorTop
in realistic mode: SilkScreen color ( top )
static CUSTOM_COLORS_LIST g_MaskColors
float GetCopperThickness() const noexcept
Get the current copper layer thickness.
void SetColorSettings(COLOR_SETTINGS *aSettings) noexcept
ANTIALIASING_MODE m_antiAliasingMode
static CUSTOM_COLORS_LIST g_SilkscreenColors
SFVEC3F m_boardCenter
3D center position of the board in 3D units.
float GetEpoxyThickness() const noexcept
Get the current epoxy thickness.
Definition: pad.h:57
float m_averageViaHoleDiameter
Number of holes in the board.
SFVEC3F m_RtLightColorBottom
const MAP_CONTAINER_2D_BASE & GetLayerHoleMap() const noexcept
Get the map of container that have the holes per layer.
virtual BOARD_ADAPTER & GetAdapter()=0
float m_RtSpreadShadows
SHAPE_POLY_SET m_throughHoleOdPolys
Polygon contours for through holes via outer diameters.
wxSize GetBoardSize() const noexcept
Get the board size.
Helper class to handle information needed to display 3D board.
Definition: board_adapter.h:68
unsigned int GetCircleSegmentCount(float aDiameter3DU) const
int m_RtReflectionSampleCount
SHAPE_POLY_SET m_nonPlatedThroughHoleOdPolys
Polygon contours for through hole outer diameters.
unsigned int m_holeCount
Computed average diameter of the holes in 3D units.
int GetHolePlatingThickness() const noexcept
Get the current copper layer thickness.
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:103