KiCad PCB EDA Suite
PANEL_PREV_3D Class Reference

#include <panel_prev_model.h>

Inheritance diagram for PANEL_PREV_3D:
PANEL_PREV_3D_BASE

Public Member Functions

 PANEL_PREV_3D (wxWindow *aParent, S3D_CACHE *aCacheManager, MODULE *aModuleCopy, std::vector< S3D_INFO > *aParentInfoList=NULL)
 
 ~PANEL_PREV_3D ()
 
void SetModelDataIdx (int idx, bool aReloadPreviewModule=false)
 SetModelDataIdx - This will set the index of the INFO list that was set on the parent. More...
 
void ResetModelData (bool aReloadPreviewModule=false)
 ResetModelData - Clear the values and reload the preview board. More...
 
void UpdateModelName (wxString const &aModel)
 
bool ValidateWithMessage (wxString &aErrorMessage)
 verify X,Y and Z scale factors are acceptable (> 0.001 and < 1000.0) More...
 
bool Validate () override
 

Protected Attributes

wxStaticText * m_staticText1
 
wxTextCtrl * xscale
 
wxSpinButton * m_spinXscale
 
wxStaticText * m_staticText2
 
wxTextCtrl * yscale
 
wxSpinButton * m_spinYscale
 
wxStaticText * m_staticText3
 
wxTextCtrl * zscale
 
wxSpinButton * m_spinZscale
 
wxStaticText * m_staticText11
 
wxTextCtrl * xrot
 
wxSpinButton * m_spinXrot
 
wxStaticText * m_staticText21
 
wxTextCtrl * yrot
 
wxSpinButton * m_spinYrot
 
wxStaticText * m_staticText31
 
wxTextCtrl * zrot
 
wxSpinButton * m_spinZrot
 
wxStaticText * m_staticText12
 
wxTextCtrl * xoff
 
wxSpinButton * m_spinXoffset
 
wxStaticText * m_staticText22
 
wxTextCtrl * yoff
 
wxSpinButton * m_spinYoffset
 
wxStaticText * m_staticText32
 
wxTextCtrl * zoff
 
wxSpinButton * m_spinZoffset
 
wxBoxSizer * m_SizerPanelView
 
wxFlexGridSizer * m_fgSizerButtons
 
wxBitmapButton * m_bpvISO
 
wxBitmapButton * m_bpvLeft
 
wxBitmapButton * m_bpvFront
 
wxBitmapButton * m_bpvTop
 
wxBitmapButton * m_bpUpdate
 
wxBitmapButton * m_bpvRight
 
wxBitmapButton * m_bpvBack
 
wxBitmapButton * m_bpvBottom
 

Private Member Functions

void initPanel ()
 
void updateOrientation (wxCommandEvent &event) override
 updateOrientation - it will receive the events from editing the fields More...
 
void onMouseWheelScale (wxMouseEvent &event) override
 
void onMouseWheelRot (wxMouseEvent &event) override
 
void onMouseWheelOffset (wxMouseEvent &event) override
 
void onIncrementRot (wxSpinEvent &event) override
 
void onDecrementRot (wxSpinEvent &event) override
 
void onIncrementScale (wxSpinEvent &event) override
 
void onDecrementScale (wxSpinEvent &event) override
 
void onIncrementOffset (wxSpinEvent &event) override
 
void onDecrementOffset (wxSpinEvent &event) override
 
void getOrientationVars (SGPOINT &aScale, SGPOINT &aRotation, SGPOINT &aOffset)
 getOrientationVars - gets the transformation from entries and validate it More...
 
void updateListOnModelCopy ()
 updateListOnModelCopy - copy the current shape list to the copy of module that is on the preview dummy board More...
 
void onEnterPreviewCanvas (wxMouseEvent &event)
 
void View3DISO (wxCommandEvent &event) override
 
void View3DLeft (wxCommandEvent &event) override
 
void View3DFront (wxCommandEvent &event) override
 
void View3DTop (wxCommandEvent &event) override
 
void View3DUpdate (wxCommandEvent &event) override
 
void View3DRight (wxCommandEvent &event) override
 
void View3DBack (wxCommandEvent &event) override
 
void View3DBottom (wxCommandEvent &event) override
 

Private Attributes

wxString currentModelFile
 Used to check if the model file was changed. More...
 
S3D_FILENAME_RESOLVERm_resolver
 Used to get the full path name. More...
 
EDA_3D_CANVASm_previewPane
 The 3D canvas. More...
 
BOARDm_dummyBoard
 A dummy board used to store the copy moduled. More...
 
CINFO3D_VISUm_settings3Dviewer
 The settings that will be used for this 3D viewer canvas. More...
 
MODULEm_copyModule
 A pointer to a new copy of the original module. More...
 
std::vector< S3D_INFO > * m_parentInfoList
 A pointer to the parent S3D_INFO list that we will use to copy to the preview module. More...
 
int m_currentSelectedIdx
 The current selected index of the S3D_INFO list. More...
 
S3D_INFO m_modelInfo
 Current S3D_INFO that is being edited. More...
 

Detailed Description

Definition at line 72 of file panel_prev_model.h.

Constructor & Destructor Documentation

PANEL_PREV_3D::PANEL_PREV_3D ( wxWindow *  aParent,
S3D_CACHE aCacheManager,
MODULE aModuleCopy,
std::vector< S3D_INFO > *  aParentInfoList = NULL 
)

Definition at line 45 of file panel_prev_model.cpp.

References BOARD::Add(), COGL_ATT_LIST::GetAttributesList(), S3D_CACHE::GetResolver(), initPanel(), m_copyModule, m_dummyBoard, m_parentInfoList, m_previewPane, m_resolver, m_settings3Dviewer, PANEL_PREV_3D_BASE::m_SizerPanelView, and onEnterPreviewCanvas().

