KiCad PCB EDA Suite
Loading...
Searching...
No Matches
BOARD_ADAPTER Class Reference

Helper class to handle information needed to display 3D board. More...

#include <board_adapter.h>

Public Member Functions

 BOARD_ADAPTER ()
 
 ~BOARD_ADAPTER ()
 
void Set3dCacheManager (S3D_CACHE *aCacheMgr) noexcept
 Update the cache manager pointer.
 
S3D_CACHEGet3dCacheManager () const noexcept
 
bool Is3dLayerEnabled (PCB_LAYER_ID aLayer, const std::bitset< LAYER_3D_END > &aVisibilityFlags) const
 Check if a layer is enabled.
 
bool IsFootprintShown (FOOTPRINT_ATTR_T aFPAttributes) const
 Test if footprint should be displayed in relation to attributes and the flags.
 
void SetBoard (BOARD *aBoard) noexcept
 Set current board to be rendered.
 
const BOARDGetBoard () const noexcept
 
void ReloadColorSettings () noexcept
 
std::map< int, COLOR4DGetLayerColors () const
 
std::map< int, COLOR4DGetDefaultColors () const
 
void SetLayerColors (const std::map< int, COLOR4D > &aColors)
 
std::bitset< LAYER_3D_ENDGetVisibleLayers () const
 
std::bitset< LAYER_3D_ENDGetDefaultVisibleLayers () const
 
void SetVisibleLayers (const std::bitset< LAYER_3D_END > &aLayers)
 
void InitSettings (REPORTER *aStatusReporter, REPORTER *aWarningReporter)
 Function to be called by the render when it need to reload the settings for the board.
 
double BiuTo3dUnits () const noexcept
 Board integer units To 3D units.
 
const BBOX_3DGetBBox () const noexcept
 Get the board outling bounding box.
 
float GetBoardBodyThickness () const noexcept
 Get the board body thickness, including internal copper layers (in 3D units).
 
float GetNonCopperLayerThickness () const noexcept
 Get the non copper layers thickness (in 3D units).
 
float GetFrontCopperThickness () const noexcept
 Get the copper layer thicknesses (in 3D units).
 
float GetBackCopperThickness () const noexcept
 
int GetHolePlatingThickness () const noexcept
 Get the hole plating thickness (NB: in BOARD UNITS!).
 
VECTOR2I GetBoardSize () const noexcept
 Get the board size.
 
VECTOR2I GetBoardPos () const noexcept
 Get the board center.
 
const SFVEC3FGetBoardCenter () const noexcept
 The board center position in 3D units.
 
float GetFootprintZPos (bool aIsFlipped) const
 Get the position of the footprint in 3d integer units considering if it is flipped or not.
 
const SHAPE_POLY_SETGetBoardPoly () const noexcept
 Get the current polygon of the epoxy board.
 
SFVEC4F GetLayerColor (PCB_LAYER_ID aLayerId) const
 Get the technical color of a layer.
 
SFVEC4F GetItemColor (int aItemId) const
 Get the technical color of a layer.
 
SFVEC4F GetColor (const COLOR4D &aColor) const
 
SFVEC2F GetSphericalCoord (int i) const
 
float GetLayerTopZPos (PCB_LAYER_ID aLayerId) const noexcept
 Get the top z position.
 
float GetLayerBottomZPos (PCB_LAYER_ID aLayerId) const noexcept
 Get the bottom z position.
 
const MAP_CONTAINER_2D_BASEGetLayerMap () const noexcept
 Get the map of containers that have the objects per layer.
 
const BVH_CONTAINER_2DGetPlatedPadsFront () const noexcept
 
const BVH_CONTAINER_2DGetPlatedPadsBack () const noexcept
 
const BVH_CONTAINER_2DGetOffboardPadsFront () const noexcept
 
const BVH_CONTAINER_2DGetOffboardPadsBack () const noexcept
 
const MAP_CONTAINER_2D_BASEGetLayerHoleMap () const noexcept
 
const BVH_CONTAINER_2DGetTH_IDs () const noexcept
 
const BVH_CONTAINER_2DGetTH_ODs () const noexcept
 
const SHAPE_POLY_SETGetTH_ODPolys () const noexcept
 Get through hole outside diameter 2D polygons.
 
const BVH_CONTAINER_2DGetViaAnnuli () const noexcept
 
const SHAPE_POLY_SETGetViaAnnuliPolys () const noexcept
 
const SHAPE_POLY_SETGetNPTH_ODPolys () const noexcept
 
const BVH_CONTAINER_2DGetViaTH_ODs () const noexcept
 
const SHAPE_POLY_SETGetViaTH_ODPolys () const noexcept
 
unsigned int GetViaCount () const noexcept
 
unsigned int GetHoleCount () const noexcept
 
float GetAverageViaHoleDiameter () const noexcept
 
float GetAverageHoleDiameter () const noexcept
 
float GetAverageTrackWidth () const noexcept
 
unsigned int GetCircleSegmentCount (float aDiameter3DU) const
 
unsigned int GetCircleSegmentCount (int aDiameterBIU) const
 
const MAP_POLYGetPolyMap () const noexcept
 Get map of polygon's layers.
 
const SHAPE_POLY_SETGetFrontPlatedPadAndGraphicPolys ()
 
const SHAPE_POLY_SETGetBackPlatedPadAndGraphicPolys ()
 
const MAP_POLYGetHoleIdPolysMap () const noexcept
 
const MAP_POLYGetHoleOdPolysMap () const noexcept
 

Public Attributes

EDA_3D_VIEWER_SETTINGSm_Cfg
 
bool m_IsBoardView
 
bool m_MousewheelPanning
 
bool m_IsPreviewer
 true if we're in a 3D preview panel, false for the standard 3D viewer
 
SFVEC4F m_BgColorBot
 background bottom color
 
SFVEC4F m_BgColorTop
 background top color
 
SFVEC4F m_BoardBodyColor
 in realistic mode: FR4 board color
 
SFVEC4F m_SolderMaskColorBot
 in realistic mode: solder mask color ( bot )
 
SFVEC4F m_SolderMaskColorTop
 in realistic mode: solder mask color ( top )
 
SFVEC4F m_SolderPasteColor
 in realistic mode: solder paste color
 
SFVEC4F m_SilkScreenColorBot
 in realistic mode: SilkScreen color ( bot )
 
SFVEC4F m_SilkScreenColorTop
 in realistic mode: SilkScreen color ( top )
 
SFVEC4F m_CopperColor
 in realistic mode: copper color
 
SFVEC4F m_UserDrawingsColor
 
SFVEC4F m_UserCommentsColor
 
SFVEC4F m_ECO1Color
 
SFVEC4F m_ECO2Color
 

Static Public Attributes

static CUSTOM_COLORS_LIST g_SilkColors
 
static CUSTOM_COLORS_LIST g_MaskColors
 
static CUSTOM_COLORS_LIST g_PasteColors
 
static CUSTOM_COLORS_LIST g_FinishColors
 
static CUSTOM_COLORS_LIST g_BoardColors
 
static KIGFX::COLOR4D g_DefaultBackgroundTop
 
static KIGFX::COLOR4D g_DefaultBackgroundBot
 
static KIGFX::COLOR4D g_DefaultSilkscreen
 
static KIGFX::COLOR4D g_DefaultSolderMask
 
static KIGFX::COLOR4D g_DefaultSolderPaste
 
static KIGFX::COLOR4D g_DefaultSurfaceFinish
 
static KIGFX::COLOR4D g_DefaultBoardBody
 
static KIGFX::COLOR4D g_DefaultComments
 
