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-2020 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/ccontainer2d.h"
31 #include "../3d_rendering/3d_render_raytracing/accelerators/ccontainer.h"
32 #include "../3d_rendering/3d_render_raytracing/shapes3D/cbbox.h"
33 #include "../3d_rendering/ccamera.h"
34 #include "../3d_enums.h"
35 #include "../3d_cache/3d_cache.h"
36 #include "../common_ogl/cogl_att_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, CBVHCONTAINER2D *> MAP_CONTAINER_2D;
54 
56 typedef std::map< PCB_LAYER_ID, SHAPE_POLY_SET *> MAP_POLY;
57 
61 #define RANGE_SCALE_3D 8.0f
62 
63 
69 {
70  public:
71 
72  BOARD_ADAPTER();
73 
75 
80  void Set3DCacheManager( S3D_CACHE *aCachePointer ) noexcept
81  {
82  m_3d_model_manager = aCachePointer;
83  }
84 
89  S3D_CACHE *Get3DCacheManager( ) const noexcept
90  {
91  return m_3d_model_manager;
92  }
93 
99  bool GetFlag( DISPLAY3D_FLG aFlag ) const ;
100 
106  void SetFlag( DISPLAY3D_FLG aFlag, bool aState );
107 
112  bool Is3DLayerEnabled( PCB_LAYER_ID aLayer ) const;
113 
118  bool ShouldFPBeDisplayed( FOOTPRINT_ATTR_T aFPAttributes ) const;
119 
124  void SetBoard( BOARD *aBoard ) noexcept
125  {
126  m_board = aBoard;
127  }
128 
133  const BOARD *GetBoard() const noexcept
134  {
135  return m_board;
136  }
137 
138  void SetColorSettings( COLOR_SETTINGS* aSettings ) noexcept
139  {
140  m_colors = aSettings;
141  }
142 
149  void InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningReporter );
150 
155  double BiuTo3Dunits() const noexcept
156  {
157  return m_biuTo3Dunits;
158  }
159 
164  const CBBOX &GetBBox3DU() const noexcept
165  {
166  return m_boardBoundingBox;
167  }
168 
173  float GetEpoxyThickness3DU() const noexcept
174  {
175  return m_epoxyThickness3DU;
176  }
177 
182  float GetNonCopperLayerThickness3DU() const noexcept
183  {
185  }
186 
191  float GetCopperThickness3DU() const noexcept
192  {
193  return m_copperThickness3DU;
194  }
195 
200  int GetHolePlatingThicknessBIU() const noexcept;
201 
206  wxSize GetBoardSizeBIU() const noexcept
207  {
208  return m_boardSize;
209  }
210 
215  wxPoint GetBoardPosBIU() const noexcept
216  {
217  return m_boardPos;
218  }
219 
224  const SFVEC3F &GetBoardCenter3DU() const noexcept
225  {
226  return m_boardCenter;
227  }
228 
236  float GetModulesZcoord3DIU( bool aIsFlipped ) const ;
237 
242  GRID3D_TYPE GridGet() const noexcept
243  {
244  return m_3D_grid_type;
245  }
246 
251  void GridSet( GRID3D_TYPE aGridType ) noexcept
252  {
253  m_3D_grid_type = aGridType;
254  }
255 
261 
267 
272  void RenderEngineSet( RENDER_ENGINE aRenderEngine ) noexcept
273  {
274  m_render_engine = aRenderEngine;
275  }
276 
282  {
283  return m_render_engine;
284  }
285 
290  void MaterialModeSet( MATERIAL_MODE aMaterialMode ) noexcept
291  {
292  m_material_mode = aMaterialMode;
293  }
294 
300  {
301  return m_material_mode;
302  }
303 
308  const SHAPE_POLY_SET &GetBoardPoly() const noexcept
309  {
310  return m_board_poly;
311  }
312 
318  SFVEC4F GetLayerColor( PCB_LAYER_ID aLayerId ) const;
319 
325  SFVEC4F GetItemColor( int aItemId ) const;
326 
332  SFVEC4F GetColor( COLOR4D aColor ) const;
333 
339  float GetLayerTopZpos3DU( PCB_LAYER_ID aLayerId ) const noexcept
340  {
341  return m_layerZcoordTop[aLayerId];
342  }
343 
349  float GetLayerBottomZpos3DU( PCB_LAYER_ID aLayerId ) const noexcept
350  {
351  return m_layerZcoordBottom[aLayerId];
352  }
353 
358  const MAP_CONTAINER_2D &GetMapLayers() const noexcept
359  {
360  return m_layers_container2D;
361  }
362 
363  const CBVHCONTAINER2D* GetPlatedPads_Front() const noexcept
364  {
366  }
367 
368  const CBVHCONTAINER2D* GetPlatedPads_Back() const noexcept
369  {
371  }
372 
377  const MAP_CONTAINER_2D &GetMapLayersHoles() const noexcept
378  {
379  return m_layers_holes2D;
380  }
381 
386  const CBVHCONTAINER2D &GetThroughHole_Outer() const noexcept
387  {
388  return m_through_holes_outer;
389  }
390 
397  {
399  }
400 
402  {
404  }
405 
407  {
409  }
410 
412  {
414  }
415 
421  {
423  }
424 
426  {
428  }
429 
434  const CBVHCONTAINER2D &GetThroughHole_Inner() const noexcept
435  {
436  return m_through_holes_inner;
437  }
438 
443  unsigned int GetStats_Nr_Vias() const noexcept
444  {
445  return m_stats_nr_vias;
446  }
447 
452  unsigned int GetStats_Nr_Holes() const noexcept
453  {
454  return m_stats_nr_holes;
455  }
456 
461  float GetStats_Med_Via_Hole_Diameter3DU() const noexcept
462  {
464  }
465 
470  float GetStats_Med_Hole_Diameter3DU() const noexcept
471  {
473  }
474 
479  float GetStats_Med_Track_Width() const noexcept
480  {
482  }
483 
489  unsigned int GetNrSegmentsCircle( float aDiameter3DU ) const;
490 
496  unsigned int GetNrSegmentsCircle( int aDiameterBIU ) const;
497 
502  const MAP_POLY &GetPolyMap() const noexcept
503  {
504  return m_layers_poly;
505  }
506 
508  {
509  return m_F_Cu_PlatedPads_poly;
510  }
511 
513  {
514  return m_B_Cu_PlatedPads_poly;
515  }
516 
517  const MAP_POLY &GetPolyMapHoles_Inner() const noexcept
518  {
520  }
521 
522  const MAP_POLY &GetPolyMapHoles_Outer() const noexcept
523  {
525  }
526 
527  private:
533  bool createBoardPolygon( wxString* aErrorMsg );
534  void createLayers( REPORTER* aStatusReporter );
535  void destroyLayers();
536 
537  // Helper functions to create the board
538  void createNewTrack( const TRACK* aTrack, CGENERICCONTAINER2D *aDstContainer,
539  int aClearanceValue );
540 
541  void createNewPadWithClearance( const PAD *aPad, CGENERICCONTAINER2D *aDstContainer,
542  PCB_LAYER_ID aLayer, wxSize aClearanceValue ) const;
543 
544  COBJECT2D *createNewPadDrill( const PAD* aPad, int aInflateValue );
545 
546  void AddPadsWithClearanceToContainer( const FOOTPRINT *aFootprint,
547  CGENERICCONTAINER2D *aDstContainer,
548  PCB_LAYER_ID aLayerId, int aInflateValue,
549  bool aSkipNPTHPadsWihNoCopper, bool aSkipPlatedPads,
550  bool aSkipNonPlatedPads );
551 
552  void AddFPShapesWithClearanceToContainer( const FOOTPRINT *aFootprint,
553  CGENERICCONTAINER2D *aDstContainer,
554  PCB_LAYER_ID aLayerId, int aInflateValue );
555 
556  void AddShapeWithClearanceToContainer( const PCB_TEXT *aText,
557  CGENERICCONTAINER2D *aDstContainer,
558  PCB_LAYER_ID aLayerId, int aClearanceValue );
559 
560  void AddShapeWithClearanceToContainer( const PCB_SHAPE *aShape,
561  CGENERICCONTAINER2D *aDstContainer,
562  PCB_LAYER_ID aLayerId, int aClearanceValue );
563 
564  void AddShapeWithClearanceToContainer( const DIMENSION_BASE *aDimension,
565  CGENERICCONTAINER2D *aDstContainer,
566  PCB_LAYER_ID aLayerId, int aClearanceValue );
567 
568  void AddSolidAreasShapesToContainer( const ZONE *aZoneContainer,
569  CGENERICCONTAINER2D *aDstContainer,
570  PCB_LAYER_ID aLayerId );
571 
572  void TransformArcToSegments( const wxPoint &aCentre, const wxPoint &aStart, double aArcAngle,
573  int aCircleToSegmentsCount, int aWidth,
574  CGENERICCONTAINER2D *aDstContainer, const BOARD_ITEM &aBoardItem );
575 
576  void buildPadShapeThickOutlineAsSegments( const PAD *aPad, CGENERICCONTAINER2D *aDstContainer,
577  int aWidth );
578 
579  // Helper functions to create poly contours
580  void buildPadShapeThickOutlineAsPolygon( const PAD *aPad, SHAPE_POLY_SET &aCornerBuffer,
581  int aWidth) const;
582 
583  void transformFPShapesToPolygon( const FOOTPRINT *aFootprint, PCB_LAYER_ID aLayer,
584  SHAPE_POLY_SET& aCornerBuffer ) const;
585 
586 public:
596 
598 
599  // Raytracing light colors
600 
604 
605  std::vector<SFVEC3F> m_raytrace_lightColor;
606  std::vector<SFVEC2F> m_raytrace_lightSphericalCoords;
607 
608  // Raytracing options
612 
616 
619 
620 private:
621 
625 
626  // Render options
627 
628  std::vector< bool > m_drawFlags;
633 
634 
635  // Pcb board position
636 
638  wxPoint m_boardPos;
639 
641  wxSize m_boardSize;
642 
645 
646 
647  // Pcb board bounding boxes
648 
651 
654 
657 
660 
663 
666 
669 
672 
675 
678 
679 
680  // 2D element containers
681 
684 
687 
690 
694 
698 
702 
706 
710 
711 
712  // Layers information
713 
715  unsigned int m_copperLayersCount;
716 
720 
722  std::array<float, PCB_LAYER_ID_COUNT> m_layerZcoordTop;
723 
725  std::array<float, PCB_LAYER_ID_COUNT> m_layerZcoordBottom;
726 
729 
732 
735 
738 
741 
742 
743  // Statistics
744 
746  unsigned int m_stats_nr_tracks;
747 
750 
752  unsigned int m_stats_nr_vias;
753 
756 
758  unsigned int m_stats_nr_holes;
759 
762 
769  static const wxChar *m_logTrace;
770 
771 };
772 
773 
775 {
776 public:
777  virtual BOARD_ADAPTER& GetAdapter() = 0;
778  virtual CCAMERA& GetCurrentCamera() = 0;
779 
780  virtual ~EDA_3D_BOARD_HOLDER() {};
781 };
782 
783 #endif // BOARD_ADAPTER_H
double BiuTo3Dunits() const noexcept
BiuTo3Dunits - Board integer units To 3D units.
GRID3D_TYPE m_3D_grid_type
bool GetFlag(DISPLAY3D_FLG aFlag) const
GetFlag - get a configuration status of a flag.
std::vector< SFVEC3F > m_raytrace_lightColor
void GridSet(GRID3D_TYPE aGridType) noexcept
GridSet - set the current grid.
SFVEC3F m_raytrace_lightColorBottom
SFVEC4F GetColor(COLOR4D aColor) const
GetColor.
void AddShapeWithClearanceToContainer(const PCB_TEXT *aText, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayerId, int aClearanceValue)
SFVEC3F m_raytrace_lightColorCamera
std::map< PCB_LAYER_ID, CBVHCONTAINER2D * > MAP_CONTAINER_2D
A type that stores a container of 2d objects for each layer id.
Definition: board_adapter.h:50
SFVEC4F m_SilkScreenColorBot
in realistic mode: SilkScreen color ( bot )
int m_raytrace_nrsamples_refractions
CBVHCONTAINER2D * m_platedpads_container2D_B_Cu
SHAPE_POLY_SET m_through_outer_holes_poly_NPTH
It contains polygon contours for (just) non plated through holes (outer cylinder)
float m_nonCopperLayerThickness3DU
Non copper layers thickness.
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
Definition: board_item.h:86
std::vector< SFVEC2F > m_raytrace_lightSphericalCoords
std::map< PCB_LAYER_ID, SHAPE_POLY_SET * > MAP_POLY
A type that stores polysets for each layer id.
Definition: board_adapter.h:56
MAP_POLY m_layers_outer_holes_poly
It contains polygon contours for holes of each layer (outer holes)
float m_raytrace_spread_reflections
float GetStats_Med_Hole_Diameter3DU() const noexcept
GetStats_Med_Hole_Diameter3DU - Average diameter of holes.
SHAPE_POLY_SET * m_B_Cu_PlatedPads_poly
glm::vec4 SFVEC4F
Definition: xv3d_types.h:49
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
SetFlag - set the status of a flag.
COLOR_SETTINGS * m_colors
SFVEC4F m_SolderMaskColorTop
in realistic mode: solder mask color ( top )
const MAP_CONTAINER_2D & GetMapLayersHoles() const noexcept
GetMapLayersHoles -Get the map of container that have the holes per layer.
Class CCAMERA is a virtual class used to derive CCAMERA objects from.
Definition: ccamera.h:79
CBVHCONTAINER2D m_through_holes_inner
It contains the list of throughHoles of the board, the radius is the inner hole.
MAP_POLY m_layers_inner_holes_poly
It contains polygon contours for holes of each layer (inner holes)
void transformFPShapesToPolygon(const FOOTPRINT *aFootprint, PCB_LAYER_ID aLayer, SHAPE_POLY_SET &aCornerBuffer) const
SFVEC3F m_raytrace_lightColorTop
const CBBOX & GetBBox3DU() const noexcept
GetBBox3DU - Get the bbox of the pcb board.
float GetLayerTopZpos3DU(PCB_LAYER_ID aLayerId) const noexcept
GetLayerTopZpos3DU - Get the top z position.
float GetCopperThickness3DU() const noexcept
GetCopperThickness3DU - Get the current copper layer thickness.
void InitSettings(REPORTER *aStatusReporter, REPORTER *aWarningReporter)
InitSettings - Function to be called by the render when it need to reload the settings for the board.
SFVEC4F m_BoardBodyColor
in realistic mode: FR4 board color
SFVEC4F m_SolderPasteColor
in realistic mode: solder paste color
void buildPadShapeThickOutlineAsPolygon(const PAD *aPad, SHAPE_POLY_SET &aCornerBuffer, int aWidth) const
unsigned int m_stats_nr_holes
number of holes in the board
float GetStats_Med_Track_Width() const noexcept
GetStats_Med_Track_Width - Average width of the tracks.
const MAP_POLY & GetPolyMapHoles_Outer() const noexcept
SFVEC4F m_SolderMaskColorBot
in realistic mode: solder mask color ( bot )
const CBVHCONTAINER2D & GetThroughHole_Vias_Outer() const noexcept
GetThroughHole_Vias_Outer -.
virtual CCAMERA & GetCurrentCamera()=0
CBVHCONTAINER2D m_through_holes_outer_ring
It contains the list of throughHoles of the board, the radius of the hole is inflated with the annula...
wxPoint m_boardPos
center board actual position in board units
S3D_CACHE.
Definition: 3d_cache.h:54
REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:64
wxSize GetBoardSizeBIU() const noexcept
GetBoardSizeBIU - Get the board size.
SHAPE_POLY_SET m_through_outer_ring_holes_poly
It contains polygon contours for through holes vias (outer annular ring)
const CBVHCONTAINER2D * GetPlatedPads_Front() const noexcept
S3D_CACHE * m_3d_model_manager
std::array< float, PCB_LAYER_ID_COUNT > m_layerZcoordBottom
Bottom (Start) Z position of each layer (normalized)
float m_epoxyThickness3DU
Epoxy thickness (normalized)
unsigned int m_stats_nr_vias
Nr of vias.
const SHAPE_POLY_SET * GetPolyPlatedPads_Front()
float m_copperThickness3DU
Copper thickness (normalized)
void RenderEngineSet(RENDER_ENGINE aRenderEngine) noexcept
RenderEngineSet.
FOOTPRINT_ATTR_T
Enum FOOTPRINT_ATTR_T is the set of attributes allowed within a FOOTPRINT, using FOOTPRINT::SetAttrib...
Definition: footprint.h:67
const MAP_CONTAINER_2D & GetMapLayers() const noexcept
GetMapLayers - Get the map of container that have the objects per layer.
void SetBoard(BOARD *aBoard) noexcept
SetBoard - Set current board to be rendered.
const SHAPE_POLY_SET & GetThroughHole_Outer_poly_NPTH() const noexcept
Classes used in Pcbnew, CvPcb and GerbView.
void TransformArcToSegments(const wxPoint &aCentre, const wxPoint &aStart, double aArcAngle, int aCircleToSegmentsCount, int aWidth, CGENERICCONTAINER2D *aDstContainer, const BOARD_ITEM &aBoardItem)
RENDER_ENGINE m_render_engine
SHAPE_POLY_SET * m_F_Cu_PlatedPads_poly
PCB_LAYER_ID
A quick note on layer IDs:
unsigned int GetNrSegmentsCircle(float aDiameter3DU) const
GetNrSegmentsCircle.
float m_raytrace_spread_shadows
const CBVHCONTAINER2D & GetThroughHole_Outer() const noexcept
GetThroughHole_Outer - Get the inflated ThroughHole container.
SFVEC4F m_BgColorTop
background top color
std::vector< bool > m_drawFlags
std::array< float, PCB_LAYER_ID_COUNT > m_layerZcoordTop
Top (End) Z position of each layer (normalized)
float GetLayerBottomZpos3DU(PCB_LAYER_ID aLayerId) const noexcept
GetLayerBottomZpos3DU - Get the bottom z position.
const CBVHCONTAINER2D * GetPlatedPads_Back() const noexcept
int GetHolePlatingThicknessBIU() const noexcept
GetCopperThicknessBIU - Get the current copper layer thickness.
MAP_CONTAINER_2D m_layers_holes2D
It contains the holes per each layer.
int m_raytrace_nrsamples_shadows
CBBOX m_boardBoundingBox
3d bounding box of the pcb board in 3d units
SHAPE_POLY_SET m_board_poly
PCB board outline polygon.
COBJECT2D * createNewPadDrill(const PAD *aPad, int aInflateValue)
const MAP_POLY & GetPolyMapHoles_Inner() const noexcept
SHAPE_POLY_SET.
void AntiAliasingSet(ANTIALIASING_MODE aAAmode)
AntiAliasingSet - set the current antialiasing mode value.
const SHAPE_POLY_SET * GetPolyPlatedPads_Back()
ANTIALIASING_MODE
Anti-aliasing options.
Definition: cogl_att_list.h:34
S3D_CACHE * Get3DCacheManager() const noexcept
Get3DCacheManager - Return the 3d cache manager pointer.
Definition: board_adapter.h:89
float m_raytrace_spread_refractions
RENDER_ENGINE RenderEngineGet() const noexcept
RenderEngineGet.
SHAPE_POLY_SET m_through_outer_holes_vias_poly
It contains polygon contours for through holes vias (outer cylinder)
float m_stats_track_med_width
Track average width.
const BOARD * GetBoard() const noexcept
GetBoard - Get current board to be rendered.
float m_calc_seg_max_factor3DU
max factor used for cicle segment approximation calculation
double m_biuTo3Dunits
Normalization scale to convert board internal units to 3D units to normalize 3D units between -1....
SFVEC3F m_opengl_selectionColor
SFVEC4F m_BgColorBot
background bottom color
bool Is3DLayerEnabled(PCB_LAYER_ID aLayer) const
Is3DLayerEnabled - Check if a layer is enabled.
const CBVHCONTAINER2D & GetThroughHole_Inner() const noexcept
GetThroughHole_Inner - Get the ThroughHole container.
ZONE handles a list of polygons defining a copper zone.
Definition: zone.h:57
const SHAPE_POLY_SET & GetBoardPoly() const noexcept
GetBoardPoly - Get the current polygon of the epoxy board.
MATERIAL_MODE
Render 3d model shape materials mode.
Definition: 3d_enums.h:117
const SHAPE_POLY_SET & GetThroughHole_Outer_Ring_poly() const noexcept
void AddPadsWithClearanceToContainer(const FOOTPRINT *aFootprint, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayerId, int aInflateValue, bool aSkipNPTHPadsWihNoCopper, bool aSkipPlatedPads, bool aSkipNonPlatedPads)
int m_raytrace_recursivelevel_reflections
SFVEC4F GetItemColor(int aItemId) const
GetItemColor - get the technical color of a layer.
void createLayers(REPORTER *aStatusReporter)
GRID3D_TYPE
Grid types.
Definition: 3d_enums.h:98
MAP_POLY m_layers_poly
It contains polygon contours for each layer.
void Set3DCacheManager(S3D_CACHE *aCachePointer) noexcept
Set3DCacheManager - Update the Cache manager pointer.
Definition: board_adapter.h:80
CBVHCONTAINER2D m_through_holes_vias_outer
It contains the list of throughHoles vias of the board, the radius of the hole is inflated with the c...
const MAP_POLY & GetPolyMap() const noexcept
GetPolyMap - Get maps of polygons's layers.
const CBVHCONTAINER2D & GetThroughHole_Outer_Ring() const noexcept
GetThroughHole_Outer_Ring - Get the ThroughHole container that include the width of the annular ring.
DISPLAY3D_FLG
Flags used in rendering options.
Definition: 3d_enums.h:34
CBVHCONTAINER2D m_through_holes_outer
It contains the list of throughHoles of the board, the radius of the hole is inflated with the copper...
void AddFPShapesWithClearanceToContainer(const FOOTPRINT *aFootprint, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayerId, int aInflateValue)
const SHAPE_POLY_SET & GetThroughHole_Outer_poly() const noexcept
wxSize m_boardSize
board actual size in board units
SFVEC4F GetLayerColor(PCB_LAYER_ID aLayerId) const
GetLayerColor - get the technical color of a layer.
SHAPE_POLY_SET m_through_outer_holes_poly
It contains polygon contours for through holes (outer cylinder)
bool ShouldFPBeDisplayed(FOOTPRINT_ATTR_T aFPAttributes) const
ShouldFPBeDisplayed - Test if footprint should be displayed in relation to attributes and the flags.
const SFVEC3F & GetBoardCenter3DU() const noexcept
GetBoardCenter - the board center position in 3d units.
Board layer functions and definitions.
CBVHCONTAINER2D m_through_holes_vias_inner
It contains the list of throughHoles vias of the board, the radius of the hole.
virtual ~EDA_3D_BOARD_HOLDER()
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:186
glm::vec3 SFVEC3F
Definition: xv3d_types.h:47
unsigned int GetStats_Nr_Holes() const noexcept
GetStats_Nr_Holes - Get statistics of the nr of holes.
unsigned int m_copperLayersCount
Number of copper layers actually used by the board.
bool createBoardPolygon(wxString *aErrorMsg)
Create the board outline polygon.
SFVEC4F m_CopperColor
in realistic mode: copper color
void buildPadShapeThickOutlineAsSegments(const PAD *aPad, CGENERICCONTAINER2D *aDstContainer, int aWidth)
float GetNonCopperLayerThickness3DU() const noexcept
GetNonCopperLayerThickness3DU - Get the current non copper layers thickness.
float GetModulesZcoord3DIU(bool aIsFlipped) const
GetModulesZcoord3DIU - Get the position of the footprint in 3d integer units considering if it is fli...
const SHAPE_POLY_SET & GetThroughHole_Vias_Outer_poly() const noexcept
RENDER_ENGINE
Render engine mode.
Definition: 3d_enums.h:109
float m_stats_via_med_hole_diameter
Computed medium diameter of the via holes in 3D units.
void createNewTrack(const TRACK *aTrack, CGENERICCONTAINER2D *aDstContainer, int aClearanceValue)
Color settings are a bit different than most of the settings objects in that there can be more than o...
ANTIALIASING_MODE AntiAliasingGet() const
GridGet - get the current antialiasing mode value.
SFVEC4F m_SilkScreenColorTop
in realistic mode: SilkScreen color ( top )
unsigned int GetStats_Nr_Vias() const noexcept
GetStats_Nr_Vias - Get statistics of the nr of vias.
wxPoint GetBoardPosBIU() const noexcept
GetBoardPosBIU - Get the board center.
void SetColorSettings(COLOR_SETTINGS *aSettings) noexcept
float GetStats_Med_Via_Hole_Diameter3DU() const noexcept
GetStats_Med_Via_Hole_Diameter3DU - Average diameter of the via holes.
float m_stats_hole_med_diameter
Computed medium diameter of the holes in 3D units.
SFVEC3F m_boardCenter
3d center position of the pcb board in 3d units
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
MAP_CONTAINER_2D m_layers_container2D
It contains the 2d elements of each layer.
float GetEpoxyThickness3DU() const noexcept
GetEpoxyThickness3DU - Get the current epoxy thickness.
void createNewPadWithClearance(const PAD *aPad, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayer, wxSize aClearanceValue) const
MATERIAL_MODE m_material_mode
Definition: pad.h:59
int m_raytrace_recursivelevel_refractions
ANTIALIASING_MODE m_antialiasing_mode
virtual BOARD_ADAPTER & GetAdapter()=0
CBVHCONTAINER2D * m_platedpads_container2D_F_Cu
GRID3D_TYPE GridGet() const noexcept
GridGet - get the current grid.
Abstract dimension API.
Definition: dimension.h:95
MATERIAL_MODE MaterialModeGet() const noexcept
MaterialModeGet.
Class BOARD_ADAPTER Helper class to handle information needed to display 3D board.
Definition: board_adapter.h:68
float m_calc_seg_min_factor3DU
min factor used for cicle segment approximation calculation
CBBOX manages a bounding box defined by two SFVEC3F min max points.
Definition: cbbox.h:39
unsigned int m_stats_nr_tracks
Number of tracks in the board.
Definition: track.h:83
void AddSolidAreasShapesToContainer(const ZONE *aZoneContainer, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayerId)
void MaterialModeSet(MATERIAL_MODE aMaterialMode) noexcept
MaterialModeSet.
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:100
int m_raytrace_nrsamples_reflections