47  :
48  PANEL_PREV_3D_BASE( aParent, wxID_ANY )
49  {
50  initPanel();
51 
52  if( NULL != aCacheManager )
53  m_resolver = aCacheManager->GetResolver();
54 
55  m_parentInfoList = aParentInfoList;
56 
57  m_dummyBoard->Add( (MODULE*)aModuleCopy );
58  m_copyModule = aModuleCopy;
59 
60  // Set 3d viewer configuration for preview
62 
63  // Create the 3D canvas
64  m_previewPane = new EDA_3D_CANVAS( this,
68  aCacheManager );
69 
70  m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND );
71 
72  m_previewPane->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler(
74  }
MODULE * m_copyModule
A pointer to a new copy of the original module.
CINFO3D_VISU * m_settings3Dviewer
The settings that will be used for this 3D viewer canvas.
static const int * GetAttributesList(bool aUseAntiAliasing)
Get a list of attributes to pass to wxGLCanvas.
PANEL_PREV_3D_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(503, 371), long style=wxTAB_TRAVERSAL)
Class EDA_3D_CANVAS Implement a canvas based on a wxGLCanvas.
Definition: eda_3d_canvas.h:53
wxBoxSizer * m_SizerPanelView
S3D_FILENAME_RESOLVER * m_resolver
Used to get the full path name.
void onEnterPreviewCanvas(wxMouseEvent &event)
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_INSERT) override
>
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
Class CINFO3D_VISU Helper class to handle information needed to display 3D board. ...
Definition: cinfo3d_visu.h:70
S3D_FILENAME_RESOLVER * GetResolver(void)
Definition: 3d_cache.cpp:739
BOARD * m_dummyBoard
A dummy board used to store the copy moduled.
std::vector< S3D_INFO > * m_parentInfoList
A pointer to the parent S3D_INFO list that we will use to copy to the preview module.
PANEL_PREV_3D::~PANEL_PREV_3D ( )

Definition at line 77 of file panel_prev_model.cpp.

References m_dummyBoard, m_previewPane, m_settings3Dviewer, and onEnterPreviewCanvas().

78 {
79  m_previewPane->Disconnect( wxEVT_ENTER_WINDOW,
80  wxMouseEventHandler( PANEL_PREV_3D::onEnterPreviewCanvas ), NULL, this );
81 
82  delete m_settings3Dviewer;
83  delete m_dummyBoard;
84  delete m_previewPane;
85 }
CINFO3D_VISU * m_settings3Dviewer
The settings that will be used for this 3D viewer canvas.
void onEnterPreviewCanvas(wxMouseEvent &event)
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
BOARD * m_dummyBoard
A dummy board used to store the copy moduled.

Member Function Documentation

void PANEL_PREV_3D::getOrientationVars ( SGPOINT aScale,
SGPOINT aRotation,
SGPOINT aOffset 
)
private

getOrientationVars - gets the transformation from entries and validate it

Parameters
aScaleoutput scale var
aRotationoutput rotation var
aOffsetoutput offset var

Definition at line 527 of file panel_prev_model.cpp.

References checkRotation(), DEGREES, g_UserUnit, INCHES, MILLIMETRES, UNSCALED_UNITS, SGPOINT::x, PANEL_PREV_3D_BASE::xoff, PANEL_PREV_3D_BASE::xrot, PANEL_PREV_3D_BASE::xscale, SGPOINT::y, PANEL_PREV_3D_BASE::yoff, PANEL_PREV_3D_BASE::yrot, PANEL_PREV_3D_BASE::yscale, SGPOINT::z, PANEL_PREV_3D_BASE::zoff, PANEL_PREV_3D_BASE::zrot, and PANEL_PREV_3D_BASE::zscale.

Referenced by updateOrientation().

528 {
529  if( NULL == xscale || NULL == yscale || NULL == zscale
530  || NULL == xrot || NULL == yrot || NULL == zrot
531  || NULL == xoff || NULL == yoff || NULL == zoff )
532  {
533  return;
534  }
535 
536  xscale->GetValue().ToDouble( &aScale.x );
537  yscale->GetValue().ToDouble( &aScale.y );
538  zscale->GetValue().ToDouble( &aScale.z );
539 
540  xrot->GetValue().ToDouble( &aRotation.x );
541  yrot->GetValue().ToDouble( &aRotation.y );
542  zrot->GetValue().ToDouble( &aRotation.z );
543 
544  checkRotation( aRotation.x );
545  checkRotation( aRotation.y );
546  checkRotation( aRotation.z );
547 
548  xoff->GetValue().ToDouble( &aOffset.x );
549  yoff->GetValue().ToDouble( &aOffset.y );
550  zoff->GetValue().ToDouble( &aOffset.z );
551 
552  switch( g_UserUnit )
553  {
554  case MILLIMETRES:
555  // Convert to Inches. Offset is stored in inches.
556  aOffset.x = aOffset.x / 25.4;
557  aOffset.y = aOffset.y / 25.4;
558  aOffset.z = aOffset.z / 25.4;
559  break;
560 
561  case INCHES:
562  // It is already in Inches
563  break;
564 
565  case DEGREES:
566  case UNSCALED_UNITS:
567  default:
568  wxASSERT(0);
569  }
570 
571  return;
572 }
double x
Definition: sg_base.h:70
double y
Definition: sg_base.h:71
Definition: common.h:145
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
double z
Definition: sg_base.h:72
static void checkRotation(double &aRotation)
checkRotation Ensure -MAX_ROTATION <= rotation <= MAX_ROTATION aRotation will be normalized between -...
void PANEL_PREV_3D::initPanel ( )
private

Definition at line 88 of file panel_prev_model.cpp.

References currentModelFile, KiBitmap(), PANEL_PREV_3D_BASE::m_bpUpdate, PANEL_PREV_3D_BASE::m_bpvBack, PANEL_PREV_3D_BASE::m_bpvBottom, PANEL_PREV_3D_BASE::m_bpvFront, PANEL_PREV_3D_BASE::m_bpvISO, PANEL_PREV_3D_BASE::m_bpvLeft, PANEL_PREV_3D_BASE::m_bpvRight, PANEL_PREV_3D_BASE::m_bpvTop, m_currentSelectedIdx, m_dummyBoard, m_resolver, PANEL_PREV_3D_BASE::m_spinXoffset, PANEL_PREV_3D_BASE::m_spinXrot, PANEL_PREV_3D_BASE::m_spinXscale, PANEL_PREV_3D_BASE::m_spinYoffset, PANEL_PREV_3D_BASE::m_spinYrot, PANEL_PREV_3D_BASE::m_spinYscale, PANEL_PREV_3D_BASE::m_spinZoffset, PANEL_PREV_3D_BASE::m_spinZrot, and PANEL_PREV_3D_BASE::m_spinZscale.

Referenced by PANEL_PREV_3D().