static KIGFX::COLOR4D g_DefaultECOs
 

Private Member Functions

bool createBoardPolygon (wxString *aErrorMsg)
 Create the board outline polygon.
 
void createLayers (REPORTER *aStatusReporter)
 
void destroyLayers ()
 
void createViaWithMargin (const PCB_TRACK *aTrack, CONTAINER_2D_BASE *aDstContainer, int aMargin)
 
void createTrack (const PCB_TRACK *aTrack, CONTAINER_2D_BASE *aDstContainer)
 
void createPadWithMargin (const PAD *aPad, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayer, const VECTOR2I &aMargin) const
 
void createPadWithHole (const PAD *aPad, CONTAINER_2D_BASE *aDstContainer, int aInflateValue)
 
void addPads (const FOOTPRINT *aFootprint, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayerId, bool aSkipPlatedPads, bool aSkipNonPlatedPads)
 
void addFootprintShapes (const FOOTPRINT *aFootprint, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayerId, const std::bitset< LAYER_3D_END > &aVisibilityFlags)
 
void addText (const EDA_TEXT *aText, CONTAINER_2D_BASE *aDstContainer, const BOARD_ITEM *aOwner)
 
void addShape (const PCB_SHAPE *aShape, CONTAINER_2D_BASE *aContainer, const BOARD_ITEM *aOwner)
 
void addShape (const PCB_DIMENSION_BASE *aDimension, CONTAINER_2D_BASE *aDstContainer, const BOARD_ITEM *aOwner)
 
void addShape (const PCB_TEXTBOX *aTextBox, CONTAINER_2D_BASE *aContainer, const BOARD_ITEM *aOwner)
 
void addTable (const PCB_TABLE *aTable, CONTAINER_2D_BASE *aContainer, const BOARD_ITEM *aOwner)
 
void addSolidAreasShapes (const ZONE *aZone, CONTAINER_2D_BASE *aDstContainer, PCB_LAYER_ID aLayerId)
 
void createArcSegments (const VECTOR2I &aCentre, const VECTOR2I &aStart, const EDA_ANGLE &aArcAngle, int aCircleToSegmentsCount, int aWidth, CONTAINER_2D_BASE *aContainer, const BOARD_ITEM &aOwner)
 
void buildPadOutlineAsSegments (const PAD *aPad, CONTAINER_2D_BASE *aDstContainer, int aWidth)
 

Private Attributes

BOARDm_board
 
S3D_CACHEm_3dModelManager
 
COLOR_SETTINGSm_colors
 
VECTOR2I m_boardPos
 Board center position in board internal units.
 
VECTOR2I m_boardSize
 Board size in board internal units.
 
SFVEC3F m_boardCenter
 3D center position of the board in 3D units.
 
BBOX_3D m_boardBoundingBox
 3D bounding box of the board in 3D units.
 
MAP_POLY m_layers_poly
 Amalgamated polygon contours for various types of items.
 
SHAPE_POLY_SETm_frontPlatedPadAndGraphicPolys
 
SHAPE_POLY_SETm_backPlatedPadAndGraphicPolys
 
SHAPE_POLY_SETm_frontPlatedCopperPolys
 
SHAPE_POLY_SETm_backPlatedCopperPolys
 
MAP_POLY m_layerHoleOdPolys
 Hole outer diameters (per layer)
 
MAP_POLY m_layerHoleIdPolys
 Hole inner diameters (per layer)
 
SHAPE_POLY_SET m_NPTH_ODPolys
 NPTH outer diameters.
 
SHAPE_POLY_SET m_TH_ODPolys
 PTH outer diameters.
 
SHAPE_POLY_SET m_viaTH_ODPolys
 Via hole outer diameters.
 
SHAPE_POLY_SET m_viaAnnuliPolys
 Via annular ring outer diameters.
 
SHAPE_POLY_SET m_board_poly
 Board outline polygon.
 
MAP_CONTAINER_2D_BASE m_layerMap
 2D elements for each layer.
 
MAP_CONTAINER_2D_BASE m_layerHoleMap
 Holes for each layer.
 
BVH_CONTAINER_2Dm_platedPadsFront
 
BVH_CONTAINER_2Dm_platedPadsBack
 
BVH_CONTAINER_2Dm_offboardPadsFront
 
BVH_CONTAINER_2Dm_offboardPadsBack
 
BVH_CONTAINER_2D m_TH_ODs
 List of PTH outer diameters.
 
BVH_CONTAINER_2D m_TH_IDs
 List of PTH inner diameters.
 
BVH_CONTAINER_2D m_viaAnnuli
 List of via annular rings.
 
BVH_CONTAINER_2D m_viaTH_ODs
 List of via hole outer diameters.
 
unsigned int m_copperLayersCount
 
double m_biuTo3Dunits
 Scale factor to convert board internal units to 3D units normalized between -1.0 and 1.0.
 
std::array< float, PCB_LAYER_ID_COUNTm_layerZcoordTop
 Top (End) Z position of each layer in 3D units.
 
std::array< float, PCB_LAYER_ID_COUNTm_layerZcoordBottom
 Bottom (Start) Z position of each layer in 3D units.
 
float m_frontCopperThickness3DU
 
float m_backCopperThickness3DU
 
float m_boardBodyThickness3DU
 
float m_nonCopperLayerThickness3DU
 
float m_solderPasteLayerThickness3DU
 
unsigned int m_trackCount
 
float m_averageTrackWidth
 
unsigned int m_viaCount
 
float m_averageViaHoleDiameter
 
unsigned int m_holeCount
 
float m_averageHoleDiameter
 

Static Private Attributes

static const wxChar * m_logTrace = wxT( "KI_TRACE_EDA_CINFO3D_VISU" )
 Trace mask used to enable or disable debug output for this class.
 

Detailed Description

Helper class to handle information needed to display 3D board.

Definition at line 72 of file board_adapter.h.

Constructor & Destructor Documentation

◆ BOARD_ADAPTER()

◆ ~BOARD_ADAPTER()

BOARD_ADAPTER::~BOARD_ADAPTER ( )

Definition at line 218 of file board_adapter.cpp.

References destroyLayers().

Member Function Documentation

◆ addFootprintShapes()

◆ addPads()

void BOARD_ADAPTER::addPads ( const FOOTPRINT aFootprint,
CONTAINER_2D_BASE aDstContainer,
PCB_LAYER_ID  aLayerId,
bool  aSkipPlatedPads,
bool  aSkipNonPlatedPads 
)
private

◆ addShape() [1/3]

void BOARD_ADAPTER::addShape ( const PCB_DIMENSION_BASE aDimension,
CONTAINER_2D_BASE aDstContainer,
const BOARD_ITEM aOwner 
)
private

◆ addShape() [2/3]

◆ addShape() [3/3]

void BOARD_ADAPTER::addShape ( const PCB_TEXTBOX aTextBox,
CONTAINER_2D_BASE aContainer,
const BOARD_ITEM aOwner 
)
private

◆ addSolidAreasShapes()

void BOARD_ADAPTER::addSolidAreasShapes ( const ZONE aZone,
CONTAINER_2D_BASE aDstContainer,
PCB_LAYER_ID  aLayerId 
)
private

◆ addTable()

void BOARD_ADAPTER::addTable ( const PCB_TABLE aTable,
CONTAINER_2D_BASE aContainer,
const BOARD_ITEM aOwner 
)
private

Definition at line 750 of file create_3Dgraphic_brd_items.cpp.

References addText(), and PCB_TABLE::GetCells().

Referenced by addFootprintShapes(), and createLayers().

◆ addText()

