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 <class_pad.h>
40 #include <class_track.h>
41 #include <wx/gdicmn.h>
42 #include <pcb_base_frame.h>
43 #include <class_pcb_text.h>
44 #include <class_drawsegment.h>
45 #include <class_dimension.h>
46 #include <class_zone.h>
47 #include <class_module.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 
113  bool Is3DLayerEnabled( PCB_LAYER_ID aLayer ) const;
114 
120  bool ShouldModuleBeDisplayed( MODULE_ATTR_T aModuleAttributs ) const;
121 
126  void SetBoard( BOARD *aBoard ) noexcept
127  {
128  m_board = aBoard;
129  }
130 
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 
157  double BiuTo3Dunits() const noexcept
158  {
159  return m_biuTo3Dunits;
160  }
161 
166  const CBBOX &GetBBox3DU() const noexcept
167  {
168  return m_boardBoundingBox;
169  }
170 
175  float GetEpoxyThickness3DU() const noexcept
176  {
177  return m_epoxyThickness3DU;
178  }
179 
184  float GetNonCopperLayerThickness3DU() const noexcept
185  {
187  }
188 
193  float GetCopperThickness3DU() const noexcept
194  {
195  return m_copperThickness3DU;
196  }
197 
202  int GetCopperThicknessBIU() const noexcept;
203 
208  wxSize GetBoardSizeBIU() const noexcept
209  {
210  return m_boardSize;
211  }
212 
217  wxPoint GetBoardPosBIU() const noexcept
218  {
219  return m_boardPos;
220  }
221 
226  const SFVEC3F &GetBoardCenter3DU() const noexcept
227  {
228  return m_boardCenter;
229  }
230 
238  float GetModulesZcoord3DIU( bool aIsFlipped ) const ;
239 
244  GRID3D_TYPE GridGet() const noexcept
245  {
246  return m_3D_grid_type;
247  }
248 
253  void GridSet( GRID3D_TYPE aGridType ) noexcept
254  {
255  m_3D_grid_type = aGridType;
256  }
257 
263 
269 
274  void RenderEngineSet( RENDER_ENGINE aRenderEngine ) noexcept
275  {
276  m_render_engine = aRenderEngine;
277  }
278 
284  {
285  return m_render_engine;
286  }
287 
292  void MaterialModeSet( MATERIAL_MODE aMaterialMode ) noexcept
293  {
294  m_material_mode = aMaterialMode;
295  }
296 
302  {
303  return m_material_mode;
304  }
305 
310  const SHAPE_POLY_SET &GetBoardPoly() const noexcept
311  {
312  return m_board_poly;
313  }
314 
320  SFVEC4F GetLayerColor( PCB_LAYER_ID aLayerId ) const;
321 
327  SFVEC4F GetItemColor( int aItemId ) const;
328 
334  SFVEC4F GetColor( COLOR4D aColor ) const;
335 
341  float GetLayerTopZpos3DU( PCB_LAYER_ID aLayerId ) const noexcept
342  {
343  return m_layerZcoordTop[aLayerId];
344  }
345 
351  float GetLayerBottomZpos3DU( PCB_LAYER_ID aLayerId ) const noexcept
352  {
353  return m_layerZcoordBottom[aLayerId];
354  }
355 
360  const MAP_CONTAINER_2D &GetMapLayers() const noexcept
361  {
362  return m_layers_container2D;
363  }
364 
365  const CBVHCONTAINER2D* GetPlatedPads_Front() const noexcept
366  {
368  }
369 
370  const CBVHCONTAINER2D* GetPlatedPads_Back() const noexcept
371  {
373  }
374 
379  const MAP_CONTAINER_2D &GetMapLayersHoles() const noexcept
380  {
381  return m_layers_holes2D;
382  }
383 
388  const CBVHCONTAINER2D &GetThroughHole_Outer() const noexcept
389  {
390  return m_through_holes_outer;
391  }
392 
399  {
401  }
402 
408  {
410  }
411 
417  {
419  }
420 
426  {
428  }
429 
435  {
437  }
438 
444  {
446  }
447 
452  {
454  }
455 
460  {
462  }
463 
468  const CBVHCONTAINER2D &GetThroughHole_Inner() const noexcept
469  {
470  return m_through_holes_inner;
471  }
472 
477  unsigned int GetStats_Nr_Vias() const noexcept
478  {
479  return m_stats_nr_vias;
480  }
481 
486  unsigned int GetStats_Nr_Holes() const noexcept
487  {
488  return m_stats_nr_holes;
489  }
490 
495  float GetStats_Med_Via_Hole_Diameter3DU() const noexcept
496  {
498  }
499 
504  float GetStats_Med_Hole_Diameter3DU() const noexcept
505  {
507  }
508 
513  float GetStats_Med_Track_Width() const noexcept
514  {
516  }
517 
523  unsigned int GetNrSegmentsCircle( float aDiameter3DU ) const;
524 
530  unsigned int GetNrSegmentsCircle( int aDiameterBIU ) const;
531 
536  const MAP_POLY &GetPolyMap() const noexcept
537  {
538  return m_layers_poly;
539  }
540 
542  {
543  return m_F_Cu_PlatedPads_poly;
544  }
545 
547  {
548  return m_B_Cu_PlatedPads_poly;
549  }
550 
551  const MAP_POLY &GetPolyMapHoles_Inner() const noexcept
552  {
554  }
555 
556  const MAP_POLY &GetPolyMapHoles_Outer() const noexcept
557  {
559  }
560 
561  private:
567  bool createBoardPolygon( wxString* aErrorMsg );
568  void createLayers( REPORTER* aStatusReporter );
569  void destroyLayers();
570 
571  // Helper functions to create the board
572  void createNewTrack( const TRACK* aTrack, CGENERICCONTAINER2D *aDstContainer,
573  int aClearanceValue );
574 
575  void createNewPadWithClearance( const D_PAD *aPad,
576  CGENERICCONTAINER2D *aDstContainer,
577  PCB_LAYER_ID aLayer,
578  wxSize aClearanceValue ) const;
579 
580  COBJECT2D *createNewPadDrill( const D_PAD* aPad, int aInflateValue );
581 
582  void AddPadsShapesWithClearanceToContainer( const MODULE *aModule,
583  CGENERICCONTAINER2D *aDstContainer,
584  PCB_LAYER_ID aLayerId,
585  int aInflateValue,
586  bool aSkipNPTHPadsWihNoCopper,
587  bool aSkipPlatedPads,
588  bool aSkipNonPlatedPads );
589 
591  CGENERICCONTAINER2D *aDstContainer,
592  PCB_LAYER_ID aLayerId,
593  int aInflateValue );
594 
595  void AddShapeWithClearanceToContainer( const TEXTE_PCB *aTextPCB,
596  CGENERICCONTAINER2D *aDstContainer,
597  PCB_LAYER_ID aLayerId,
598  int aClearanceValue );
599 
600  void AddShapeWithClearanceToContainer( const DRAWSEGMENT *aDrawSegment,
601  CGENERICCONTAINER2D *aDstContainer,
602  PCB_LAYER_ID aLayerId,
603  int aClearanceValue );
604 
605  void AddShapeWithClearanceToContainer( const DIMENSION *aDimension,
606  CGENERICCONTAINER2D *aDstContainer,
607  PCB_LAYER_ID aLayerId,
608  int aClearanceValue );
609 
610  void AddSolidAreasShapesToContainer( const ZONE_CONTAINER *aZoneContainer,
611  CGENERICCONTAINER2D *aDstContainer,
612  PCB_LAYER_ID aLayerId );
613 
614  void TransformArcToSegments( const wxPoint &aCentre,
615  const wxPoint &aStart,
616  double aArcAngle,
617  int aCircleToSegmentsCount,
618  int aWidth,
619  CGENERICCONTAINER2D *aDstContainer,
620  const BOARD_ITEM &aBoardItem );
621 
622  void buildPadShapeThickOutlineAsSegments( const D_PAD *aPad,
623  CGENERICCONTAINER2D *aDstContainer,
624  int aWidth );
625 
626  // Helper functions to create poly contours
627  void buildPadShapeThickOutlineAsPolygon( const D_PAD *aPad,
628  SHAPE_POLY_SET &aCornerBuffer,
629  int aWidth) const;
630 
631  void transformGraphicModuleEdgeToPolygonSet( const MODULE *aModule,
632  PCB_LAYER_ID aLayer,
633  SHAPE_POLY_SET& aCornerBuffer ) const;
634 
635 public:
645 
646  // Raytracing light colors
647 
651 
652  std::vector<SFVEC3F> m_raytrace_lightColor;
653  std::vector<SFVEC2F> m_raytrace_lightSphericalCoords;
654 
655  // Raytracing options
659 
663 
666 
667 private:
668 
672 
673  // Render options
674 
675  std::vector< bool > m_drawFlags;
680 
681 
682  // Pcb board position
683 
686 
688  wxSize m_boardSize;
689 
692 
693 
694  // Pcb board bounding boxes
695 
698 
701 
704 
707 
710 
713 
716 
719 
722 
725 
726 
727  // 2D element containers
728 
731 
734 
737 
741 
745 
749 
753 
757 
761 
762 
763  // Layers information
764 
766  unsigned int m_copperLayersCount;
767 
771 
773  std::array<float, PCB_LAYER_ID_COUNT> m_layerZcoordTop;
774 
776  std::array<float, PCB_LAYER_ID_COUNT> m_layerZcoordBottom;
777 
780 
783 
786 
789 
792 
793 
794  // Statistics
795 
797  unsigned int m_stats_nr_tracks;
798 
801 
803  unsigned int m_stats_nr_vias;
804 
807 
809  unsigned int m_stats_nr_holes;
810 
813 
820  static const wxChar *m_logTrace;
821 
822 };
823 
824 
826 {
827 public:
828  virtual BOARD_ADAPTER& GetAdapter() = 0;
829  virtual CCAMERA& GetCurrentCamera() = 0;
830 
831  virtual ~EDA_3D_BOARD_HOLDER() {};
832 };
833 
834 #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.
ZONE_CONTAINER handles a list of polygons defining a copper zone.
Definition: class_zone.h:61
SFVEC3F m_raytrace_lightColorBottom
SFVEC4F GetColor(COLOR4D aColor) const
GetColor.
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 )
TEXTE_PCB class definition.
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,...
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.
void AddGraphicsShapesWithClearanceToContainer(const MODULE *aModule, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayerId, int aInflateValue)
MAP_POLY m_layers_inner_holes_poly
It contains polygon contours for holes of each layer (inner holes)
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
SHAPE_POLY_SET m_through_outer_ring_holes_vias_poly
It contains polygon contours for through holes vias (outer annular ring)
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.
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.
void buildPadShapeThickOutlineAsSegments(const D_PAD *aPad, CGENERICCONTAINER2D *aDstContainer, int aWidth)
const MAP_CONTAINER_2D & GetMapLayers() const noexcept
GetMapLayers - Get the map of container that have the objects per layer.
A single base class (TRACK) represents both tracks and vias, with subclasses for curved tracks (ARC) ...
void AddShapeWithClearanceToContainer(const TEXTE_PCB *aTextPCB, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayerId, int aClearanceValue)
void SetBoard(BOARD *aBoard) noexcept
SetBoard - Set current board to be rendered.
const SHAPE_POLY_SET & GetThroughHole_Outer_poly_NPTH() const noexcept
GetThroughHole_Outer_poly_NPTH -.
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
DIMENSION class definition.
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
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.
int GetCopperThicknessBIU() const noexcept
GetCopperThicknessBIU - Get the current copper layer thickness.
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....
SFVEC4F m_BgColorBot
background bottom color
bool Is3DLayerEnabled(PCB_LAYER_ID aLayer) const
Is3DLayerEnabled - Check if a layer is enabled.
MODULE_ATTR_T
Enum MODULE_ATTR_T is the set of attributes allowed within a MODULE, using MODULE::SetAttributes() an...
Definition: class_module.h:66
const CBVHCONTAINER2D & GetThroughHole_Inner() const noexcept
GetThroughHole_Inner - Get the ThroughHole container.
CBVHCONTAINER2D m_through_holes_vias_outer_ring
It contains the list of throughHoles vias of the board, the radius of the hole is inflated with the a...
void buildPadShapeThickOutlineAsPolygon(const D_PAD *aPad, SHAPE_POLY_SET &aCornerBuffer, int aWidth) const
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:114
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:95
Pad object description.
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 transformGraphicModuleEdgeToPolygonSet(const MODULE *aModule, PCB_LAYER_ID aLayer, SHAPE_POLY_SET &aCornerBuffer) const
const SHAPE_POLY_SET & GetThroughHole_Outer_poly() const noexcept
GetThroughHole_Outer_poly -.
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)
const CBVHCONTAINER2D & GetThroughHole_Vias_Outer_Ring() const noexcept
GetThroughHole_Vias_Outer_Ring -.
const SFVEC3F & GetBoardCenter3DU() const noexcept
GetBoardCenter - the board center position in 3d units.
Board layer functions and definitions.
bool ShouldModuleBeDisplayed(MODULE_ATTR_T aModuleAttributs) const
ShouldModuleBeDisplayed - Test if module should be displayed in relation to attributs and the flags.
Class to handle a graphic segment.
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()
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:178
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.
const SHAPE_POLY_SET & GetThroughHole_Vias_Outer_Ring_poly() const noexcept
GetThroughHole_Vias_Outer_Ring_poly -.
bool createBoardPolygon(wxString *aErrorMsg)
Create the board outline polygon.
SFVEC4F m_CopperColor
in realistic mode: copper color
float GetNonCopperLayerThickness3DU() const noexcept
GetNonCopperLayerThickness3DU - Get the current non copper layers thickness.
void AddSolidAreasShapesToContainer(const ZONE_CONTAINER *aZoneContainer, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayerId)
COBJECT2D * createNewPadDrill(const D_PAD *aPad, int aInflateValue)
const CBVHCONTAINER2D & GetThroughHole_Vias_Inner() const noexcept
GetThroughHole_Vias_Inner -.
float GetModulesZcoord3DIU(bool aIsFlipped) const
GetModulesZcoord3DIU - Get the position of the module in 3d integer units considering if it is flippe...
const SHAPE_POLY_SET & GetThroughHole_Vias_Outer_poly() const noexcept
GetThroughHole_Vias_Outer_poly -.
RENDER_ENGINE
Render engine mode.
Definition: 3d_enums.h:106
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 size.
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.
void createNewPadWithClearance(const D_PAD *aPad, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayer, wxSize aClearanceValue) const
float GetEpoxyThickness3DU() const noexcept
GetEpoxyThickness3DU - Get the current epoxy thickness.
MATERIAL_MODE m_material_mode
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.
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:40
unsigned int m_stats_nr_tracks
Number of tracks in the board.
Abstract dimension API.
void AddPadsShapesWithClearanceToContainer(const MODULE *aModule, CGENERICCONTAINER2D *aDstContainer, PCB_LAYER_ID aLayerId, int aInflateValue, bool aSkipNPTHPadsWihNoCopper, bool aSkipPlatedPads, bool aSkipNonPlatedPads)
void MaterialModeSet(MATERIAL_MODE aMaterialMode) noexcept
MaterialModeSet.
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:99
int m_raytrace_nrsamples_reflections