89 {
90  m_resolver = NULL;
91  currentModelFile.clear();
92  m_dummyBoard = new BOARD();
94 
95  // Set the bitmap of 3D view buttons:
96  m_bpvTop->SetBitmap( KiBitmap( axis3d_top_xpm ) );
97  m_bpvFront->SetBitmap( KiBitmap( axis3d_front_xpm ) );
98  m_bpvBack->SetBitmap( KiBitmap( axis3d_back_xpm ) );
99  m_bpvLeft->SetBitmap( KiBitmap( axis3d_left_xpm ) );
100  m_bpvRight->SetBitmap( KiBitmap( axis3d_right_xpm ) );
101  m_bpvBottom->SetBitmap( KiBitmap( axis3d_bottom_xpm ) );
102  m_bpvISO->SetBitmap( KiBitmap( ortho_xpm ) );
103  m_bpUpdate->SetBitmap( KiBitmap( reload_xpm ) );
104 
105  // Set the min and max values of spin buttons (mandatory on Linux)
106  // They are not used, so they are set to min and max 32 bits int values
107  // (the min and max values supported by a wxSpinButton)
108  // It avoids blocking the up or down arrows when reaching this limit after
109  // a few clicks.
110  wxSpinButton* spinButtonList[] =
111  {
115  };
116 
117  for( int ii = 0; ii < 9; ii++ )
118  spinButtonList[ii]->SetRange( INT_MIN, INT_MAX );
119 }
wxBitmapButton * m_bpvTop
wxBitmapButton * m_bpvBottom
wxSpinButton * m_spinZoffset
wxSpinButton * m_spinYoffset
wxBitmapButton * m_bpvBack
wxBitmapButton * m_bpvLeft
wxBitmapButton * m_bpUpdate
int m_currentSelectedIdx
The current selected index of the S3D_INFO list.
wxBitmapButton * m_bpvRight
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:36
wxSpinButton * m_spinZrot
S3D_FILENAME_RESOLVER * m_resolver
Used to get the full path name.
wxSpinButton * m_spinXoffset
wxSpinButton * m_spinYrot
wxSpinButton * m_spinXrot
wxBitmapButton * m_bpvFront
wxSpinButton * m_spinZscale
wxSpinButton * m_spinXscale
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:166
wxBitmapButton * m_bpvISO
BOARD * m_dummyBoard
A dummy board used to store the copy moduled.
wxString currentModelFile
Used to check if the model file was changed.
wxSpinButton * m_spinYscale
void PANEL_PREV_3D::onDecrementOffset ( wxSpinEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 453 of file panel_prev_model.cpp.

References g_UserUnit, INCHES, incrementTextCtrl(), PANEL_PREV_3D_BASE::m_spinYoffset, PANEL_PREV_3D_BASE::m_spinZoffset, MAX_OFFSET, OFFSET_INCREMENT_MIL, OFFSET_INCREMENT_MM, PANEL_PREV_3D_BASE::xoff, PANEL_PREV_3D_BASE::yoff, and PANEL_PREV_3D_BASE::zoff.

454 {
455  wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
456 
457  wxTextCtrl * textCtrl = xoff;
458 
459  if( spinCtrl == m_spinYoffset )
460  textCtrl = yoff;
461  else if( spinCtrl == m_spinZoffset )
462  textCtrl = zoff;
463 
464  double step = OFFSET_INCREMENT_MM;
465 
466  if( g_UserUnit == INCHES )
467  step = OFFSET_INCREMENT_MIL/1000.0;
468 
469  incrementTextCtrl( textCtrl, -step, -MAX_OFFSET, MAX_OFFSET );
470 }
wxSpinButton * m_spinZoffset
wxSpinButton * m_spinYoffset
#define OFFSET_INCREMENT_MM
static void incrementTextCtrl(wxTextCtrl *aTextCtrl, double aInc, double aMinval, double aMaxval)
Definition: common.h:145
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
#define OFFSET_INCREMENT_MIL
#define MAX_OFFSET
void PANEL_PREV_3D::onDecrementRot ( wxSpinEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 388 of file panel_prev_model.cpp.

References incrementTextCtrl(), PANEL_PREV_3D_BASE::m_spinYrot, PANEL_PREV_3D_BASE::m_spinZrot, MAX_ROTATION, ROTATION_INCREMENT, PANEL_PREV_3D_BASE::xrot, PANEL_PREV_3D_BASE::yrot, and PANEL_PREV_3D_BASE::zrot.

389 {
390  wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
391 
392  wxTextCtrl * textCtrl = xrot;
393 
394  if( spinCtrl == m_spinYrot )
395  textCtrl = yrot;
396  else if( spinCtrl == m_spinZrot )
397  textCtrl = zrot;
398 
400 }
static void incrementTextCtrl(wxTextCtrl *aTextCtrl, double aInc, double aMinval, double aMaxval)
#define ROTATION_INCREMENT
wxSpinButton * m_spinZrot
wxSpinButton * m_spinYrot
#define MAX_ROTATION
void PANEL_PREV_3D::onDecrementScale ( wxSpinEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 418 of file panel_prev_model.cpp.

References incrementTextCtrl(), PANEL_PREV_3D_BASE::m_spinYscale, PANEL_PREV_3D_BASE::m_spinZscale, MAX_SCALE, SCALE_INCREMENT, PANEL_PREV_3D_BASE::xscale, PANEL_PREV_3D_BASE::yscale, and PANEL_PREV_3D_BASE::zscale.

419 {
420  wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
421 
422  wxTextCtrl * textCtrl = xscale;
423 
424  if( spinCtrl == m_spinYscale )
425  textCtrl = yscale;
426  else if( spinCtrl == m_spinZscale )
427  textCtrl = zscale;
428 
430 }
static void incrementTextCtrl(wxTextCtrl *aTextCtrl, double aInc, double aMinval, double aMaxval)
#define SCALE_INCREMENT
wxSpinButton * m_spinZscale
wxSpinButton * m_spinYscale
void PANEL_PREV_3D::onEnterPreviewCanvas ( wxMouseEvent &  event)
inlineprivate

Definition at line 142 of file panel_prev_model.h.

Referenced by PANEL_PREV_3D(), and ~PANEL_PREV_3D().

143  {
144  m_previewPane->SetFocus();
145  }
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
void PANEL_PREV_3D::onIncrementOffset ( wxSpinEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 433 of file panel_prev_model.cpp.

References g_UserUnit, INCHES, incrementTextCtrl(), PANEL_PREV_3D_BASE::m_spinYoffset, PANEL_PREV_3D_BASE::m_spinZoffset, MAX_OFFSET, OFFSET_INCREMENT_MIL, OFFSET_INCREMENT_MM, PANEL_PREV_3D_BASE::xoff, PANEL_PREV_3D_BASE::yoff, and PANEL_PREV_3D_BASE::zoff.

434 {
435  wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
436 
437  wxTextCtrl * textCtrl = xoff;
438 
439  if( spinCtrl == m_spinYoffset )
440  textCtrl = yoff;
441  else if( spinCtrl == m_spinZoffset )
442  textCtrl = zoff;
443 
444  double step = OFFSET_INCREMENT_MM;
445 
446  if( g_UserUnit == INCHES )
447  step = OFFSET_INCREMENT_MIL/1000.0;
448 
449  incrementTextCtrl( textCtrl, step, -MAX_OFFSET, MAX_OFFSET );
450 }
wxSpinButton * m_spinZoffset
wxSpinButton * m_spinYoffset
#define OFFSET_INCREMENT_MM
static void incrementTextCtrl(wxTextCtrl *aTextCtrl, double aInc, double aMinval, double aMaxval)
Definition: common.h:145
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
#define OFFSET_INCREMENT_MIL
#define MAX_OFFSET
void PANEL_PREV_3D::onIncrementRot ( wxSpinEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 373 of file panel_prev_model.cpp.

References incrementTextCtrl(), PANEL_PREV_3D_BASE::m_spinYrot, PANEL_PREV_3D_BASE::m_spinZrot, MAX_ROTATION, ROTATION_INCREMENT, PANEL_PREV_3D_BASE::xrot, PANEL_PREV_3D_BASE::yrot, and PANEL_PREV_3D_BASE::zrot.

374 {
375  wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
376 
377  wxTextCtrl * textCtrl = xrot;
378 
379  if( spinCtrl == m_spinYrot )
380  textCtrl = yrot;
381  else if( spinCtrl == m_spinZrot )
382  textCtrl = zrot;
383 
385 }
static void incrementTextCtrl(wxTextCtrl *aTextCtrl, double aInc, double aMinval, double aMaxval)
#define ROTATION_INCREMENT
wxSpinButton * m_spinZrot
wxSpinButton * m_spinYrot
#define MAX_ROTATION
void PANEL_PREV_3D::onIncrementScale ( wxSpinEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 403 of file panel_prev_model.cpp.

References incrementTextCtrl(), PANEL_PREV_3D_BASE::m_spinYscale, PANEL_PREV_3D_BASE::m_spinZscale, MAX_SCALE, SCALE_INCREMENT, PANEL_PREV_3D_BASE::xscale, PANEL_PREV_3D_BASE::yscale, and PANEL_PREV_3D_BASE::zscale.

404 {
405  wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
406 
407  wxTextCtrl * textCtrl = xscale;
408 
409  if( spinCtrl == m_spinYscale )
410  textCtrl = yscale;
411  else if( spinCtrl == m_spinZscale )
412  textCtrl = zscale;
413 
415 }
static void incrementTextCtrl(wxTextCtrl *aTextCtrl, double aInc, double aMinval, double aMaxval)
#define SCALE_INCREMENT
wxSpinButton * m_spinZscale
wxSpinButton * m_spinYscale
void PANEL_PREV_3D::onMouseWheelOffset ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 506 of file panel_prev_model.cpp.

References g_UserUnit, INCHES, incrementTextCtrl(), MAX_OFFSET, OFFSET_INCREMENT_MIL, OFFSET_INCREMENT_MIL_FINE, OFFSET_INCREMENT_MM, and OFFSET_INCREMENT_MM_FINE.

507 {
508  wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
509 
510  double step = OFFSET_INCREMENT_MM;
511  if( event.ShiftDown( ) )
513 
514  if( g_UserUnit == INCHES )
515  {
516  step = OFFSET_INCREMENT_MIL/1000.0;
517  if( event.ShiftDown( ) )
518  step = OFFSET_INCREMENT_MIL_FINE/1000.0;
519  }
520 
521  if( event.GetWheelRotation() >= 0 )
522  step = -step;
523 
524  incrementTextCtrl( textCtrl, step, -MAX_OFFSET, MAX_OFFSET );
525 }
#define OFFSET_INCREMENT_MM_FINE
#define OFFSET_INCREMENT_MM
static void incrementTextCtrl(wxTextCtrl *aTextCtrl, double aInc, double aMinval, double aMaxval)
Definition: common.h:145
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
#define OFFSET_INCREMENT_MIL_FINE
#define OFFSET_INCREMENT_MIL
#define MAX_OFFSET
void PANEL_PREV_3D::onMouseWheelRot ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 489 of file panel_prev_model.cpp.

References incrementTextCtrl(), MAX_ROTATION, ROTATION_INCREMENT_WHEEL, and ROTATION_INCREMENT_WHEEL_FINE.

490 {
491  wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
492 
493  wxKeyboardState kbdState;
494 
495  double step = ROTATION_INCREMENT_WHEEL;
496 
497  if( event.ShiftDown( ) )
499 
500  if( event.GetWheelRotation() >= 0 )
501  step = -step;
502 
503  incrementTextCtrl( textCtrl, step, -MAX_ROTATION, MAX_ROTATION );
504 }
static void incrementTextCtrl(wxTextCtrl *aTextCtrl, double aInc, double aMinval, double aMaxval)
#define ROTATION_INCREMENT_WHEEL_FINE
#define ROTATION_INCREMENT_WHEEL
#define MAX_ROTATION
void PANEL_PREV_3D::onMouseWheelScale ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 473 of file panel_prev_model.cpp.

References incrementTextCtrl(), MAX_SCALE, SCALE_INCREMENT, and SCALE_INCREMENT_FINE.

474 {
475  wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
476 
477  double step = SCALE_INCREMENT;
478 
479  if( event.ShiftDown( ) )
480  step = SCALE_INCREMENT_FINE;
481 
482  if( event.GetWheelRotation() >= 0 )
483  step = -step;
484 
485  incrementTextCtrl( textCtrl, step, 1/MAX_SCALE, MAX_SCALE );
486 }
#define SCALE_INCREMENT_FINE
static void incrementTextCtrl(wxTextCtrl *aTextCtrl, double aInc, double aMinval, double aMaxval)
#define SCALE_INCREMENT
void PANEL_PREV_3D::ResetModelData ( bool  aReloadPreviewModule = false)

ResetModelData - Clear the values and reload the preview board.

Parameters
aReloadPreviewModuleif need to update the preview module

Definition at line 248 of file panel_prev_model.cpp.

References m_currentSelectedIdx, m_previewPane, EDA_3D_CANVAS::ReloadRequest(), EDA_3D_CANVAS::Request_refresh(), updateListOnModelCopy(), PANEL_PREV_3D_BASE::xoff, PANEL_PREV_3D_BASE::xrot, PANEL_PREV_3D_BASE::xscale, PANEL_PREV_3D_BASE::yoff, PANEL_PREV_3D_BASE::yrot, PANEL_PREV_3D_BASE::yscale, PANEL_PREV_3D_BASE::zoff, PANEL_PREV_3D_BASE::zrot, and PANEL_PREV_3D_BASE::zscale.

Referenced by DIALOG_MODULE_MODULE_EDITOR::initModeditProperties(), DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties(), DIALOG_MODULE_MODULE_EDITOR::On3DShapeNameSelected(), DIALOG_MODULE_BOARD_EDITOR::On3DShapeNameSelected(), DIALOG_MODULE_MODULE_EDITOR::Remove3DShape(), and DIALOG_MODULE_BOARD_EDITOR::Remove3DShape().

249 {
251 
252  xscale->SetValue( wxString::FromDouble( 1.0 ) );
253  yscale->SetValue( wxString::FromDouble( 1.0 ) );
254  zscale->SetValue( wxString::FromDouble( 1.0 ) );
255 
256  xrot->SetValue( wxString::FromDouble( 0.0 ) );
257  yrot->SetValue( wxString::FromDouble( 0.0 ) );
258  zrot->SetValue( wxString::FromDouble( 0.0 ) );
259 
260  xoff->SetValue( wxString::FromDouble( 0.0 ) );
261  yoff->SetValue( wxString::FromDouble( 0.0 ) );
262  zoff->SetValue( wxString::FromDouble( 0.0 ) );
263 
264  // This will update the model on the preview board with the current list of 3d shapes
265  if( aReloadPreviewModule )
266  {
268 
269  if( m_previewPane )
270  {
273  }
274  }
275 
276  if( m_previewPane )
277  m_previewPane->SetFocus();
278 }
void Request_refresh(bool aRedrawImmediately=true)
Request_refresh - Schedule a refresh update of the canvas.
void ReloadRequest(BOARD *aBoard=NULL, S3D_CACHE *aCachePointer=NULL)
int m_currentSelectedIdx
The current selected index of the S3D_INFO list.
void updateListOnModelCopy()
updateListOnModelCopy - copy the current shape list to the copy of module that is on the preview dumm...
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
void PANEL_PREV_3D::SetModelDataIdx ( int  idx,
bool  aReloadPreviewModule = false 
)

SetModelDataIdx - This will set the index of the INFO list that was set on the parent.

So we will update our values to edit based on the index on that list.

Parameters
idx- The index that was selected
aReloadPreviewModuleif need to update the preview module

Definition at line 183 of file panel_prev_model.cpp.

References DEGREES, Format(), g_UserUnit, INCHES, m_currentSelectedIdx, S3D_INFO::m_Filename, S3D_INFO::m_Offset, m_parentInfoList, m_previewPane, S3D_INFO::m_Rotation, S3D_INFO::m_Scale, MILLIMETRES, EDA_3D_CANVAS::ReloadRequest(), EDA_3D_CANVAS::Request_refresh(), UNSCALED_UNITS, updateListOnModelCopy(), UpdateModelName(), SGPOINT::x, PANEL_PREV_3D_BASE::xoff, PANEL_PREV_3D_BASE::xrot, PANEL_PREV_3D_BASE::xscale, SGPOINT::y, PANEL_PREV_3D_BASE::yoff, PANEL_PREV_3D_BASE::yrot, PANEL_PREV_3D_BASE::yscale, SGPOINT::z, PANEL_PREV_3D_BASE::zoff, PANEL_PREV_3D_BASE::zrot, and PANEL_PREV_3D_BASE::zscale.

Referenced by DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DShapeFile(), DIALOG_MODULE_BOARD_EDITOR::BrowseAndAdd3DShapeFile(), DIALOG_MODULE_MODULE_EDITOR::Cfg3DPath(), DIALOG_MODULE_BOARD_EDITOR::Cfg3DPath(), DIALOG_MODULE_MODULE_EDITOR::initModeditProperties(), DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties(), DIALOG_MODULE_MODULE_EDITOR::On3DShapeNameSelected(), DIALOG_MODULE_BOARD_EDITOR::On3DShapeNameSelected(), DIALOG_MODULE_MODULE_EDITOR::Remove3DShape(), and DIALOG_MODULE_BOARD_EDITOR::Remove3DShape().

184 {
185  wxASSERT( m_parentInfoList != NULL );
186 
187  if( m_parentInfoList && (idx >= 0) )
188  {
189  wxASSERT( (unsigned int)idx < (*m_parentInfoList).size() );
190 
191  if( (unsigned int)idx < (*m_parentInfoList).size() )
192  {
193  m_currentSelectedIdx = -1; // In case that we receive events on the
194  // next updates, it will set first an
195  // invalid selection
196 
197  const S3D_INFO *aModel = (const S3D_INFO *)&((*m_parentInfoList)[idx]);
198 
199  xscale->SetValue( wxString::Format( "%.4f", aModel->m_Scale.x ) );
200  yscale->SetValue( wxString::Format( "%.4f", aModel->m_Scale.y ) );
201  zscale->SetValue( wxString::Format( "%.4f", aModel->m_Scale.z ) );
202 
203  xrot->SetValue( wxString::Format( "%.2f", aModel->m_Rotation.x ) );
204  yrot->SetValue( wxString::Format( "%.2f", aModel->m_Rotation.y ) );
205  zrot->SetValue( wxString::Format( "%.2f", aModel->m_Rotation.z ) );
206 
207  switch( g_UserUnit )
208  {
209  case MILLIMETRES:
210  xoff->SetValue( wxString::Format( "%.4f", aModel->m_Offset.x * 25.4 ) );
211  yoff->SetValue( wxString::Format( "%.4f", aModel->m_Offset.y * 25.4 ) );
212  zoff->SetValue( wxString::Format( "%.4f", aModel->m_Offset.z * 25.4 ) );
213  break;
214 
215  case INCHES:
216  xoff->SetValue( wxString::Format( "%.4f", aModel->m_Offset.x ) );
217  yoff->SetValue( wxString::Format( "%.4f", aModel->m_Offset.y ) );
218  zoff->SetValue( wxString::Format( "%.4f", aModel->m_Offset.z ) );
219  break;
220 
221  case DEGREES:
222  case UNSCALED_UNITS:
223  default:
224  wxASSERT(0);
225  }
226 
227  UpdateModelName( aModel->m_Filename );
228 
229  if( aReloadPreviewModule && m_previewPane )
230  {
232 
235  }
236 
237  m_currentSelectedIdx = idx;
238  }
239  }
240 
241  if( m_previewPane )
242  m_previewPane->SetFocus();
243 
244  return;
245 }
double x
Definition: sg_base.h:70
double y
Definition: sg_base.h:71
SGPOINT m_Offset
an offset (unit = inch) for the 3D shape
Definition: 3d_info.h:44
void Request_refresh(bool aRedrawImmediately=true)
Request_refresh - Schedule a refresh update of the canvas.
void ReloadRequest(BOARD *aBoard=NULL, S3D_CACHE *aCachePointer=NULL)
int m_currentSelectedIdx
The current selected index of the S3D_INFO list.
void updateListOnModelCopy()
updateListOnModelCopy - copy the current shape list to the copy of module that is on the preview dumm...
Definition: common.h:145
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:56
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
SGPOINT m_Rotation
an X,Y,Z rotation (unit = degrees) for the 3D shape
Definition: 3d_info.h:43
double z
Definition: sg_base.h:72
SGPOINT m_Scale
scaling factors for the 3D footprint shape
Definition: 3d_info.h:42
std::vector< S3D_INFO > * m_parentInfoList
A pointer to the parent S3D_INFO list that we will use to copy to the preview module.
void UpdateModelName(wxString const &aModel)
wxString m_Filename
The 3D shape filename in 3D library.
Definition: 3d_info.h:45
void PANEL_PREV_3D::updateListOnModelCopy ( )
private

updateListOnModelCopy - copy the current shape list to the copy of module that is on the preview dummy board

Definition at line 637 of file panel_prev_model.cpp.

References m_copyModule, m_parentInfoList, and MODULE::Models().

Referenced by ResetModelData(), SetModelDataIdx(), UpdateModelName(), and updateOrientation().

638 {
639  std::list<S3D_INFO>* draw3D = &m_copyModule->Models();
640  draw3D->clear();
641  draw3D->insert( draw3D->end(), m_parentInfoList->begin(), m_parentInfoList->end() );
642 }
MODULE * m_copyModule
A pointer to a new copy of the original module.
std::list< S3D_INFO > & Models()
Definition: class_module.h:139
std::vector< S3D_INFO > * m_parentInfoList
A pointer to the parent S3D_INFO list that we will use to copy to the preview module.
void PANEL_PREV_3D::UpdateModelName ( wxString const &  aModel)

Definition at line 281 of file panel_prev_model.cpp.

References currentModelFile, S3D_INFO::m_Filename, m_modelInfo, m_previewPane, m_resolver, EDA_3D_CANVAS::ReloadRequest(), S3D_FILENAME_RESOLVER::ResolvePath(), and updateListOnModelCopy().

Referenced by DIALOG_MODULE_MODULE_EDITOR::Edit3DShapeFileName(), DIALOG_MODULE_BOARD_EDITOR::Edit3DShapeFileName(), and SetModelDataIdx().

282 {
283  bool newModel = false;
284 
285  m_modelInfo.m_Filename = aModelName;
286 
287  // if the model name is a directory simply clear the current model
288  if( aModelName.empty() || wxFileName::DirExists( aModelName ) )
289  {
290  currentModelFile.clear();
291  m_modelInfo.m_Filename.clear();
292  }
293  else
294  {
295  wxString newModelFile;
296 
297  if( m_resolver )
298  newModelFile = m_resolver->ResolvePath( aModelName );
299 
300  if( !newModelFile.empty() && newModelFile.Cmp( currentModelFile ) )
301  newModel = true;
302 
303  currentModelFile = newModelFile;
304  }
305 
306  if( currentModelFile.empty() || newModel )
307  {
309 
310  if( m_previewPane )
311  {
313  m_previewPane->Refresh();
314  }
315 
316  if( currentModelFile.empty() )
317  return;
318  }
319  else
320  {
321  if( m_previewPane )
322  m_previewPane->Refresh();
323  }
324 
325  if( m_previewPane )
326  m_previewPane->SetFocus();
327 
328  return;
329 }
void ReloadRequest(BOARD *aBoard=NULL, S3D_CACHE *aCachePointer=NULL)
void updateListOnModelCopy()
updateListOnModelCopy - copy the current shape list to the copy of module that is on the preview dumm...
S3D_FILENAME_RESOLVER * m_resolver
Used to get the full path name.
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
wxString ResolvePath(const wxString &aFileName)
Function ResolvePath determines the full path of the given file name.
S3D_INFO m_modelInfo
Current S3D_INFO that is being edited.
wxString currentModelFile
Used to check if the model file was changed.
wxString m_Filename
The 3D shape filename in 3D library.
Definition: 3d_info.h:45
void PANEL_PREV_3D::updateOrientation ( wxCommandEvent &  event)
overrideprivatevirtual

updateOrientation - it will receive the events from editing the fields

Parameters
event

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 332 of file panel_prev_model.cpp.

References getOrientationVars(), m_currentSelectedIdx, m_modelInfo, S3D_INFO::m_Offset, m_previewPane, S3D_INFO::m_Rotation, S3D_INFO::m_Scale, scale, and updateListOnModelCopy().

333 {
334  wxTextCtrl *textCtrl = (wxTextCtrl *)event.GetEventObject();
335 
336  if( textCtrl == NULL )
337  return;
338 
339  if( textCtrl->GetLineLength(0) == 0 ) // This will skip the got and event with empty field
340  return;
341 
342  if( textCtrl->GetLineLength(0) == 1 )
343  if( (textCtrl->GetLineText(0).compare( "." ) == 0) ||
344  (textCtrl->GetLineText(0).compare( "," ) == 0) )
345  return;
346 
347  SGPOINT scale;
348  SGPOINT rotation;
349  SGPOINT offset;
350 
351  getOrientationVars( scale, rotation, offset );
352 
354  m_modelInfo.m_Offset = offset;
355  m_modelInfo.m_Rotation = rotation;
356 
357  if( m_currentSelectedIdx >= 0 )
358  {
359  // This will update the parent list with the new data
360  (*m_parentInfoList)[m_currentSelectedIdx] = m_modelInfo;
361 
362  // It will update the copy model in the preview board
364 
365  // Since the OpenGL render does not need to be reloaded to update the
366  // shapes position, we just request to redraw again the canvas
367  if( m_previewPane )
368  m_previewPane->Refresh();
369  }
370 }
void getOrientationVars(SGPOINT &aScale, SGPOINT &aRotation, SGPOINT &aOffset)
getOrientationVars - gets the transformation from entries and validate it
SGPOINT m_Offset
an offset (unit = inch) for the 3D shape
Definition: 3d_info.h:44
int m_currentSelectedIdx
The current selected index of the S3D_INFO list.
void updateListOnModelCopy()
updateListOnModelCopy - copy the current shape list to the copy of module that is on the preview dumm...
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
const int scale
SGPOINT m_Rotation
an X,Y,Z rotation (unit = degrees) for the 3D shape
Definition: 3d_info.h:43
SGPOINT m_Scale
scaling factors for the 3D footprint shape
Definition: 3d_info.h:42
S3D_INFO m_modelInfo
Current S3D_INFO that is being edited.
bool PANEL_PREV_3D::Validate ( )
inlineoverride

Definition at line 213 of file panel_prev_model.h.

References ValidateWithMessage().

214  {
215  wxString temp;
216  return ValidateWithMessage(temp);
217  }
bool ValidateWithMessage(wxString &aErrorMessage)
verify X,Y and Z scale factors are acceptable (> 0.001 and < 1000.0)
bool PANEL_PREV_3D::ValidateWithMessage ( wxString &  aErrorMessage)

verify X,Y and Z scale factors are acceptable (> 0.001 and < 1000.0)

Returns
false if one (or more) value is not acceptable.
Parameters
aErrorMessageis a wxString to store error messages, if any

Definition at line 575 of file panel_prev_model.cpp.

References Format(), S3D_INFO::m_Filename, m_parentInfoList, S3D_INFO::m_Scale, MAX_SCALE, scale, SGPOINT::x, SGPOINT::y, and SGPOINT::z.

Referenced by DIALOG_MODULE_MODULE_EDITOR::TransferDataFromWindow(), DIALOG_MODULE_BOARD_EDITOR::TransferDataFromWindow(), and Validate().

576 {
577  bool invalidScale = false;
578 
579  for( unsigned int idx = 0; idx < m_parentInfoList->size(); ++idx )
580  {
581  wxString msg;
582  bool addError = false;
583  S3D_INFO& s3dshape = (*m_parentInfoList)[idx];
584 
585  SGPOINT scale = s3dshape.m_Scale;
586 
587  if( 1/MAX_SCALE > scale.x || MAX_SCALE < scale.x )
588  {
589  invalidScale = true;
590  addError = true;
591  msg += _( "Invalid X scale" );
592  }
593 
594  if( 1/MAX_SCALE > scale.y || MAX_SCALE < scale.y )
595  {
596  invalidScale = true;
597  addError = true;
598 
599  if( !msg.IsEmpty() )
600  msg += "\n";
601 
602  msg += _( "Invalid Y scale" );
603  }
604 
605  if( 1/MAX_SCALE > scale.z || MAX_SCALE < scale.z )
606  {
607  invalidScale = true;
608  addError = true;
609 
610  if( !msg.IsEmpty() )
611  msg += "\n";
612 
613  msg += _( "Invalid Z scale" );
614  }
615 
616  if( addError )
617  {
618  msg.Prepend( s3dshape.m_Filename + "\n" );
619 
620  if( !aErrorMessage.IsEmpty() )
621  aErrorMessage += "\n\n";
622 
623  aErrorMessage += msg;
624  }
625  }
626 
627  if( !aErrorMessage.IsEmpty() )
628  {
629  aErrorMessage += "\n\n";
630  aErrorMessage += wxString::Format( "Min value = %.4f and max value = %.4f",
631  1/MAX_SCALE, MAX_SCALE );
632  }
633 
634  return invalidScale == false;
635 }
double x
Definition: sg_base.h:70
double y
Definition: sg_base.h:71
const int scale
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
double z
Definition: sg_base.h:72
SGPOINT m_Scale
scaling factors for the 3D footprint shape
Definition: 3d_info.h:42
std::vector< S3D_INFO > * m_parentInfoList
A pointer to the parent S3D_INFO list that we will use to copy to the preview module.
wxString m_Filename
The 3D shape filename in 3D library.
Definition: 3d_info.h:45
void PANEL_PREV_3D::View3DBack ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 179 of file panel_prev_model.h.

References EDA_3D_CANVAS::SetView3D().

180  {
181  m_previewPane->SetView3D( 'y' );
182  }
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
void SetView3D(int keycode)
SetView3D - Helper function to call view commands.
void PANEL_PREV_3D::View3DBottom ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 184 of file panel_prev_model.h.

References EDA_3D_CANVAS::SetView3D().

185  {
186  m_previewPane->SetView3D( 'Z' );
187  }
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
void SetView3D(int keycode)
SetView3D - Helper function to call view commands.
void PANEL_PREV_3D::View3DFront ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 158 of file panel_prev_model.h.

References EDA_3D_CANVAS::SetView3D().

159  {
160  m_previewPane->SetView3D( 'Y' );
161  }
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
void SetView3D(int keycode)
SetView3D - Helper function to call view commands.
void PANEL_PREV_3D::View3DISO ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 147 of file panel_prev_model.h.

References CINFO3D_VISU::CameraGet(), and CCAMERA::ToggleProjection().

148  {
150  m_previewPane->Refresh();
151  }
CINFO3D_VISU * m_settings3Dviewer
The settings that will be used for this 3D viewer canvas.
void ToggleProjection()
Definition: ccamera.cpp:417
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
CCAMERA & CameraGet() const
CameraGet - get current camera in use.
Definition: cinfo3d_visu.h:210
void PANEL_PREV_3D::View3DLeft ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 153 of file panel_prev_model.h.

References EDA_3D_CANVAS::SetView3D().

154  {
155  m_previewPane->SetView3D( 'X' );
156  }
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
void SetView3D(int keycode)
SetView3D - Helper function to call view commands.
void PANEL_PREV_3D::View3DRight ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 174 of file panel_prev_model.h.

References EDA_3D_CANVAS::SetView3D().

175  {
176  m_previewPane->SetView3D( 'x' );
177  }
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
void SetView3D(int keycode)
SetView3D - Helper function to call view commands.
void PANEL_PREV_3D::View3DTop ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 163 of file panel_prev_model.h.

References EDA_3D_CANVAS::SetView3D().

164  {
165  m_previewPane->SetView3D( 'z' );
166  }
EDA_3D_CANVAS * m_previewPane
The 3D canvas.
void SetView3D(int keycode)
SetView3D - Helper function to call view commands.
void PANEL_PREV_3D::View3DUpdate ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 168 of file panel_prev_model.h.

References EDA_3D_CANVAS::ReloadRequest().

169  {
171  m_previewPane->Refresh();
172  }
void ReloadRequest(BOARD *aBoard=NULL, S3D_CACHE *aCachePointer=NULL)
EDA_3D_CANVAS * m_previewPane
The 3D canvas.

Member Data Documentation

wxString PANEL_PREV_3D::currentModelFile
private

Used to check if the model file was changed.

Definition at line 82 of file panel_prev_model.h.

Referenced by initPanel(), and UpdateModelName().

wxBitmapButton* PANEL_PREV_3D_BASE::m_bpUpdate
protectedinherited
wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvBack
protectedinherited
wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvBottom
protectedinherited
wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvFront
protectedinherited
wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvISO
protectedinherited
wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvLeft
protectedinherited
wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvRight
protectedinherited
wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvTop
protectedinherited
MODULE* PANEL_PREV_3D::m_copyModule
private

A pointer to a new copy of the original module.

Definition at line 95 of file panel_prev_model.h.

Referenced by PANEL_PREV_3D(), and updateListOnModelCopy().

int PANEL_PREV_3D::m_currentSelectedIdx
private

The current selected index of the S3D_INFO list.

Definition at line 101 of file panel_prev_model.h.

Referenced by initPanel(), ResetModelData(), SetModelDataIdx(), and updateOrientation().

BOARD* PANEL_PREV_3D::m_dummyBoard
private

A dummy board used to store the copy moduled.

Definition at line 89 of file panel_prev_model.h.

Referenced by initPanel(), PANEL_PREV_3D(), and ~PANEL_PREV_3D().

wxFlexGridSizer* PANEL_PREV_3D_BASE::m_fgSizerButtons
protectedinherited

Definition at line 70 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

S3D_INFO PANEL_PREV_3D::m_modelInfo
private

Current S3D_INFO that is being edited.

Definition at line 104 of file panel_prev_model.h.

Referenced by UpdateModelName(), and updateOrientation().

std::vector<S3D_INFO>* PANEL_PREV_3D::m_parentInfoList
private

A pointer to the parent S3D_INFO list that we will use to copy to the preview module.

Definition at line 98 of file panel_prev_model.h.

Referenced by PANEL_PREV_3D(), SetModelDataIdx(), updateListOnModelCopy(), and ValidateWithMessage().

EDA_3D_CANVAS* PANEL_PREV_3D::m_previewPane
private
S3D_FILENAME_RESOLVER* PANEL_PREV_3D::m_resolver
private

Used to get the full path name.

Definition at line 83 of file panel_prev_model.h.

Referenced by initPanel(), PANEL_PREV_3D(), and UpdateModelName().

CINFO3D_VISU* PANEL_PREV_3D::m_settings3Dviewer
private

The settings that will be used for this 3D viewer canvas.

Definition at line 92 of file panel_prev_model.h.

Referenced by PANEL_PREV_3D(), and ~PANEL_PREV_3D().

wxBoxSizer* PANEL_PREV_3D_BASE::m_SizerPanelView
protectedinherited

Definition at line 69 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D(), and PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

wxSpinButton* PANEL_PREV_3D_BASE::m_spinXoffset
protectedinherited
wxSpinButton* PANEL_PREV_3D_BASE::m_spinXrot
protectedinherited
wxSpinButton* PANEL_PREV_3D_BASE::m_spinXscale
protectedinherited
wxSpinButton* PANEL_PREV_3D_BASE::m_spinYoffset
protectedinherited
wxSpinButton* PANEL_PREV_3D_BASE::m_spinYrot
protectedinherited
wxSpinButton* PANEL_PREV_3D_BASE::m_spinYscale
protectedinherited
wxSpinButton* PANEL_PREV_3D_BASE::m_spinZoffset
protectedinherited
wxSpinButton* PANEL_PREV_3D_BASE::m_spinZrot
protectedinherited
wxSpinButton* PANEL_PREV_3D_BASE::m_spinZscale
protectedinherited
wxStaticText* PANEL_PREV_3D_BASE::m_staticText1
protectedinherited

Definition at line 42 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

wxStaticText* PANEL_PREV_3D_BASE::m_staticText11
protectedinherited

Definition at line 51 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

wxStaticText* PANEL_PREV_3D_BASE::m_staticText12
protectedinherited

Definition at line 60 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

wxStaticText* PANEL_PREV_3D_BASE::m_staticText2
protectedinherited

Definition at line 45 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

wxStaticText* PANEL_PREV_3D_BASE::m_staticText21
protectedinherited

Definition at line 54 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

wxStaticText* PANEL_PREV_3D_BASE::m_staticText22
protectedinherited

Definition at line 63 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

wxStaticText* PANEL_PREV_3D_BASE::m_staticText3
protectedinherited

Definition at line 48 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

wxStaticText* PANEL_PREV_3D_BASE::m_staticText31
protectedinherited

Definition at line 57 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

wxStaticText* PANEL_PREV_3D_BASE::m_staticText32
protectedinherited

Definition at line 66 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().


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