◆ BiuTo3dUnits()

◆ buildPadOutlineAsSegments()

void BOARD_ADAPTER::buildPadOutlineAsSegments ( const PAD aPad,
CONTAINER_2D_BASE aDstContainer,
int  aWidth 
)
private

◆ createArcSegments()

void BOARD_ADAPTER::createArcSegments ( const VECTOR2I aCentre,
const VECTOR2I aStart,
const EDA_ANGLE aArcAngle,
int  aCircleToSegmentsCount,
int  aWidth,
CONTAINER_2D_BASE aContainer,
const BOARD_ITEM aOwner 
)
private

◆ createBoardPolygon()

bool BOARD_ADAPTER::createBoardPolygon ( wxString *  aErrorMsg)
private

◆ createLayers()

void BOARD_ADAPTER::createLayers ( REPORTER aStatusReporter)
private

Definition at line 149 of file create_layer_items.cpp.

References _, CONTAINER_2D_BASE::Add(), addFootprintShapes(), addPads(), addShape(), addTable(), addText(), LSET::AllCuMask(), arrayDim(), B_Cu, BiuTo3dUnits(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::clip_silk_on_via_annuli, createPadWithHole(), createTrack(), destroyLayers(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::differentiate_plated_copper, BOARD::Drawings(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::engine, ERROR_INSIDE, F_Cu, PCB_VIA::FlashLayer(), BOARD::Footprints(), BOARD::GetDesignSettings(), GetHolePlatingThickness(), GetRunningMicroSecs(), GetVisibleLayers(), Is3dLayerEnabled(), BOARD_ITEM::IsOnLayer(), KiROUND(), m_averageHoleDiameter, m_averageTrackWidth, m_averageViaHoleDiameter, m_backPlatedCopperPolys, m_backPlatedPadAndGraphicPolys, m_biuTo3Dunits, m_board, m_Cfg, m_copperLayersCount, m_frontPlatedCopperPolys, m_frontPlatedPadAndGraphicPolys, m_holeCount, m_layerHoleIdPolys, m_layerHoleMap, m_layerHoleOdPolys, m_layerMap, m_layers_poly, m_logTrace, BOARD_DESIGN_SETTINGS::m_MaxError, m_NPTH_ODPolys, m_offboardPadsBack, m_offboardPadsFront, m_platedPadsBack, m_platedPadsFront, EDA_3D_VIEWER_SETTINGS::m_Render, m_TH_IDs, m_TH_ODPolys, m_TH_ODs, m_trackCount, m_viaAnnuli, m_viaAnnuliPolys, m_viaCount, m_viaTH_ODPolys, m_viaTH_ODs, MAX_CU_LAYERS, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_copper_thickness, pad, PCB_DIM_ALIGNED_T, PCB_DIM_CENTER_T, PCB_DIM_LEADER_T, PCB_DIM_ORTHOGONAL_T, PCB_DIM_RADIAL_T, PCB_SHAPE_T, PCB_TABLE_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_VIA_T, REPORTER::Report(), LSET::Seq(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_off_board_silk, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_zones, text, ToLAYER_ID(), BOARD::Tracks(), TransformCircleToPolygon(), transformFPShapesToPolySet(), PCB_TRACK::TransformShapeToPolygon(), PCB_TEXTBOX::TransformTextToPolySet(), EDA_ITEM::Type(), via, VECTOR2< T >::x, and BOARD::Zones().

Referenced by InitSettings().

◆ createPadWithHole()

void BOARD_ADAPTER::createPadWithHole ( const PAD aPad,
CONTAINER_2D_BASE aDstContainer,
int  aInflateValue 
)
private

◆ createPadWithMargin()

◆ createTrack()

◆ createViaWithMargin()

void BOARD_ADAPTER::createViaWithMargin ( const PCB_TRACK aTrack,
CONTAINER_2D_BASE aDstContainer,
int  aMargin 
)
private

◆ destroyLayers()

◆ Get3dCacheManager()

S3D_CACHE * BOARD_ADAPTER::Get3dCacheManager ( ) const
inlinenoexcept

◆ GetAverageHoleDiameter()

float BOARD_ADAPTER::GetAverageHoleDiameter ( ) const
inlinenoexcept
Returns
the average diameter of through holes in 3D units.

Definition at line 310 of file board_adapter.h.

References m_averageHoleDiameter.

Referenced by RENDER_3D_RAYTRACE_BASE::Reload().

◆ GetAverageTrackWidth()

float BOARD_ADAPTER::GetAverageTrackWidth ( ) const
inlinenoexcept
Returns
average track width in 3D units.

Definition at line 315 of file board_adapter.h.

References m_averageTrackWidth.

◆ GetAverageViaHoleDiameter()

float BOARD_ADAPTER::GetAverageViaHoleDiameter ( ) const
inlinenoexcept
Returns
via hole average diameter dimension in 3D units.

Definition at line 305 of file board_adapter.h.

References m_averageViaHoleDiameter.

Referenced by RENDER_3D_OPENGL::generateViasAndPads(), and RENDER_3D_RAYTRACE_BASE::Reload().

◆ GetBackCopperThickness()

float BOARD_ADAPTER::GetBackCopperThickness ( ) const
inlinenoexcept

◆ GetBackPlatedPadAndGraphicPolys()

const SHAPE_POLY_SET * BOARD_ADAPTER::GetBackPlatedPadAndGraphicPolys ( )
inline

Definition at line 337 of file board_adapter.h.

References m_backPlatedPadAndGraphicPolys.

Referenced by RENDER_3D_OPENGL::reload().

◆ GetBBox()

const BBOX_3D & BOARD_ADAPTER::GetBBox ( ) const
inlinenoexcept

Get the board outling bounding box.

Returns
the board bounding box in 3D units.

Definition at line 138 of file board_adapter.h.

References m_boardBoundingBox.

Referenced by NL_3D_VIEWER_PLUGIN_IMPL::GetHitLookAt(), NL_3D_VIEWER_PLUGIN_IMPL::GetModelExtents(), EDA_3D_CANVAS::move_pivot_based_on_cur_mouse_position(), and RENDER_3D_RAYTRACE_BASE::Reload().

◆ GetBoard()

◆ GetBoardBodyThickness()

float BOARD_ADAPTER::GetBoardBodyThickness ( ) const
inlinenoexcept

Get the board body thickness, including internal copper layers (in 3D units).

Definition at line 143 of file board_adapter.h.

References m_boardBodyThickness3DU.

Referenced by RENDER_3D_OPENGL::renderBoardBody().

◆ GetBoardCenter()

const SFVEC3F & BOARD_ADAPTER::GetBoardCenter ( ) const
inlinenoexcept

The board center position in 3D units.

Returns
board center vector position in 3D units.

Definition at line 180 of file board_adapter.h.

References m_boardCenter.

Referenced by RENDER_3D_OPENGL::reload(), and RENDER_3D_RAYTRACE_BASE::Reload().

◆ GetBoardPoly()

const SHAPE_POLY_SET & BOARD_ADAPTER::GetBoardPoly ( ) const
inlinenoexcept

Get the current polygon of the epoxy board.

Returns
the shape polygon

Definition at line 196 of file board_adapter.h.

References m_board_poly.

Referenced by RENDER_3D_OPENGL::reload(), and RENDER_3D_RAYTRACE_BASE::Reload().

◆ GetBoardPos()

VECTOR2I BOARD_ADAPTER::GetBoardPos ( ) const
inlinenoexcept

Get the board center.

Returns
position in BIU units.

Definition at line 173 of file board_adapter.h.

References m_boardPos.

Referenced by RENDER_3D_OPENGL::generate3dGrid().

◆ GetBoardSize()

VECTOR2I BOARD_ADAPTER::GetBoardSize ( ) const
inlinenoexcept

Get the board size.

Returns
size in BIU units.

Definition at line 166 of file board_adapter.h.

References m_boardSize.

Referenced by RENDER_3D_OPENGL::generate3dGrid().

◆ GetCircleSegmentCount() [1/2]

unsigned int BOARD_ADAPTER::GetCircleSegmentCount ( float  aDiameter3DU) const
Parameters
aDiameter3DUdiameter in 3DU.
Returns
number of sides that should be used in a circle with aDiameter3DU.

Definition at line 309 of file board_adapter.cpp.

References GetCircleSegmentCount(), and m_biuTo3Dunits.

Referenced by RENDER_3D_OPENGL::addObjectTriangles(), addShape(), RENDER_3D_OPENGL::generateViasAndPads(), and GetCircleSegmentCount().

◆ GetCircleSegmentCount() [2/2]

unsigned int BOARD_ADAPTER::GetCircleSegmentCount ( int  aDiameterBIU) const
Parameters
aDiameterBIUdiameter in board internal units.
Returns
number of sides that should be used in circle with aDiameterBIU.

Definition at line 317 of file board_adapter.cpp.

References ARC_HIGH_DEF, FULL_CIRCLE, and GetArcToSegmentCount().

◆ GetColor()

SFVEC4F BOARD_ADAPTER::GetColor ( const COLOR4D aColor) const

◆ GetDefaultColors()

◆ GetDefaultVisibleLayers()

◆ GetFootprintZPos()

float BOARD_ADAPTER::GetFootprintZPos ( bool  aIsFlipped) const

Get the position of the footprint in 3d integer units considering if it is flipped or not.

Parameters
aIsFlippedtrue for use in footprints on Front (top) layer, false if footprint is on back (bottom) layer.
Returns
the Z position of 3D shapes, in 3D integer units.

Definition at line 938 of file board_adapter.cpp.

References B_Paste, F_Paste, m_layerZcoordBottom, and m_layerZcoordTop.

Referenced by RENDER_3D_OPENGL::get3dModelsFromFootprint(), and RENDER_3D_RAYTRACE_BASE::load3DModels().

◆ GetFrontCopperThickness()

float BOARD_ADAPTER::GetFrontCopperThickness ( ) const
inlinenoexcept

Get the copper layer thicknesses (in 3D units).

Definition at line 153 of file board_adapter.h.

References m_frontCopperThickness3DU.

Referenced by RENDER_3D_RAYTRACE_BASE::insertHole(), and RENDER_3D_RAYTRACE_BASE::Reload().

◆ GetFrontPlatedPadAndGraphicPolys()

const SHAPE_POLY_SET * BOARD_ADAPTER::GetFrontPlatedPadAndGraphicPolys ( )
inline

Definition at line 336 of file board_adapter.h.

References m_frontPlatedPadAndGraphicPolys.

Referenced by RENDER_3D_OPENGL::reload().

◆ GetHoleCount()

unsigned int BOARD_ADAPTER::GetHoleCount ( ) const
inlinenoexcept

◆ GetHoleIdPolysMap()

const MAP_POLY & BOARD_ADAPTER::GetHoleIdPolysMap ( ) const
inlinenoexcept

Definition at line 338 of file board_adapter.h.

References m_layerHoleIdPolys.

Referenced by RENDER_3D_OPENGL::reload().

◆ GetHoleOdPolysMap()

const MAP_POLY & BOARD_ADAPTER::GetHoleOdPolysMap ( ) const
inlinenoexcept

Definition at line 339 of file board_adapter.h.

References m_layerHoleOdPolys.

Referenced by RENDER_3D_OPENGL::reload().

◆ GetHolePlatingThickness()

int BOARD_ADAPTER::GetHolePlatingThickness ( ) const
noexcept

◆ GetItemColor()

SFVEC4F BOARD_ADAPTER::GetItemColor ( int  aItemId) const

Get the technical color of a layer.

Parameters
aItemIdthe item id to get the color information.
Returns
the color in SFVEC3F format.

Definition at line 957 of file board_adapter.cpp.

References GetColor(), COLOR_SETTINGS::GetColor(), and m_colors.

◆ GetLayerBottomZPos()

float BOARD_ADAPTER::GetLayerBottomZPos ( PCB_LAYER_ID  aLayerId) const
inlinenoexcept

Get the bottom z position.

Parameters
aLayerIdlayer id.
Returns
position in 3D units.

Definition at line 239 of file board_adapter.h.

References m_layerZcoordBottom.

Referenced by RENDER_3D_RAYTRACE_BASE::createItemsFromContainer(), RENDER_3D_OPENGL::getLayerZPos(), RENDER_3D_RAYTRACE_BASE::insertHole(), RENDER_3D_OPENGL::Redraw(), and RENDER_3D_RAYTRACE_BASE::Reload().

◆ GetLayerColor()

SFVEC4F BOARD_ADAPTER::GetLayerColor ( PCB_LAYER_ID  aLayerId) const

Get the technical color of a layer.

Parameters
aLayerIdthe layer to get the color information.
Returns
the color in SFVEC3F format.

Definition at line 947 of file board_adapter.cpp.

References color, COLOR_SETTINGS::GetColor(), m_colors, and PCB_LAYER_ID_COUNT.

Referenced by RENDER_3D_OPENGL::setLayerMaterial().

◆ GetLayerColors()

◆ GetLayerHoleMap()

const MAP_CONTAINER_2D_BASE & BOARD_ADAPTER::GetLayerHoleMap ( ) const
inlinenoexcept

◆ GetLayerMap()

const MAP_CONTAINER_2D_BASE & BOARD_ADAPTER::GetLayerMap ( ) const
inlinenoexcept

Get the map of containers that have the objects per layer.

Returns
the map containers of this board.

Definition at line 249 of file board_adapter.h.

References m_layerMap.

Referenced by RENDER_3D_RAYTRACE_BASE::createItemsFromContainer(), RENDER_3D_OPENGL::reload(), and RENDER_3D_RAYTRACE_BASE::Reload().

◆ GetLayerTopZPos()

float BOARD_ADAPTER::GetLayerTopZPos ( PCB_LAYER_ID  aLayerId) const
inlinenoexcept

Get the top z position.

Parameters
aLayerIdlayer id.
Returns
position in 3D units.

Definition at line 228 of file board_adapter.h.

References m_layerZcoordTop.

Referenced by RENDER_3D_RAYTRACE_BASE::createItemsFromContainer(), RENDER_3D_OPENGL::getLayerZPos(), RENDER_3D_OPENGL::Redraw(), and RENDER_3D_RAYTRACE_BASE::Reload().

◆ GetNonCopperLayerThickness()

float BOARD_ADAPTER::GetNonCopperLayerThickness ( ) const
inlinenoexcept

Get the non copper layers thickness (in 3D units).

Definition at line 148 of file board_adapter.h.

References m_nonCopperLayerThickness3DU.

Referenced by RENDER_3D_OPENGL::renderSolderMaskLayer(), and RENDER_3D_RAYTRACE_BASE::shadeHit().

◆ GetNPTH_ODPolys()

const SHAPE_POLY_SET & BOARD_ADAPTER::GetNPTH_ODPolys ( ) const
inlinenoexcept

Definition at line 281 of file board_adapter.h.

References m_NPTH_ODPolys.

Referenced by RENDER_3D_OPENGL::reload().

◆ GetOffboardPadsBack()

const BVH_CONTAINER_2D * BOARD_ADAPTER::GetOffboardPadsBack ( ) const
inlinenoexcept

Definition at line 253 of file board_adapter.h.

References m_offboardPadsBack.

Referenced by RENDER_3D_OPENGL::reload().

◆ GetOffboardPadsFront()

const BVH_CONTAINER_2D * BOARD_ADAPTER::GetOffboardPadsFront ( ) const
inlinenoexcept

Definition at line 252 of file board_adapter.h.

References m_offboardPadsFront.

Referenced by RENDER_3D_OPENGL::reload().

◆ GetPlatedPadsBack()

const BVH_CONTAINER_2D * BOARD_ADAPTER::GetPlatedPadsBack ( ) const
inlinenoexcept

Definition at line 251 of file board_adapter.h.

References m_platedPadsBack.

Referenced by RENDER_3D_OPENGL::reload(), and RENDER_3D_RAYTRACE_BASE::Reload().

◆ GetPlatedPadsFront()

const BVH_CONTAINER_2D * BOARD_ADAPTER::GetPlatedPadsFront ( ) const
inlinenoexcept

Definition at line 250 of file board_adapter.h.

References m_platedPadsFront.

Referenced by RENDER_3D_OPENGL::reload(), and RENDER_3D_RAYTRACE_BASE::Reload().

◆ GetPolyMap()

const MAP_POLY & BOARD_ADAPTER::GetPolyMap ( ) const
inlinenoexcept

Get map of polygon's layers.

Returns
the map with polygon's layers.

Definition at line 334 of file board_adapter.h.

References m_layers_poly.

Referenced by RENDER_3D_OPENGL::reload().

◆ GetSphericalCoord()

◆ GetTH_IDs()

const BVH_CONTAINER_2D & BOARD_ADAPTER::GetTH_IDs ( ) const
inlinenoexcept

Definition at line 256 of file board_adapter.h.

References m_TH_IDs.

Referenced by RENDER_3D_RAYTRACE_BASE::insertHole(), and RENDER_3D_OPENGL::reload().

◆ GetTH_ODPolys()

const SHAPE_POLY_SET & BOARD_ADAPTER::GetTH_ODPolys ( ) const
inlinenoexcept

Get through hole outside diameter 2D polygons.

The outside diameter 2D polygon is the hole diameter plus the plating thickness.

Returns
a container with through hold outside diameter 2D polygons.

Definition at line 266 of file board_adapter.h.

References m_TH_ODPolys.

Referenced by RENDER_3D_OPENGL::reload().

◆ GetTH_ODs()

const BVH_CONTAINER_2D & BOARD_ADAPTER::GetTH_ODs ( ) const
inlinenoexcept

◆ GetViaAnnuli()

const BVH_CONTAINER_2D & BOARD_ADAPTER::GetViaAnnuli ( ) const
inlinenoexcept

◆ GetViaAnnuliPolys()

const SHAPE_POLY_SET & BOARD_ADAPTER::GetViaAnnuliPolys ( ) const
inlinenoexcept

Definition at line 276 of file board_adapter.h.

References m_viaAnnuliPolys.

Referenced by RENDER_3D_OPENGL::reload().

◆ GetViaCount()

unsigned int BOARD_ADAPTER::GetViaCount ( ) const
inlinenoexcept

◆ GetViaTH_ODPolys()

const SHAPE_POLY_SET & BOARD_ADAPTER::GetViaTH_ODPolys ( ) const
inlinenoexcept

Definition at line 294 of file board_adapter.h.

References m_viaTH_ODPolys.

Referenced by RENDER_3D_OPENGL::reload().

◆ GetViaTH_ODs()

const BVH_CONTAINER_2D & BOARD_ADAPTER::GetViaTH_ODs ( ) const
inlinenoexcept
Returns
a container with through hole via hole outside diameters.

Definition at line 289 of file board_adapter.h.

References m_viaTH_ODs.

Referenced by RENDER_3D_OPENGL::reload().

◆ GetVisibleLayers()

std::bitset< LAYER_3D_END > BOARD_ADAPTER::GetVisibleLayers ( ) const

Definition at line 746 of file board_adapter.cpp.

References B_Cu, B_Mask, B_SilkS, Cmts_User, Dwgs_User, Eco1_User, Eco2_User, F_Adhes, F_Cu, F_Mask, F_Paste, F_SilkS, EDA_3D_VIEWER_SETTINGS::FindPreset(), FOLLOW_PCB, FOLLOW_PLOT_SETTINGS, PCB_PLOT_PARAMS::GetLayerSelection(), PCB_PLOT_PARAMS::GetPlotFPText(), PCB_PLOT_PARAMS::GetPlotOnAllLayersSelection(), BOARD::GetPlotOptions(), PCB_PLOT_PARAMS::GetPlotReference(), PCB_PLOT_PARAMS::GetPlotValue(), BOARD::IsElementVisible(), BOARD::IsLayerVisible(), LAYER_3D_ADHESIVE, LAYER_3D_AXES, LAYER_3D_BOARD, LAYER_3D_BOUNDING_BOXES, LAYER_3D_COPPER_BOTTOM, LAYER_3D_COPPER_TOP, LAYER_3D_MODELS_MARKED_DNP, LAYER_3D_MODELS_NOT_IN_POS, LAYER_3D_OFF_BOARD_SILK, LAYER_3D_SILKSCREEN_BOTTOM, LAYER_3D_SILKSCREEN_TOP, LAYER_3D_SMD_MODELS, LAYER_3D_SOLDERMASK_BOTTOM, LAYER_3D_SOLDERMASK_TOP, LAYER_3D_SOLDERPASTE, LAYER_3D_TH_MODELS, LAYER_3D_USER_COMMENTS, LAYER_3D_USER_DRAWINGS, LAYER_3D_USER_ECO1, LAYER_3D_USER_ECO2, LAYER_3D_VIRTUAL_MODELS, LAYER_FP_REFERENCES, LAYER_FP_TEXT, LAYER_FP_VALUES, m_board, m_Cfg, EDA_3D_VIEWER_SETTINGS::m_CurrentPreset, EDA_3D_VIEWER_SETTINGS::m_Render, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_adhesive, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_axis, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_board_body, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_comments, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_copper_bottom, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_copper_top, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_drawings, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_eco1, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_eco2, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_dnp, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_insert, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_normal, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_not_in_posfile, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_virtual, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_fp_references, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_fp_text, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_fp_values, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_model_bbox, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_off_board_silk, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_silkscreen_bottom, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_silkscreen_top, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_soldermask_bottom, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_soldermask_top, and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_solderpaste.

Referenced by createLayers(), APPEARANCE_CONTROLS_3D::onColorSwatchChanged(), APPEARANCE_CONTROLS_3D::onLayerPresetChanged(), APPEARANCE_CONTROLS_3D::OnLayerVisibilityChanged(), APPEARANCE_CONTROLS_3D::rebuildLayers(), RENDER_3D_OPENGL::Redraw(), RENDER_3D_OPENGL::reload(), RENDER_3D_RAYTRACE_BASE::Reload(), APPEARANCE_CONTROLS_3D::syncLayerPresetSelection(), EDA_3D_CONTROLLER::ToggleVisibility(), and APPEARANCE_CONTROLS_3D::UpdateLayerCtls().

◆ InitSettings()

void BOARD_ADAPTER::InitSettings ( REPORTER aStatusReporter,
REPORTER aWarningReporter 
)

Function to be called by the render when it need to reload the settings for the board.

Parameters
aStatusReporterthe pointer for the status reporter.
aWarningReporterpointer for the warning reporter.

Definition at line 325 of file board_adapter.cpp.

References _, B_Adhes, B_Cu, B_Mask, B_Paste, B_SilkS, BS_ITEM_TYPE_COPPER, BS_ITEM_TYPE_DIELECTRIC, BOX2< Vec >::Centre(), BOARD::ComputeBoundingBox(), createBoardPolygon(), createLayers(), DEFAULT_BOARD_THICKNESS, DEFAULT_COPPER_THICKNESS, DEFAULT_TECH_LAYER_THICKNESS, F_Adhes, F_Cu, F_Mask, F_Paste, F_SilkS, g_BevelThickness3DU, ADVANCED_CFG::GetCfg(), BOARD::GetCopperLayerCount(), BOARD_STACKUP::GetCount(), BOARD::GetDesignSettings(), BOX2< Vec >::GetHeight(), GetLayerColors(), BOARD_STACKUP::GetList(), GetRunningMicroSecs(), BOX2< Vec >::GetSize(), BOARD_DESIGN_SETTINGS::GetStackupDescriptor(), BOX2< Vec >::GetWidth(), BOX2< Vec >::Inflate(), BOARD::IsFootprintHolder(), LAYER_3D_BACKGROUND_BOTTOM, LAYER_3D_BACKGROUND_TOP, LAYER_3D_BOARD, LAYER_3D_COPPER_TOP, LAYER_3D_SILKSCREEN_BOTTOM, LAYER_3D_SILKSCREEN_TOP, LAYER_3D_SOLDERMASK_BOTTOM, LAYER_3D_SOLDERMASK_TOP, LAYER_3D_SOLDERPASTE, LAYER_3D_USER_COMMENTS, LAYER_3D_USER_DRAWINGS, LAYER_3D_USER_ECO1, LAYER_3D_USER_ECO2, layerThicknessMargin, m_backCopperThickness3DU, m_BgColorBot, m_BgColorTop, m_biuTo3Dunits, m_board, m_BoardBodyColor, m_boardBodyThickness3DU, m_boardBoundingBox, m_boardCenter, m_boardPos, m_boardSize, m_CopperColor, m_copperLayersCount, m_ECO1Color, m_ECO2Color, m_frontCopperThickness3DU, m_layerZcoordBottom, m_layerZcoordTop, m_logTrace, m_nonCopperLayerThickness3DU, m_SilkScreenColorBot, m_SilkScreenColorTop, m_SolderMaskColorBot, m_SolderMaskColorTop, m_SolderPasteColor, m_solderPasteLayerThickness3DU, m_UserCommentsColor, m_UserDrawingsColor, MAX_CU_LAYERS, EDA_IU_SCALE::mmToIU(), PCB_LAYER_ID_COUNT, pcbIUScale, RANGE_SCALE_3D, REPORTER::Report(), RPT_SEVERITY_WARNING, SOLDERPASTE_LAYER_THICKNESS, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by EDA_3D_VIEWER_FRAME::LoadSettings(), RENDER_3D_OPENGL::reload(), and RENDER_3D_RAYTRACE_BASE::Reload().

◆ Is3dLayerEnabled()

◆ IsFootprintShown()

◆ ReloadColorSettings()

◆ Set3dCacheManager()

void BOARD_ADAPTER::Set3dCacheManager ( S3D_CACHE aCacheMgr)
inlinenoexcept

Update the cache manager pointer.

Parameters
aCachePointerthe pointer to the 3D cache manager.

Definition at line 84 of file board_adapter.h.

References m_3dModelManager.

Referenced by PCBNEW_JOBS_HANDLER::JobExportRender(), and EDA_3D_CANVAS::ReloadRequest().

◆ SetBoard()

void BOARD_ADAPTER::SetBoard ( BOARD aBoard)
inlinenoexcept

◆ SetLayerColors()

◆ SetVisibleLayers()

void BOARD_ADAPTER::SetVisibleLayers ( const std::bitset< LAYER_3D_END > &  aLayers)

Definition at line 714 of file board_adapter.cpp.

References LAYER_3D_ADHESIVE, LAYER_3D_AXES, LAYER_3D_BOARD, LAYER_3D_BOUNDING_BOXES, LAYER_3D_COPPER_BOTTOM, LAYER_3D_COPPER_TOP, LAYER_3D_MODELS_MARKED_DNP, LAYER_3D_MODELS_NOT_IN_POS, LAYER_3D_OFF_BOARD_SILK, LAYER_3D_SILKSCREEN_BOTTOM, LAYER_3D_SILKSCREEN_TOP, LAYER_3D_SMD_MODELS, LAYER_3D_SOLDERMASK_BOTTOM, LAYER_3D_SOLDERMASK_TOP, LAYER_3D_SOLDERPASTE, LAYER_3D_TH_MODELS, LAYER_3D_USER_COMMENTS, LAYER_3D_USER_DRAWINGS, LAYER_3D_USER_ECO1, LAYER_3D_USER_ECO2, LAYER_3D_VIRTUAL_MODELS, LAYER_FP_REFERENCES, LAYER_FP_TEXT, LAYER_FP_VALUES, m_Cfg, EDA_3D_VIEWER_SETTINGS::m_Render, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_adhesive, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_axis, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_board_body, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_comments, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_copper_bottom, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_copper_top, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_drawings, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_eco1, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_eco2, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_dnp, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_insert, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_normal, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_not_in_posfile, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_virtual, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_fp_references, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_fp_text, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_fp_values, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_model_bbox, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_off_board_silk, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_silkscreen_bottom, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_silkscreen_top, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_soldermask_bottom, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_soldermask_top, and EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_solderpaste.

Referenced by APPEARANCE_CONTROLS_3D::doApplyLayerPreset(), APPEARANCE_CONTROLS_3D::onColorSwatchChanged(), and APPEARANCE_CONTROLS_3D::OnLayerVisibilityChanged().

Member Data Documentation

◆ g_BoardColors

CUSTOM_COLORS_LIST BOARD_ADAPTER::g_BoardColors
static

Definition at line 399 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), and GetLayerColors().

◆ g_DefaultBackgroundBot

KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultBackgroundBot
static

◆ g_DefaultBackgroundTop

KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultBackgroundTop
static

◆ g_DefaultBoardBody

KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultBoardBody
static

◆ g_DefaultComments

KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultComments
static

◆ g_DefaultECOs

KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultECOs
static

◆ g_DefaultSilkscreen

KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultSilkscreen
static

◆ g_DefaultSolderMask

KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultSolderMask
static

◆ g_DefaultSolderPaste

KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultSolderPaste
static

◆ g_DefaultSurfaceFinish

KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultSurfaceFinish
static

◆ g_FinishColors

CUSTOM_COLORS_LIST BOARD_ADAPTER::g_FinishColors
static

Definition at line 398 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), and GetLayerColors().

◆ g_MaskColors

CUSTOM_COLORS_LIST BOARD_ADAPTER::g_MaskColors
static

Definition at line 396 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), and GetLayerColors().

◆ g_PasteColors

CUSTOM_COLORS_LIST BOARD_ADAPTER::g_PasteColors
static

Definition at line 397 of file board_adapter.h.

Referenced by BOARD_ADAPTER().

◆ g_SilkColors

CUSTOM_COLORS_LIST BOARD_ADAPTER::g_SilkColors
static

Definition at line 395 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), and GetLayerColors().

