KiCad PCB EDA Suite
cinfo3d_visu.cpp
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-2016 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 
30 #include "../3d_rendering/ccamera.h"
31 #include "cinfo3d_visu.h"
33 #include <class_board.h>
34 #include <3d_math.h>
35 #include "3d_fastmath.h"
37 
44 const wxChar *CINFO3D_VISU::m_logTrace = wxT( "KI_TRACE_EDA_CINFO3D_VISU" );
45 
46 
48 
49 
51  m_currentCamera( m_trackBallCamera ),
52  m_trackBallCamera( RANGE_SCALE_3D )
53 {
54  wxLogTrace( m_logTrace, wxT( "CINFO3D_VISU::CINFO3D_VISU" ) );
55 
56  m_board = NULL;
57  m_3d_model_manager = NULL;
59  m_drawFlags.resize( FL_LAST, false );
60 
63 
64  m_boardPos = wxPoint();
65  m_boardSize = wxSize();
66  m_boardCenter = SFVEC3F( 0.0f );
67 
69 
70  m_layers_container2D.clear();
71  m_layers_holes2D.clear();
74 
76  m_epoxyThickness3DU = 0.0f;
77  m_copperThickness3DU = 0.0f;
79  m_biuTo3Dunits = 1.0;
80 
82  m_stats_nr_vias = 0;
84  m_stats_nr_holes = 0;
87 
90 
91 
92  memset( m_layerZcoordTop, 0, sizeof( m_layerZcoordTop ) );
93  memset( m_layerZcoordBottom, 0, sizeof( m_layerZcoordBottom ) );
94 
97  SetFlag( FL_SHOW_BOARD_BODY, true );
102  SetFlag( FL_ZONE, true );
103  SetFlag( FL_SILKSCREEN, true );
104  SetFlag( FL_SOLDERMASK, true );
105 
106  m_BgColorBot = SFVEC3D( 0.4, 0.4, 0.5 );
107  m_BgColorTop = SFVEC3D( 0.8, 0.8, 0.9 );
108  m_BoardBodyColor = SFVEC3D( 0.4, 0.4, 0.5 );
109  m_SolderMaskColor = SFVEC3D( 0.1, 0.2, 0.1 );
110  m_SolderPasteColor = SFVEC3D( 0.4, 0.4, 0.4 );
111  m_SilkScreenColor = SFVEC3D( 0.9, 0.9, 0.9 );
112  m_CopperColor = SFVEC3D( 0.75, 0.61, 0.23 );
113 }
114 
115 
117 {
118  destroyLayers();
119 }
120 
121 
123 {
124  wxASSERT( aLayer < PCB_LAYER_ID_COUNT );
125 
126  DISPLAY3D_FLG flg;
127 
128  // see if layer needs to be shown
129  // check the flags
130  switch( aLayer )
131  {
132  case B_Adhes:
133  case F_Adhes:
134  flg = FL_ADHESIVE;
135  break;
136 
137  case B_Paste:
138  case F_Paste:
139  flg = FL_SOLDERPASTE;
140  break;
141 
142  case B_SilkS:
143  case F_SilkS:
144  flg = FL_SILKSCREEN;
145  break;
146 
147  case B_Mask:
148  case F_Mask:
149  flg = FL_SOLDERMASK;
150  break;
151 
152  case Dwgs_User:
153  case Cmts_User:
155  return false;
156 
157  flg = FL_COMMENTS;
158  break;
159 
160  case Eco1_User:
161  case Eco2_User:
163  return false;
164 
165  flg = FL_ECO;
166  break;
167 
168  case Edge_Cuts:
170  return false;
171 
172  return true;
173  break;
174 
175  case Margin:
177  return false;
178 
179  return true;
180  break;
181 
182  case B_Cu:
183  case F_Cu:
184  return m_board->GetDesignSettings().IsLayerVisible( aLayer ) ||
186  break;
187 
188  default:
189  // the layer is an internal copper layer, used the visibility
190  if( GetFlag( FL_SHOW_BOARD_BODY ) &&
192  {
193  // Do not render internal layers if it is overlap with the board
194  // (on OpenGL render)
195  return false;
196  }
197 
198  return m_board->GetDesignSettings().IsLayerVisible( aLayer );
199  }
200 
201  // The layer has a flag, return the flag
202  return GetFlag( flg );
203 }
204 
205 
207 {
208  wxASSERT( aFlag < FL_LAST );
209 
210  return m_drawFlags[aFlag];
211 }
212 
213 
214 void CINFO3D_VISU::SetFlag( DISPLAY3D_FLG aFlag, bool aState )
215 {
216  wxASSERT( aFlag < FL_LAST );
217 
218  m_drawFlags[aFlag] = aState;
219 }
220 
222 {
223  if( ( ( aModuleAttributs == MOD_DEFAULT ) &&
225  ( ( ( aModuleAttributs & MOD_CMS) == MOD_CMS ) &&
227  ( ( ( aModuleAttributs & MOD_VIRTUAL) == MOD_VIRTUAL ) &&
229  {
230  return true;
231  }
232 
233  return false;
234 }
235 
236 
237 // !TODO: define the actual copper thickness by user
238 #define COPPER_THICKNESS KiROUND( 0.035 * IU_PER_MM ) // for 35 um
239 #define TECH_LAYER_THICKNESS KiROUND( 0.04 * IU_PER_MM )
240 
242 {
243  return COPPER_THICKNESS;
244 }
245 
246 unsigned int CINFO3D_VISU::GetNrSegmentsCircle( float aDiameter3DU ) const
247 {
248  wxASSERT( aDiameter3DU > 0.0f );
249 
250  return GetNrSegmentsCircle( (int)( aDiameter3DU / m_biuTo3Dunits ) );
251 }
252 
253 
254 unsigned int CINFO3D_VISU::GetNrSegmentsCircle( int aDiameterBIU ) const
255 {
256  wxASSERT( aDiameterBIU > 0 );
257 
258  // Require at least 3 segments for a circle
259  return std::max( GetArcToSegmentCount( aDiameterBIU / 2, ARC_HIGH_DEF, 360.0 ), 3 );
260 }
261 
262 
263 double CINFO3D_VISU::GetCircleCorrectionFactor( int aNrSides ) const
264 {
265  wxASSERT( aNrSides >= 3 );
266 
267  return GetCircletoPolyCorrectionFactor( aNrSides );
268 }
269 
270 
271 void CINFO3D_VISU::InitSettings( REPORTER *aStatusTextReporter )
272 {
273  wxLogTrace( m_logTrace, wxT( "CINFO3D_VISU::InitSettings" ) );
274 
275  // Calculates the board bounding box
276  // First, use only the board outlines
277  EDA_RECT bbbox = m_board->ComputeBoundingBox( true );
278 
279  // If no outlines, use the board with items
280  if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
281  bbbox = m_board->ComputeBoundingBox( false );
282 
283  // Gives a non null size to avoid issues in zoom / scale calculations
284  if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
285  bbbox.Inflate( Millimeter2iu( 10 ) );
286 
287  m_boardSize = bbbox.GetSize();
288  m_boardPos = bbbox.Centre();
289 
290  wxASSERT( (m_boardSize.x > 0) && (m_boardSize.y > 0) );
291 
292  m_boardPos.y = -m_boardPos.y; // The y coord is inverted in 3D viewer
293 
295 
296  // Ensure the board has 2 sides for 3D views, because it is hard to find
297  // a *really* single side board in the true life...
298  if( m_copperLayersCount < 2 )
300 
301  // Calculate the convertion to apply to all positions.
303 
306 
307  // !TODO: use value defined by user (currently use default values by ctor
310 
311  // Init Z position of each layer
312  // calculate z position for each copper layer
313  // Zstart = -m_epoxyThickness / 2.0 is the z position of the back (bottom layer) (layer id = 31)
314  // Zstart = +m_epoxyThickness / 2.0 is the z position of the front (top layer) (layer id = 0)
315  // all unused copper layer z position are set to 0
316 
317  // ____==__________==________==______ <- Bottom = +m_epoxyThickness / 2.0,
318  // | | Top = Bottom + m_copperThickness
319  // |__________________________________|
320  // == == == == <- Bottom = -m_epoxyThickness / 2.0,
321  // Top = Bottom - m_copperThickness
322 
323  unsigned int layer;
324 
325  for( layer = 0; layer < m_copperLayersCount; ++layer )
326  {
327  m_layerZcoordBottom[layer] = m_epoxyThickness3DU / 2.0f -
328  (m_epoxyThickness3DU * layer / (m_copperLayersCount - 1) );
329 
330  if( layer < (m_copperLayersCount / 2) )
332  else
334  }
335 
336  #define layerThicknessMargin 1.1
337  const float zpos_offset = m_nonCopperLayerThickness3DU * layerThicknessMargin;
338 
339  // Fill remaining unused copper layers and back layer zpos
340  // with -m_epoxyThickness / 2.0
341  for( ; layer < MAX_CU_LAYERS; layer++ )
342  {
343  m_layerZcoordBottom[layer] = -(m_epoxyThickness3DU / 2.0f);
345  }
346 
347  // This is the top of the copper layer thickness.
348  const float zpos_copperTop_back = m_layerZcoordTop[B_Cu];
349  const float zpos_copperTop_front = m_layerZcoordTop[F_Cu];
350 
351  // calculate z position for each non copper layer
352  // Solder mask and Solder paste have the same Z position
353  for( int layer_id = MAX_CU_LAYERS; layer_id < PCB_LAYER_ID_COUNT; ++layer_id )
354  {
355  float zposTop;
356  float zposBottom;
357 
358  switch( layer_id )
359  {
360  case B_Adhes:
361  zposBottom = zpos_copperTop_back - 2.0f * zpos_offset;
362  zposTop = zposBottom - m_nonCopperLayerThickness3DU;
363  break;
364 
365  case F_Adhes:
366  zposBottom = zpos_copperTop_front + 2.0f * zpos_offset;
367  zposTop = zposBottom + m_nonCopperLayerThickness3DU;
368  break;
369 
370  case B_Mask:
371  case B_Paste:
372  zposBottom = zpos_copperTop_back;
373  zposTop = zpos_copperTop_back - m_nonCopperLayerThickness3DU;
374  break;
375 
376  case F_Mask:
377  case F_Paste:
378  zposTop = zpos_copperTop_front + m_nonCopperLayerThickness3DU;
379  zposBottom = zpos_copperTop_front;
380  break;
381 
382  case B_SilkS:
383  zposBottom = zpos_copperTop_back - 1.0f * zpos_offset;
384  zposTop = zposBottom - m_nonCopperLayerThickness3DU;
385  break;
386 
387  case F_SilkS:
388  zposBottom = zpos_copperTop_front + 1.0f * zpos_offset;
389  zposTop = zposBottom + m_nonCopperLayerThickness3DU;
390  break;
391 
392  // !TODO: review
393  default:
394  zposTop = zpos_copperTop_front + (layer_id - MAX_CU_LAYERS + 3.0f) * zpos_offset;
395  zposBottom = zposTop - m_nonCopperLayerThickness3DU;
396  break;
397  }
398 
399  m_layerZcoordTop[layer_id] = zposTop;
400  m_layerZcoordBottom[layer_id] = zposBottom;
401  }
402 
405  0.0f );
406 
407  SFVEC3F boardSize = SFVEC3F( m_boardSize.x * m_biuTo3Dunits,
409  0.0f );
410  boardSize /= 2.0f;
411 
412  SFVEC3F boardMin = (m_boardCenter - boardSize);
413  SFVEC3F boardMax = (m_boardCenter + boardSize);
414 
415  boardMin.z = m_layerZcoordTop[B_Adhes];
416  boardMax.z = m_layerZcoordTop[F_Adhes];
417 
418  m_boardBoundingBox = CBBOX( boardMin, boardMax );
419 
420 #ifdef PRINT_STATISTICS_3D_VIEWER
421  unsigned stats_startCreateBoardPolyTime = GetRunningMicroSecs();
422 #endif
423 
424  if( aStatusTextReporter )
425  aStatusTextReporter->Report( _( "Build board body" ) );
426 
428 
429 #ifdef PRINT_STATISTICS_3D_VIEWER
430  unsigned stats_stopCreateBoardPolyTime = GetRunningMicroSecs();
431  unsigned stats_startCreateLayersTime = stats_stopCreateBoardPolyTime;
432 #endif
433 
434  if( aStatusTextReporter )
435  aStatusTextReporter->Report( _( "Create layers" ) );
436 
437  createLayers( aStatusTextReporter );
438 
439 #ifdef PRINT_STATISTICS_3D_VIEWER
440  unsigned stats_stopCreateLayersTime = GetRunningMicroSecs();
441 
442  printf( "CINFO3D_VISU::InitSettings times\n" );
443  printf( " CreateBoardPoly: %.3f ms\n",
444  (float)( stats_stopCreateBoardPolyTime - stats_startCreateBoardPolyTime ) / 1e3 );
445  printf( " CreateLayers and holes: %.3f ms\n",
446  (float)( stats_stopCreateLayersTime - stats_startCreateLayersTime ) / 1e3 );
447  printf( "\n" );
448 #endif
449 }
450 
451 
453 {
455 
456  wxString errmsg;
457 
458  if( !m_board->GetBoardPolygonOutlines( m_board_poly, /*allLayerHoles,*/ &errmsg ) )
459  {
460  errmsg.append( wxT( "\n\n" ) );
461  errmsg.append( _( "Cannot determine the board outline." ) );
462  wxLogMessage( errmsg );
463  }
464 }
465 
466 
467 float CINFO3D_VISU::GetModulesZcoord3DIU( bool aIsFlipped ) const
468 {
469  if( aIsFlipped )
470  {
471  if( GetFlag( FL_SOLDERPASTE ) )
473  else
475  }
476  else
477  {
478  if( GetFlag( FL_SOLDERPASTE ) )
479  return m_layerZcoordTop[F_SilkS];
480  else
481  return m_layerZcoordTop[F_Paste];
482  }
483 }
484 
485 
487 {
488  switch( aCameraType )
489  {
490  case CAMERA_TRACKBALL:
492  break;
493 
494  default:
495  wxLogMessage( wxT( "CINFO3D_VISU::CameraSetType() error: unknown camera type %d" ),
496  (int)aCameraType );
497  break;
498  }
499 }
500 
501 
503 {
504  wxASSERT( aLayerId < PCB_LAYER_ID_COUNT );
505 
506  const COLOR4D color = m_board->Colors().GetLayerColor( aLayerId );
507 
508  return SFVEC3F( color.r, color.g, color.b );
509 }
510 
511 
513 {
514  return GetColor( m_board->Colors().GetItemColor( aItemId ) );
515 }
516 
517 
519 {
520  return SFVEC3F( aColor.r, aColor.g, aColor.b );
521 }
void CameraSetType(CAMERA_TYPE aCameraType)
CameraSetType - Set the camera type to use.
Defines math related functions.
int GetArcToSegmentCount(int aRadius, int aErrorMax, double aArcAngleDegree)
CBBOX m_boardBoundingBox
3d bounding box of the pcb board in 3d units
Definition: cinfo3d_visu.h:545
wxPoint m_boardPos
center board actual position in board units
Definition: cinfo3d_visu.h:533
SFVEC3D m_CopperColor
in realistic mode: copper color
Definition: cinfo3d_visu.h:503
unsigned int GetNrSegmentsCircle(float aDiameter3DU) const
GetNrSegmentsCircle.
int color
Definition: DXF_plotter.cpp:62
float m_calc_seg_min_factor3DU
min factor used for cicle segment approximation calculation
Definition: cinfo3d_visu.h:632
MATERIAL_MODE m_material_mode
mode to render the 3d shape models material
Definition: cinfo3d_visu.h:527
int GetWidth() const
Definition: eda_rect.h:119
Set for modules listed in the automatic insertion list (usually SMD footprints)
Definition: class_module.h:77
Handles data related with the board to be visualized.
float m_calc_seg_max_factor3DU
max factor used for cicle segment approximation calculation
Definition: cinfo3d_visu.h:635
bool IsLayerVisible(PCB_LAYER_ID aLayerId) const
Function IsLayerVisible tests whether a given layer is visible.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:531
double g
Green component.
Definition: color4d.h:302
#define RANGE_SCALE_3D
This defines the range that all coord will have to be rendered.
Definition: cinfo3d_visu.h:63
BOARD * m_board
Current board.
Definition: cinfo3d_visu.h:509
unsigned int m_stats_nr_holes
number of holes in the board
Definition: cinfo3d_visu.h:653
CINFO3D_VISU G_null_CINFO3D_VISU
This is a dummy visualization configuration.
SFVEC3D m_BgColorBot
background bottom color
Definition: cinfo3d_visu.h:497
float m_nonCopperLayerThickness3DU
Non copper layers thickness.
Definition: cinfo3d_visu.h:622
#define COPPER_THICKNESS
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
std::vector< bool > m_drawFlags
options flags to render the board
Definition: cinfo3d_visu.h:518
CBVHCONTAINER2D m_through_holes_inner
It contains the list of throughHoles of the board, the radius is the inner hole.
Definition: cinfo3d_visu.h:589
float m_stats_via_med_hole_diameter
Computed medium diameter of the via holes in 3D units.
Definition: cinfo3d_visu.h:650
SFVEC3D m_BgColorTop
background top color
Definition: cinfo3d_visu.h:498
SFVEC3F GetLayerColor(PCB_LAYER_ID aLayerId) const
GetLayerColor - get the technical color of a layer.
bool GetFlag(DISPLAY3D_FLG aFlag) const
GetFlag - get a configuration status of a flag.
MAP_CONTAINER_2D m_layers_container2D
It contains the 2d elements of each layer.
Definition: cinfo3d_visu.h:578
float m_epoxyThickness3DU
Epoxy thickness (normalized)
Definition: cinfo3d_visu.h:619
SFVEC3D m_BoardBodyColor
in realistic mode: FR4 board color
Definition: cinfo3d_visu.h:499
double b
Blue component.
Definition: color4d.h:303
float m_stats_hole_med_diameter
Computed medium diameter of the holes in 3D units.
Definition: cinfo3d_visu.h:656
COLOR4D GetItemColor(int aItemIdx) const
Function GetItemColor.
SFVEC3F GetItemColor(int aItemId) const
GetItemColor - get the technical color of a layer.
void createBoardPolygon()
COLOR4D GetLayerColor(LAYER_NUM aLayer) const
Function GetLayerColor.
PCB_LAYER_ID
A quick note on layer IDs:
#define layerThicknessMargin
double GetCircleCorrectionFactor(int aNrSides) const
GetCircleCorrectionFactor - computes a angle correction factor used when creating circles.
int GetCopperThicknessBIU() const
GetCopperThicknessBIU - Get the current copper layer thickness.
unsigned int m_stats_nr_vias
Nr of vias.
Definition: cinfo3d_visu.h:647
void createLayers(REPORTER *aStatusTextReporter)
SFVEC3F m_boardCenter
3d center position of the pcb board in 3d units
Definition: cinfo3d_visu.h:539
wxSize m_boardSize
board actual size in board units
Definition: cinfo3d_visu.h:536
Class CINFO3D_VISU Helper class to handle information needed to display 3D board.
Definition: cinfo3d_visu.h:70
double m_biuTo3Dunits
Normalization scale to convert board internal units to 3D units to normalize 3D units between -1....
Definition: cinfo3d_visu.h:607
glm::dvec3 SFVEC3D
Definition: xv3d_types.h:48
a few functions useful in geometry calculations.
MODULE_ATTR_T
Enum MODULE_ATTR_T is the set of attributes allowed within a MODULE, using MODULE::SetAttributes() an...
Definition: class_module.h:74
bool GetBoardPolygonOutlines(SHAPE_POLY_SET &aOutlines, wxString *aErrorText=nullptr, wxPoint *aErrorLocation=nullptr)
Function GetBoardPolygonOutlines Extracts the board outlines and build a closed polygon from lines,...
SHAPE_POLY_SET m_board_poly
PCB board outline polygon.
Definition: cinfo3d_visu.h:572
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
Definition: cinfo3d_visu.h:664
SFVEC3D m_SolderPasteColor
in realistic mode: solder paste color
Definition: cinfo3d_visu.h:501
#define _(s)
SFVEC3F GetColor(COLOR4D aColor) const
GetColor.
SFVEC3D m_SolderMaskColor
in realistic mode: solder mask color
Definition: cinfo3d_visu.h:500
int GetHeight() const
Definition: eda_rect.h:120
default
Definition: class_module.h:76
CCAMERA & m_currentCamera
Holds a pointer to current camera in use.
Definition: cinfo3d_visu.h:628
DISPLAY3D_FLG
Flags used in rendering options.
Definition: 3d_enums.h:34
Use all material properties from model file.
Definition: 3d_enums.h:92
S3D_CACHE * m_3d_model_manager
pointer to the 3d model manager
Definition: cinfo3d_visu.h:512
const COLORS_DESIGN_SETTINGS & Colors() const
Function GetColorSettings.
Definition: class_board.h:561
SFVEC3D m_SilkScreenColor
in realistic mode: SilkScreen color
Definition: cinfo3d_visu.h:502
bool Is3DLayerEnabled(PCB_LAYER_ID aLayer) const
Is3DLayerEnabled - Check if a layer is enabled.
#define max(a, b)
Definition: auxiliary.h:86
#define TECH_LAYER_THICKNESS
unsigned GetRunningMicroSecs()
Function GetRunningMicroSecs An alternate way to calculate an elapset time (in microsecondes) to clas...
glm::vec3 SFVEC3F
Definition: xv3d_types.h:47
Virtual component: when created by copper shapes on board (Like edge card connectors,...
Definition: class_module.h:79
float m_copperThickness3DU
Copper thickness (normalized)
Definition: cinfo3d_visu.h:616
int GetCopperLayerCount() const
Function GetCopperLayerCount.
void RemoveAllContours()
Removes all outlines & holes (clears) the polygon set.
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
float m_stats_track_med_width
Track average width.
Definition: cinfo3d_visu.h:644
unsigned int m_copperLayersCount
Number of copper layers actually used by the board.
Definition: cinfo3d_visu.h:603
MAP_CONTAINER_2D m_layers_holes2D
It contains the holes per each layer.
Definition: cinfo3d_visu.h:581
RENDER_ENGINE m_render_engine
render engine currently on use
Definition: cinfo3d_visu.h:524
float m_layerZcoordBottom[PCB_LAYER_ID_COUNT]
Bottom (Start) Z position of each layer (normalized)
Definition: cinfo3d_visu.h:613
wxPoint Centre() const
Definition: eda_rect.h:62
CTRACK_BALL m_trackBallCamera
Definition: cinfo3d_visu.h:629
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_UNDEFINED)=0
Function Report is a pure virtual function to override in the derived object.
GRID3D_TYPE m_3D_grid_type
Stores the current grid type.
Definition: cinfo3d_visu.h:521
EDA_RECT ComputeBoundingBox(bool aBoardEdgesOnly=false) const
Function ComputeBoundingBox calculates the bounding box containing all board items (or board edge seg...
Defines math related functions.
float m_layerZcoordTop[PCB_LAYER_ID_COUNT]
Top (End) Z position of each layer (normalized)
Definition: cinfo3d_visu.h:610
double r
Red component.
Definition: color4d.h:301
CBVHCONTAINER2D m_through_holes_outer
It contains the list of throughHoles of the board, the radius of the hole is inflated with the copper...
Definition: cinfo3d_visu.h:585
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
SetFlag - set the status of a flag.
bool ShouldModuleBeDisplayed(MODULE_ATTR_T aModuleAttributs) const
ShouldModuleBeDisplayed - Test if module should be displayed in relation to attributs and the flags.
CAMERA_TYPE
Camera types.
Definition: 3d_enums.h:64
Class CBBOX manages a bounding box defined by two SFVEC3F min max points.
Definition: cbbox.h:40
void Reset()
Function Reset reset the bounding box to zero and de-initialized it.
Definition: cbbox.cpp:98
float GetModulesZcoord3DIU(bool aIsFlipped) const
GetModulesZcoord3DIU - Get the position of the module in 3d integer units considering if it is flippe...
unsigned int m_stats_nr_tracks
Number of tracks in the board.
Definition: cinfo3d_visu.h:641
EDA_RECT & Inflate(wxCoord dx, wxCoord dy)
Function Inflate inflates the rectangle horizontally by dx and vertically by dy.
const wxSize GetSize() const
Definition: eda_rect.h:103
void InitSettings(REPORTER *aStatusTextReporter)
InitSettings - Function to be called by the render when it need to reload the settings for the board.
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
double GetCircletoPolyCorrectionFactor(int aSegCountforCircle)