Remove PCB_INTERNAL_UNIT define because it is no more used in code.
3D viewer: fix incorrect scaling factor when using nanometers. Very minor other fixes
This commit is contained in:
parent
ff66db7b6f
commit
9f41cac041
|
@ -35,9 +35,9 @@
|
|||
|
||||
|
||||
/* 3D modeling units -> PCB units conversion scale:
|
||||
* 1 "3D model unit" wings3d = 1 unit = 2.54 mm = 0.1 inch
|
||||
* 1 "3D model unit" wings3d = 1 unit = 2.54 mm = 0.1 inch = 100 mils
|
||||
*/
|
||||
#define UNITS3D_TO_UNITSPCB 1000
|
||||
#define UNITS3D_TO_UNITSPCB (IU_PER_MILS * 100)
|
||||
|
||||
|
||||
class S3D_MASTER;
|
||||
|
|
|
@ -41,11 +41,6 @@
|
|||
#include <class_pcb_screen.h>
|
||||
|
||||
|
||||
#ifndef PCB_INTERNAL_UNIT
|
||||
#define PCB_INTERNAL_UNIT 10000
|
||||
#endif
|
||||
|
||||
|
||||
/* Forward declarations of classes. */
|
||||
class FOOTPRINT_EDIT_FRAME;
|
||||
class FOOTPRINT_VIEWER_FRAME;
|
||||
|
|
|
@ -36,10 +36,6 @@
|
|||
#include <class_undoredo_container.h>
|
||||
#include <zones.h>
|
||||
|
||||
#ifndef PCB_INTERNAL_UNIT
|
||||
#define PCB_INTERNAL_UNIT 10000
|
||||
#endif
|
||||
|
||||
|
||||
/* Forward declarations of classes. */
|
||||
class PCB_SCREEN;
|
||||
|
|
|
@ -54,10 +54,6 @@
|
|||
#define SAFE_DELETE( p ) delete (p); (p) = NULL;
|
||||
#endif
|
||||
|
||||
#ifndef EESCHEMA_INTERNAL_UNIT
|
||||
#define EESCHEMA_INTERNAL_UNIT 1000
|
||||
#endif
|
||||
|
||||
// Option for dialog boxes
|
||||
#define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE | wxFRAME_FLOAT_ON_PARENT | MAYBE_RESIZE_BORDER
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ protected:
|
|||
|
||||
STRINGSET m_Members; ///< names of NET members of this class
|
||||
|
||||
/// The units on these parameters is 1/10000 of an inch, see define #PCB_INTERNAL_UNIT
|
||||
/// The units on these parameters is Internal Units (1 decimil or 1 nm)
|
||||
|
||||
int m_Clearance; ///< clearance when routing
|
||||
|
||||
|
|
|
@ -1121,8 +1121,8 @@ static void export_vrml_module( BOARD* aPcb, MODULE* aModule,
|
|||
vrmlm->m_MatScale.y * aScalingFactor,
|
||||
vrmlm->m_MatScale.z * aScalingFactor );
|
||||
|
||||
// adjust 3D shape offset position (offset is given inch)
|
||||
#define UNITS_3D_TO_PCB_UNITS PCB_INTERNAL_UNIT
|
||||
// adjust 3D shape offset position (offset is given in inch)
|
||||
#define UNITS_3D_TO_PCB_UNITS (IU_PER_MILS*1000)
|
||||
int offsetx = KiROUND( vrmlm->m_MatPosition.x * UNITS_3D_TO_PCB_UNITS );
|
||||
int offsety = KiROUND( vrmlm->m_MatPosition.y * UNITS_3D_TO_PCB_UNITS );
|
||||
double offsetz = vrmlm->m_MatPosition.z * UNITS_3D_TO_PCB_UNITS;
|
||||
|
|
|
@ -197,7 +197,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName,
|
|||
plotY += intervalle;
|
||||
|
||||
plot_diam = (int) aToolListBuffer[ii].m_Diameter;
|
||||
x = (int) ( (double) plotX - 20.0 * IU_PER_MILS * CharScale
|
||||
x = (int) ( (double) plotX - 20.0 * IU_PER_MILS * CharScale
|
||||
- (double)plot_diam / 2.0 );
|
||||
y = (int) ( (double) plotY + (double) CharSize * CharScale );
|
||||
plotter->Marker( wxPoint( x, y ), plot_diam, ii );
|
||||
|
@ -268,7 +268,8 @@ void Gen_Drill_PcbMap( BOARD* aPcb, PLOTTER* aPlotter,
|
|||
if( aToolListBuffer.size() > PLOTTER::MARKER_COUNT )
|
||||
{
|
||||
DisplayInfoMessage( NULL,
|
||||
_( " Drill map: Too many diameter values to draw to draw one symbol per drill value\nPlot will use circle shape for some drill values" ),
|
||||
_( " Drill map: Too many diameter values to draw one symbol per drill value\n"
|
||||
"Plot will use circle shape for some drill values" ),
|
||||
10 );
|
||||
}
|
||||
|
||||
|
|
|
@ -93,6 +93,8 @@
|
|||
#define UNKNOWN_PAD_FORMAT _( "unknown pad type: %d")
|
||||
#define UNKNOWN_PAD_ATTRIBUTE _( "unknown pad attribute: %d" )
|
||||
|
||||
// Old internal units definition (UI = decimil)
|
||||
#define PCB_LEGACY_INTERNAL_UNIT 10000
|
||||
|
||||
/// Get the length of a string constant, at compile time
|
||||
#define SZ( x ) (sizeof(x)-1)
|
||||
|
@ -2845,7 +2847,7 @@ void LEGACY_PLUGIN::saveSETUP( const BOARD* aBoard ) const
|
|||
|
||||
/* Internal units are nobody's business, they are internal.
|
||||
Units used in the file are now in the "Units" attribute of $GENERAL.
|
||||
fprintf( m_fp,, "InternalUnit %f INCH\n", 1.0 / PCB_INTERNAL_UNIT );
|
||||
fprintf( m_fp,, "InternalUnit %f INCH\n", 1.0 / PCB_LEGACY_INTERNAL_UNIT );
|
||||
*/
|
||||
|
||||
fprintf( m_fp, "Layers %d\n", aBoard->GetCopperLayerCount() );
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#define PCBNEW_H
|
||||
|
||||
|
||||
#include <fctsys.h> // PCB_INTERNAL_UNIT and EESCHEMA_INTERNAL_UNIT definitions.
|
||||
#include <fctsys.h> // wxWidgets include.
|
||||
#include <base_struct.h> // IS_DRAGGED and IN_EDIT definitions.
|
||||
#include <convert_to_biu.h> // to define DMils2iu() conversion function
|
||||
|
||||
|
|
Loading…
Reference in New Issue