◆ m_3dModelManager

S3D_CACHE* BOARD_ADAPTER::m_3dModelManager
private

Definition at line 435 of file board_adapter.h.

Referenced by Get3dCacheManager(), and Set3dCacheManager().

◆ m_averageHoleDiameter

float BOARD_ADAPTER::m_averageHoleDiameter
private

Definition at line 496 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), and GetAverageHoleDiameter().

◆ m_averageTrackWidth

float BOARD_ADAPTER::m_averageTrackWidth
private

Definition at line 492 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), and GetAverageTrackWidth().

◆ m_averageViaHoleDiameter

float BOARD_ADAPTER::m_averageViaHoleDiameter
private

Definition at line 494 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), and GetAverageViaHoleDiameter().

◆ m_backCopperThickness3DU

float BOARD_ADAPTER::m_backCopperThickness3DU
private

Definition at line 486 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), GetBackCopperThickness(), and InitSettings().

◆ m_backPlatedCopperPolys

SHAPE_POLY_SET* BOARD_ADAPTER::m_backPlatedCopperPolys
private

Definition at line 449 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), and destroyLayers().

◆ m_backPlatedPadAndGraphicPolys

SHAPE_POLY_SET* BOARD_ADAPTER::m_backPlatedPadAndGraphicPolys
private

