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 
39 #include <pad.h>
40 #include <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 <dimension.h>
46 #include <zone.h>
47 #include <footprint.h>
48 #include <reporter.h>
49 
51 
53 typedef std::map< PCB_LAYER_ID, BVH_CONTAINER_2D *> MAP_CONTAINER_2D_BASE;
54 
56 typedef std::map< PCB_LAYER_ID, SHAPE_POLY_SET *> MAP_POLY;
57 
61 #define RANGE_SCALE_3D 8.0f
62 
63 
68 {
69 public:
70  BOARD_ADAPTER();
71 
73 
79  void Set3dCacheManager( S3D_CACHE* aCachePointer ) noexcept
80  {
81  m_3dModelManager = aCachePointer;
82  }
83 
87  S3D_CACHE* Get3dCacheManager() const noexcept
88  {
89  return m_3dModelManager;
90  }
91 
98  bool GetFlag( DISPLAY3D_FLG aFlag ) const ;
99 
106  void SetFlag( DISPLAY3D_FLG aFlag, bool aState );
107 
113  bool Is3dLayerEnabled( PCB_LAYER_ID aLayer ) const;
114 
118  bool IsFootprintShown( FOOTPRINT_ATTR_T aFPAttributes ) const;
119 
125  void SetBoard( BOARD* aBoard ) noexcept
126  {
127  m_board = aBoard;
128  }
129 
135  const BOARD* GetBoard() const noexcept
136  {
137  return m_board;
138  }
139 
140  void SetColorSettings( COLOR_SETTINGS* aSettings ) noexcept
141  {
142  m_colors = aSettings;
143  }
144 
151  void InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningReporter );
152 
158  double BiuTo3dUnits() const noexcept
159  {
160  return m_biuTo3Dunits;
161  }
162 
168  const BBOX_3D& GetBBox() const noexcept
169  {
170  return m_boardBoundingBox;
171  }
172 
178  float GetEpoxyThickness() const noexcept
179  {
180  return m_epoxyThickness3DU;
181  }
182 
188  float GetNonCopperLayerThickness() const noexcept
189  {
191  }
192 
198  float GetCopperThickness() const noexcept
199  {
200  return m_copperThickness3DU;
201  }
202 
208  int GetHolePlatingThickness() const noexcept;
209 
215  wxSize GetBoardSize() const noexcept
216  {
217  return m_boardSize;
218  }
219 
225  wxPoint GetBoardPos() const noexcept
226  {
227  return m_boardPos;
228  }
229 
235  const SFVEC3F& GetBoardCenter() const noexcept
236  {
237  return m_boardCenter;
238  }
239 
247  float GetFootprintZPos( bool aIsFlipped ) const ;
248 
254  GRID3D_TYPE GetGridType() const noexcept
255  {
256  return m_gridType;
257  }
258 
264  void SetGridType( GRID3D_TYPE aGridType ) noexcept
265  {
266  m_gridType = aGridType;
267  }
268 
275 
282 
286  void SetRenderEngine( RENDER_ENGINE aRenderEngine ) noexcept
287  {
288  m_renderEngine = aRenderEngine;
289  }
290 
295  {
296  return m_renderEngine;
297  }
298 
302  void SetMaterialMode( MATERIAL_MODE aMaterialMode ) noexcept
303  {
304  m_materialMode = aMaterialMode;
305  }
306 
311  {
312  return m_materialMode;
313  }
314 
320  const SHAPE_POLY_SET& GetBoardPoly() const noexcept
321  {
322  return m_board_poly;
323  }
324 
331  SFVEC4F GetLayerColor( PCB_LAYER_ID aLayerId ) const;
332 
339  SFVEC4F GetItemColor( int aItemId ) const;
340 
345  SFVEC4F GetColor( COLOR4D aColor ) const;
346 
353  float GetLayerTopZPos( PCB_LAYER_ID aLayerId ) const noexcept
354  {
355  return m_layerZcoordTop[aLayerId];
356  }
357 
364  float GetLayerBottomZPos( PCB_LAYER_ID aLayerId ) const noexcept
365  {
366  return m_layerZcoordBottom[aLayerId];
367  }
368 
374  const MAP_CONTAINER_2D_BASE& GetLayerMap() const noexcept
375  {
376  return m_layerMap;
377  }
378 
379  const BVH_CONTAINER_2D* GetPlatedPadsFront() const noexcept
380  {
381  return m_platedPadsFront;
382  }
383 
384  const BVH_CONTAINER_2D* GetPlatedPadsBack() const noexcept
385  {
386  return m_platedPadsBack;
387  }
388 
394  const MAP_CONTAINER_2D_BASE& GetLayerHoleMap() const noexcept
395  {
396  return m_layerHoleMap;
397  }
398 
404  const BVH_CONTAINER_2D& GetThroughHoleOds() const noexcept
405  {
406  return m_throughHoleOds;
407  }
408 
415  {
417  }
418 
426  const SHAPE_POLY_SET& GetThroughHoleOdPolys() const noexcept
427  {
428  return m_throughHoleOdPolys;
429  }
430 
432  {
434  }
435 
437  {
439  }
440 
444  const BVH_CONTAINER_2D& GetThroughHoleViaOds() const noexcept
445  {
446  return m_throughHoleViaOds;
447  }
448 
449  const SHAPE_POLY_SET& GetThroughHoleViaOdPolys() const noexcept
450  {
452  }
453 
459  const BVH_CONTAINER_2D& GetThroughHoleIds() const noexcept
460  {
461  return m_throughHoleIds;
462  }
463 
469  unsigned int GetViaCount() const noexcept
470  {
471  return m_viaCount;
472  }
473 
479  unsigned int GetHoleCount() const noexcept
480  {
481  return m_holeCount;
482  }
483 
489  float GetAverageViaHoleDiameter() const noexcept
490  {
492  }
493 
499  float GetAverageHoleDiameter() const noexcept
500  {
501  return m_averageHoleDiameter;
502  }
503 
509  float GetAverageTrackWidth() const noexcept
510  {
511  return m_averageTrackWidth;
512  }
513 
518  unsigned int GetCircleSegmentCount( float aDiameter3DU ) const;
519 
524  unsigned int GetCircleSegmentCount( int aDiameterBIU ) const;
525 
531  const MAP_POLY& GetPolyMap() const noexcept
532  {
533  return m_layers_poly;
534  }
535 
537  {
538  return m_frontPlatedPadPolys;
539  }
540 
542  {
543  return m_backPlatedPadPolys;
544  }
545 
546  const MAP_POLY& GetHoleIdPolysMap() const noexcept
547  {
548  return m_layerHoleIdPolys;
549  }
550 
551  const MAP_POLY& GetHoleOdPolysMap() const noexcept
552  {
553  return m_layerHoleOdPolys;
554  }
555 
556 private:
562  bool createBoardPolygon( wxString* aErrorMsg );
563  void createLayers( REPORTER* aStatusReporter );
564  void destroyLayers();
565 
566  // Helper functions to create the board
567  void createTrack( const TRACK* aTrack, CONTAINER_2D_BASE* aDstContainer, int aClearanceValue );
568 
569  void createPadWithClearance( const PAD *aPad, CONTAINER_2D_BASE* aDstContainer,
570  PCB_LAYER_ID aLayer, wxSize aClearanceValue ) const;
571 
572  OBJECT_2D* createPadWithDrill( const PAD* aPad, int aInflateValue );
573 
574  void addPadsWithClearance( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aDstContainer,
575  PCB_LAYER_ID aLayerId, int aInflateValue,
576  bool aSkipNPTHPadsWihNoCopper, bool aSkipPlatedPads,
577  bool aSkipNonPlatedPads );
578 
579  void addFootprintShapesWithClearance( const FOOTPRINT* aFootprint,
580  CONTAINER_2D_BASE* aDstContainer,
581  PCB_LAYER_ID aLayerId, int aInflateValue );
582 
583  void addShapeWithClearance( const PCB_TEXT* aText, CONTAINER_2D_BASE* aDstContainer,
584  PCB_LAYER_ID aLayerId, int aClearanceValue );
585 
586  void addShapeWithClearance( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aDstContainer,
587  PCB_LAYER_ID aLayerId, int aClearanceValue );
588 
589  void addShapeWithClearance( const DIMENSION_BASE* aDimension, CONTAINER_2D_BASE* aDstContainer,
590  PCB_LAYER_ID aLayerId, int aClearanceValue );
591 
592  void addSolidAreasShapes( const ZONE* aZoneContainer, CONTAINER_2D_BASE* aDstContainer,
593  PCB_LAYER_ID aLayerId );
594 
595  void transformArcToSegments( const wxPoint& aCentre, const wxPoint& aStart, double aArcAngle,
596  int aCircleToSegmentsCount, int aWidth,
597  CONTAINER_2D_BASE* aDstContainer, const BOARD_ITEM& aBoardItem );
598 
599  void buildPadOutlineAsSegments( const PAD* aPad, CONTAINER_2D_BASE* aDstContainer, int aWidth );
600 
601  // Helper functions to create poly contours
602  void buildPadOutlineAsPolygon( const PAD* aPad, SHAPE_POLY_SET& aCornerBuffer,
603  int aWidth) const;
604 
605  void transformFPShapesToPolygon( const FOOTPRINT* aFootprint, PCB_LAYER_ID aLayer,
606  SHAPE_POLY_SET& aCornerBuffer ) const;
607 
608 public:
618 
620 
621  // Raytracing light colors
625 
626  std::vector<SFVEC3F> m_RtLightColor;
627  std::vector<SFVEC2F> m_RtLightSphericalCoords;
628 
629  // Raytracing options
635 
639 
640 private:
644 
645  std::vector< bool > m_drawFlags;
650 
651 
652  wxPoint m_boardPos;
653  wxSize m_boardSize;
656 
657 
660 
663 
666 
669 
672 
675 
678 
681 
683 
685 
686 
689 
692 
695 
698 
701 
704 
707 
709  unsigned int m_copperLayersCount;
710 
713 
715  std::array<float, PCB_LAYER_ID_COUNT> m_layerZcoordTop;
716 
718  std::array<float, PCB_LAYER_ID_COUNT> m_layerZcoordBottom;
719 
722 
725 
728 
731 
733  unsigned int m_trackCount;
734 
737 
739  unsigned int m_viaCount;
740 
743 
745  unsigned int m_holeCount;
746 
749 
756  static const wxChar* m_logTrace;
757 
758 };
759 
760 
762 {
763 public:
764  virtual BOARD_ADAPTER& GetAdapter() = 0;
765  virtual CAMERA& GetCurrentCamera() = 0;
766 
767  virtual ~EDA_3D_BOARD_HOLDER() {};
768 };
769 
770 #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.
SFVEC4F GetColor(COLOR4D aColor) const
BVH_CONTAINER_2D * m_platedPadsFront
void createTrack(const TRACK *aTrack, CONTAINER_2D_BASE *aDstContainer, int aClearanceValue)
int m_RtShadowSampleCount
SFVEC4F m_SilkScreenColorBot
in realistic mode: SilkScreen color ( bot )
void createPadWithClearance(const PAD *aPad, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayer, wxSize aClearanceValue) const
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:82
std::map< PCB_LAYER_ID, SHAPE_POLY_SET * > MAP_POLY
A type that stores polysets for each layer id.
Definition: board_adapter.h:56
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
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
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 )
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
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.
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()
Cache for storing the 3D shapes.
Definition: 3d_cache.h:52
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:64
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)
float m_copperThickness3DU
Epoxy thickness in 3D units.
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()
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.
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.
PCB_LAYER_ID
A quick note on layer IDs:
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:79
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:87
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
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
ANTIALIASING_MODE
Anti-aliasing options.
Definition: ogl_attr_list.h:34
Handle a list of polygons defining a copper zone.
Definition: zone.h:57
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:117
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:50
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:98
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
Board layer functions and definitions.
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
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:109
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 )
float GetCopperThickness() const noexcept
Get the current copper layer thickness.
void SetColorSettings(COLOR_SETTINGS *aSettings) noexcept
ANTIALIASING_MODE m_antiAliasingMode
SFVEC3F m_boardCenter
3D center position of the board in 3D units.
float GetEpoxyThickness() const noexcept
Get the current epoxy thickness.
Definition: pad.h:60
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
Abstract dimension API.
Definition: dimension.h:95
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:67
unsigned int GetCircleSegmentCount(float aDiameter3DU) const
int m_RtReflectionSampleCount
SHAPE_POLY_SET m_nonPlatedThroughHoleOdPolys
Polygon contours for through hole outer diameters.
Definition: track.h:83
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:98