Step exporter: better values for min distance between 2 points to merge them.
- The default value is 0.01 mm (according to comments and similar to the 3D viewer settings that uses 0.02 mm) - The export dialog has now 3 values 1 micron, 0.01mm (default) and 0.1 mm From Master branch, commitsa9feb1c
and5db7580
This commit is contained in:
parent
267e510071
commit
07568f87c3
|
@ -315,11 +315,25 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
|||
break;
|
||||
}
|
||||
|
||||
if( m_tolerance->GetSelection() != 1 )
|
||||
double tolerance = 0.01; // default value in mm
|
||||
|
||||
switch( m_tolerance->GetSelection() )
|
||||
{
|
||||
case 0: // small
|
||||
tolerance = 0.001;
|
||||
break;
|
||||
|
||||
default:
|
||||
case 1: break; // Normal
|
||||
|
||||
case 2: // large
|
||||
tolerance = 0.1;
|
||||
break;
|
||||
}
|
||||
|
||||
{
|
||||
LOCALE_IO dummy;
|
||||
double tolerance = 0.001 * std::pow<double>( 10.0, m_tolerance->GetSelection() - 1 );
|
||||
cmdK2S.Append( wxString::Format( " --min-distance=\"%.4f mm\"", tolerance ) );
|
||||
cmdK2S.Append( wxString::Format( " --min-distance=\"%.3f mm\"", tolerance ) );
|
||||
}
|
||||
|
||||
cmdK2S.Append( " -f -o " );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jan 17 2019)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -163,11 +163,11 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i
|
|||
m_staticText8->Wrap( -1 );
|
||||
fgSizer4->Add( m_staticText8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
wxString m_toleranceChoices[] = { _("Tight"), _("Standard"), _("Loose"), _("Very loose") };
|
||||
wxString m_toleranceChoices[] = { _("Tight (0.001 mm)"), _("Standard (0.01 mm)"), _("Loose (0.1 mm)") };
|
||||
int m_toleranceNChoices = sizeof( m_toleranceChoices ) / sizeof( wxString );
|
||||
m_tolerance = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_toleranceNChoices, m_toleranceChoices, 0 );
|
||||
m_tolerance->SetSelection( 1 );
|
||||
m_tolerance->SetToolTip( _("Tolerance sets the distance between two points that are considered joined. Standard is 0.001mm.") );
|
||||
m_tolerance->SetToolTip( _("Tolerance sets the distance between two points that are considered joined.") );
|
||||
|
||||
fgSizer4->Add( m_tolerance, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
|
|
|
@ -1353,7 +1353,7 @@
|
|||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Tight" "Standard" "Loose" "Very loose"</property>
|
||||
<property name="choices">"Tight (0.001 mm)" "Standard (0.01 mm)" "Loose (0.1 mm)"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
@ -1389,7 +1389,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Tolerance sets the distance between two points that are considered joined. Standard is 0.001mm.</property>
|
||||
<property name="tooltip">Tolerance sets the distance between two points that are considered joined.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jan 17 2019)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
#ifndef KICADBASE_H
|
||||
#define KICADBASE_H
|
||||
|
||||
///> Minimum distance between points to treat them as separate ones (mm)
|
||||
static constexpr double MIN_DISTANCE = 0.001;
|
||||
///> Default minimum distance between points to treat them as separate ones (mm)
|
||||
static constexpr double MIN_DISTANCE = 0.01;
|
||||
|
||||
namespace SEXPR
|
||||
{
|
||||
|
|
|
@ -131,6 +131,7 @@ public:
|
|||
// aThickness > THICKNESS_MIN == use aThickness
|
||||
void SetPCBThickness( double aThickness );
|
||||
|
||||
// Set the minimum distance (in mm) to consider 2 points have the same coordinates
|
||||
void SetMinDistance( double aDistance );
|
||||
|
||||
// create the PCB model using the current outlines and drill holes
|
||||
|
|
Loading…
Reference in New Issue