◆ m_BgColorBot

◆ m_BgColorTop

◆ m_biuTo3Dunits

double BOARD_ADAPTER::m_biuTo3Dunits
private

Scale factor to convert board internal units to 3D units normalized between -1.0 and 1.0.

Definition at line 476 of file board_adapter.h.

Referenced by addShape(), addSolidAreasShapes(), addText(), BiuTo3dUnits(), BOARD_ADAPTER(), createLayers(), createPadWithMargin(), GetCircleSegmentCount(), and InitSettings().

◆ m_board

◆ m_board_poly

SHAPE_POLY_SET BOARD_ADAPTER::m_board_poly
private

Board outline polygon.

Definition at line 459 of file board_adapter.h.

Referenced by createBoardPolygon(), and GetBoardPoly().

◆ m_BoardBodyColor

SFVEC4F BOARD_ADAPTER::m_BoardBodyColor

◆ m_boardBodyThickness3DU

float BOARD_ADAPTER::m_boardBodyThickness3DU
private

Definition at line 487 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), GetBoardBodyThickness(), and InitSettings().

◆ m_boardBoundingBox

BBOX_3D BOARD_ADAPTER::m_boardBoundingBox
private

3D bounding box of the board in 3D units.

Definition at line 441 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), GetBBox(), and InitSettings().

◆ m_boardCenter

SFVEC3F BOARD_ADAPTER::m_boardCenter
private

3D center position of the board in 3D units.

Definition at line 440 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), GetBoardCenter(), and InitSettings().

◆ m_boardPos

VECTOR2I BOARD_ADAPTER::m_boardPos
private

Board center position in board internal units.

Definition at line 438 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), GetBoardPos(), and InitSettings().

◆ m_boardSize

VECTOR2I BOARD_ADAPTER::m_boardSize
private

Board size in board internal units.

Definition at line 439 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), GetBoardSize(), and InitSettings().

◆ m_Cfg

EDA_3D_VIEWER_SETTINGS* BOARD_ADAPTER::m_Cfg

Definition at line 412 of file board_adapter.h.

Referenced by RENDER_3D_RAYTRACE_BASE::addModels(), APPEARANCE_CONTROLS_3D::ApplyLayerPreset(), EDA_3D_VIEWER_FRAME::applySettings(), DIALOG_FOOTPRINT_CHOOSER::build3DCanvas(), FOOTPRINT_CHOOSER_FRAME::build3DCanvas(), RENDER_3D_RAYTRACE_BASE::createItemsFromContainer(), createLayers(), APPEARANCE_CONTROLS_3D::doApplyLayerPreset(), APPEARANCE_CONTROLS_3D::doApplyViewport(), EDA_3D_CANVAS::DoRePaint(), RENDER_3D_OPENGL::get3dModelsSelected(), GetLayerColors(), RENDER_3D_RAYTRACE_BASE::getModelMaterial(), GetSphericalCoord(), GetVisibleLayers(), EDA_3D_CONDITIONS::gridSizeFunction(), IsFootprintShown(), PCBNEW_JOBS_HANDLER::JobExportRender(), RENDER_3D_RAYTRACE_BASE::load3DModels(), RENDER_3D_OPENGL::load3dModels(), PANEL_PREVIEW_3D_MODEL::loadSettings(), EDA_3D_VIEWER_FRAME::LoadSettings(), EDA_3D_CONTROLLER::On3DGridSelection(), EDA_3D_VIEWER_FRAME::onDisableRayTracing(), APPEARANCE_CONTROLS_3D::onLayerPresetChanged(), APPEARANCE_CONTROLS_3D::OnLayerVisibilityChanged(), EDA_3D_CANVAS::OnMouseMove(), EDA_3D_VIEWER_FRAME::onRenderEngineSelection(), RENDER_3D_RAYTRACE_BASE::postProcessBlurFinish(), RENDER_3D_RAYTRACE_BASE::postProcessShading(), APPEARANCE_CONTROLS_3D::rebuildLayerPresetsWidget(), EDA_3D_VIEWER_FRAME::Redraw(), RENDER_3D_OPENGL::Redraw(), EDA_3D_VIEWER_FRAME::refreshRender(), RENDER_3D_OPENGL::reload(), RENDER_3D_RAYTRACE_BASE::Reload(), RENDER_3D_RAYTRACE_BASE::render(), RENDER_3D_RAYTRACE_BASE::renderAntiAliasPackets(), RENDER_3D_RAYTRACE_BASE::renderBlockTracing(), RENDER_3D_OPENGL::renderModel(), RENDER_3D_OPENGL::renderOpaqueModels(), RENDER_3D_OPENGL::renderTransparentModels(), EDA_3D_CONTROLLER::RotateView(), EDA_3D_VIEWER_FRAME::SaveSettings(), PANEL_PREVIEW_3D_MODEL::setBodyStyleView(), EDA_3D_CONTROLLER::SetMaterial(), RENDER_3D_RAYTRACE_BASE::setupMaterials(), EDA_3D_VIEWER_FRAME::setupUIConditions(), APPEARANCE_CONTROLS_3D::SetUserViewports(), SetVisibleLayers(), RENDER_3D_RAYTRACE_BASE::shadeHit(), APPEARANCE_CONTROLS_3D::syncLayerPresetSelection(), EDA_3D_VIEWER_FRAME::takeScreenshot(), EDA_3D_CONTROLLER::ToggleOrtho(), APPEARANCE_CONTROLS_3D::UpdateLayerCtls(), and PANEL_PREVIEW_3D_MODEL::~PANEL_PREVIEW_3D_MODEL().

◆ m_colors

COLOR_SETTINGS* BOARD_ADAPTER::m_colors
private

Definition at line 436 of file board_adapter.h.

Referenced by GetItemColor(), GetLayerColor(), and ReloadColorSettings().

◆ m_CopperColor

◆ m_copperLayersCount

unsigned int BOARD_ADAPTER::m_copperLayersCount
private

Definition at line 474 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), and InitSettings().

◆ m_ECO1Color

SFVEC4F BOARD_ADAPTER::m_ECO1Color

◆ m_ECO2Color

SFVEC4F BOARD_ADAPTER::m_ECO2Color

◆ m_frontCopperThickness3DU

float BOARD_ADAPTER::m_frontCopperThickness3DU
private

Definition at line 485 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), GetFrontCopperThickness(), and InitSettings().

◆ m_frontPlatedCopperPolys

SHAPE_POLY_SET* BOARD_ADAPTER::m_frontPlatedCopperPolys
private

Definition at line 448 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), and destroyLayers().

◆ m_frontPlatedPadAndGraphicPolys

SHAPE_POLY_SET* BOARD_ADAPTER::m_frontPlatedPadAndGraphicPolys
private

◆ m_holeCount

unsigned int BOARD_ADAPTER::m_holeCount
private

Definition at line 495 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), and GetHoleCount().

◆ m_IsBoardView

◆ m_IsPreviewer

◆ m_layerHoleIdPolys

MAP_POLY BOARD_ADAPTER::m_layerHoleIdPolys
private

Hole inner diameters (per layer)

Definition at line 452 of file board_adapter.h.

Referenced by createLayers(), destroyLayers(), and GetHoleIdPolysMap().

◆ m_layerHoleMap

MAP_CONTAINER_2D_BASE BOARD_ADAPTER::m_layerHoleMap
private

Holes for each layer.

Definition at line 462 of file board_adapter.h.

Referenced by createLayers(), destroyLayers(), and GetLayerHoleMap().

◆ m_layerHoleOdPolys

MAP_POLY BOARD_ADAPTER::m_layerHoleOdPolys
private

Hole outer diameters (per layer)

Definition at line 451 of file board_adapter.h.

Referenced by createLayers(), destroyLayers(), and GetHoleOdPolysMap().

◆ m_layerMap

MAP_CONTAINER_2D_BASE BOARD_ADAPTER::m_layerMap
private

2D elements for each layer.

Definition at line 461 of file board_adapter.h.

Referenced by createLayers(), destroyLayers(), and GetLayerMap().

◆ m_layers_poly

MAP_POLY BOARD_ADAPTER::m_layers_poly
private

Amalgamated polygon contours for various types of items.

Definition at line 443 of file board_adapter.h.

Referenced by createLayers(), destroyLayers(), and GetPolyMap().

◆ m_layerZcoordBottom

std::array<float, PCB_LAYER_ID_COUNT> BOARD_ADAPTER::m_layerZcoordBottom
private

Bottom (Start) Z position of each layer in 3D units.

Definition at line 482 of file board_adapter.h.

Referenced by GetFootprintZPos(), GetLayerBottomZPos(), and InitSettings().

◆ m_layerZcoordTop

std::array<float, PCB_LAYER_ID_COUNT> BOARD_ADAPTER::m_layerZcoordTop
private

Top (End) Z position of each layer in 3D units.

Definition at line 479 of file board_adapter.h.

Referenced by GetFootprintZPos(), GetLayerTopZPos(), and InitSettings().

◆ m_MousewheelPanning

bool BOARD_ADAPTER::m_MousewheelPanning

◆ m_nonCopperLayerThickness3DU

float BOARD_ADAPTER::m_nonCopperLayerThickness3DU
private

Definition at line 488 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), GetNonCopperLayerThickness(), and InitSettings().

◆ m_NPTH_ODPolys

SHAPE_POLY_SET BOARD_ADAPTER::m_NPTH_ODPolys
private

NPTH outer diameters.

Definition at line 454 of file board_adapter.h.

Referenced by createLayers(), destroyLayers(), and GetNPTH_ODPolys().

◆ m_offboardPadsBack

BVH_CONTAINER_2D* BOARD_ADAPTER::m_offboardPadsBack
private

Definition at line 467 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), destroyLayers(), and GetOffboardPadsBack().

◆ m_offboardPadsFront

BVH_CONTAINER_2D* BOARD_ADAPTER::m_offboardPadsFront
private

Definition at line 466 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), destroyLayers(), and GetOffboardPadsFront().

◆ m_platedPadsBack

BVH_CONTAINER_2D* BOARD_ADAPTER::m_platedPadsBack
private

Definition at line 465 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), destroyLayers(), and GetPlatedPadsBack().

◆ m_platedPadsFront

BVH_CONTAINER_2D* BOARD_ADAPTER::m_platedPadsFront
private

Definition at line 464 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), destroyLayers(), and GetPlatedPadsFront().

◆ m_SilkScreenColorBot

SFVEC4F BOARD_ADAPTER::m_SilkScreenColorBot

in realistic mode: SilkScreen color ( bot )

Definition at line 425 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), InitSettings(), RENDER_3D_RAYTRACE_BASE::Reload(), RENDER_3D_OPENGL::setLayerMaterial(), and RENDER_3D_OPENGL::setupMaterials().

◆ m_SilkScreenColorTop

SFVEC4F BOARD_ADAPTER::m_SilkScreenColorTop

◆ m_SolderMaskColorBot

SFVEC4F BOARD_ADAPTER::m_SolderMaskColorBot

in realistic mode: solder mask color ( bot )

Definition at line 422 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), InitSettings(), RENDER_3D_RAYTRACE_BASE::Reload(), and RENDER_3D_OPENGL::setLayerMaterial().

◆ m_SolderMaskColorTop

SFVEC4F BOARD_ADAPTER::m_SolderMaskColorTop

◆ m_SolderPasteColor

SFVEC4F BOARD_ADAPTER::m_SolderPasteColor

◆ m_solderPasteLayerThickness3DU

float BOARD_ADAPTER::m_solderPasteLayerThickness3DU
private

Definition at line 489 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), and InitSettings().

◆ m_TH_IDs

BVH_CONTAINER_2D BOARD_ADAPTER::m_TH_IDs
private

List of PTH inner diameters.

Definition at line 470 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), destroyLayers(), and GetTH_IDs().

◆ m_TH_ODPolys

SHAPE_POLY_SET BOARD_ADAPTER::m_TH_ODPolys
private

PTH outer diameters.

Definition at line 455 of file board_adapter.h.

Referenced by createLayers(), destroyLayers(), and GetTH_ODPolys().

◆ m_TH_ODs

BVH_CONTAINER_2D BOARD_ADAPTER::m_TH_ODs
private

List of PTH outer diameters.

Definition at line 469 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), destroyLayers(), and GetTH_ODs().

◆ m_trackCount

unsigned int BOARD_ADAPTER::m_trackCount
private

Definition at line 491 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), and createLayers().

◆ m_UserCommentsColor

SFVEC4F BOARD_ADAPTER::m_UserCommentsColor

◆ m_UserDrawingsColor

SFVEC4F BOARD_ADAPTER::m_UserDrawingsColor

◆ m_viaAnnuli

BVH_CONTAINER_2D BOARD_ADAPTER::m_viaAnnuli
private

List of via annular rings.

Definition at line 471 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), destroyLayers(), and GetViaAnnuli().

◆ m_viaAnnuliPolys

SHAPE_POLY_SET BOARD_ADAPTER::m_viaAnnuliPolys
private

Via annular ring outer diameters.

Definition at line 457 of file board_adapter.h.

Referenced by createLayers(), destroyLayers(), and GetViaAnnuliPolys().

◆ m_viaCount

unsigned int BOARD_ADAPTER::m_viaCount
private

Definition at line 493 of file board_adapter.h.

Referenced by BOARD_ADAPTER(), createLayers(), and GetViaCount().

◆ m_viaTH_ODPolys

SHAPE_POLY_SET BOARD_ADAPTER::m_viaTH_ODPolys
private

Via hole outer diameters.

Definition at line 456 of file board_adapter.h.

Referenced by createLayers(), destroyLayers(), and GetViaTH_ODPolys().

◆ m_viaTH_ODs

BVH_CONTAINER_2D BOARD_ADAPTER::m_viaTH_ODs
private

List of via hole outer diameters.

Definition at line 472 of file board_adapter.h.

Referenced by createLayers(), destroyLayers(), and GetViaTH_ODs().


The documentation for this class was generated from the following files: