7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 19:59:18 +00:00

Fix build conflict with new jobs system

This commit is contained in:
Marek Roszko 2024-08-17 17:20:14 -04:00
parent b6c1a3ba63
commit eb10d478f2
3 changed files with 17 additions and 17 deletions

View File

@ -124,7 +124,7 @@ public:
JOB_EXPORT_PCB_3D::FORMAT m_format;
/// Despite the name; also used for other formats
EXPORTER_STEP_PARAMS m_params;
EXPORTER_STEP_PARAMS m_3dparams;
VRML_UNITS m_vrmlUnits;
wxString m_vrmlModelDir;

View File

@ -203,7 +203,7 @@ CLI::PCB_EXPORT_3D_COMMAND::PCB_EXPORT_3D_COMMAND( const std::string& aNa
int CLI::PCB_EXPORT_3D_COMMAND::doPerform( KIWAY& aKiway )
{
std::unique_ptr<JOB_EXPORT_PCB_3D> step( new JOB_EXPORT_PCB_3D( true ) );
EXPORTER_STEP_PARAMS& params = step->m_params;
EXPORTER_STEP_PARAMS& params = step->m_3dparams;
if( m_format == JOB_EXPORT_PCB_3D::FORMAT::STEP || m_format == JOB_EXPORT_PCB_3D::FORMAT::BREP
|| m_format == JOB_EXPORT_PCB_3D::FORMAT::XAO
@ -295,13 +295,13 @@ int CLI::PCB_EXPORT_3D_COMMAND::doPerform( KIWAY& aKiway )
std::smatch sm;
std::string str( userOrigin.ToUTF8() );
std::regex_search( str, sm, re_pattern );
step->m_params.m_Origin.x = atof( sm.str( 1 ).c_str() );
step->m_params.m_Origin.y = atof( sm.str( 2 ).c_str() );
step->m_3dparams.m_Origin.x = atof( sm.str( 1 ).c_str() );
step->m_3dparams.m_Origin.y = atof( sm.str( 2 ).c_str() );
// Default unit for m_xOrigin and m_yOrigin is mm.
// Convert in to board units. If the value is given in inches, it will be converted later
step->m_params.m_Origin.x = pcbIUScale.mmToIU( step->m_params.m_Origin.x );
step->m_params.m_Origin.y = pcbIUScale.mmToIU( step->m_params.m_Origin.y );
step->m_3dparams.m_Origin.x = pcbIUScale.mmToIU( step->m_3dparams.m_Origin.x );
step->m_3dparams.m_Origin.y = pcbIUScale.mmToIU( step->m_3dparams.m_Origin.y );
std::string tunit( sm[3] );
@ -317,7 +317,7 @@ int CLI::PCB_EXPORT_3D_COMMAND::doPerform( KIWAY& aKiway )
// only in, inch and mm are valid:
if( !tunit.compare( "in" ) || !tunit.compare( "inch" ) )
{
step->m_params.m_Origin *= 25.4;
step->m_3dparams.m_Origin *= 25.4;
}
else if( tunit.compare( "mm" ) )
{
@ -342,7 +342,7 @@ int CLI::PCB_EXPORT_3D_COMMAND::doPerform( KIWAY& aKiway )
std::smatch sm;
std::string str( minDistance.ToUTF8() );
std::regex_search( str, sm, re_pattern );
step->m_params.m_BoardOutlinesChainingEpsilon = atof( sm.str( 1 ).c_str() );
step->m_3dparams.m_BoardOutlinesChainingEpsilon = atof( sm.str( 1 ).c_str() );
std::string tunit( sm[2] );
@ -350,7 +350,7 @@ int CLI::PCB_EXPORT_3D_COMMAND::doPerform( KIWAY& aKiway )
{
if( !tunit.compare( "in" ) || !tunit.compare( "inch" ) )
{
step->m_params.m_BoardOutlinesChainingEpsilon *= 25.4;
step->m_3dparams.m_BoardOutlinesChainingEpsilon *= 25.4;
}
else if( tunit.compare( "mm" ) )
{

View File

@ -125,7 +125,7 @@ int PCBNEW_JOBS_HANDLER::JobExportStep( JOB* aJob )
brd->GetProject()->ApplyTextVars( aJob->GetVarOverrides() );
brd->SynchronizeProperties();
if( aStepJob->m_params.m_OutputFile.IsEmpty() )
if( aStepJob->m_3dparams.m_OutputFile.IsEmpty() )
{
wxFileName fn = brd->GetFileName();
fn.SetName( fn.GetName() );
@ -146,7 +146,7 @@ int PCBNEW_JOBS_HANDLER::JobExportStep( JOB* aJob )
return CLI::EXIT_CODES::ERR_UNKNOWN; // shouldnt have gotten here
}
aStepJob->m_params.m_OutputFile = fn.GetFullName();
aStepJob->m_3dparams.m_OutputFile = fn.GetFullName();
}
if( aStepJob->m_format == JOB_EXPORT_PCB_3D::FORMAT::VRML )
@ -164,8 +164,8 @@ int PCBNEW_JOBS_HANDLER::JobExportStep( JOB* aJob )
EXPORTER_VRML vrmlExporter( brd );
wxString messages;
double originX = pcbIUScale.IUTomm( aStepJob->m_params.m_Origin.x );
double originY = pcbIUScale.IUTomm( aStepJob->m_params.m_Origin.y );
double originX = pcbIUScale.IUTomm( aStepJob->m_3dparams.m_Origin.x );
double originY = pcbIUScale.IUTomm( aStepJob->m_3dparams.m_Origin.y );
if( !aStepJob->m_hasUserOrigin )
{
@ -175,15 +175,15 @@ int PCBNEW_JOBS_HANDLER::JobExportStep( JOB* aJob )
}
bool success = vrmlExporter.ExportVRML_File(
brd->GetProject(), &messages, aStepJob->m_params.m_OutputFile, scale,
aStepJob->m_params.m_IncludeUnspecified, aStepJob->m_params.m_IncludeDNP,
brd->GetProject(), &messages, aStepJob->m_3dparams.m_OutputFile, scale,
aStepJob->m_3dparams.m_IncludeUnspecified, aStepJob->m_3dparams.m_IncludeDNP,
!aStepJob->m_vrmlModelDir.IsEmpty(), aStepJob->m_vrmlRelativePaths,
aStepJob->m_vrmlModelDir, originX, originY );
if ( success )
{
m_reporter->Report( wxString::Format( _( "Successfully exported VRML to %s" ),
aStepJob->m_params.m_OutputFile ),
aStepJob->m_3dparams.m_OutputFile ),
RPT_SEVERITY_INFO );
}
else
@ -194,7 +194,7 @@ int PCBNEW_JOBS_HANDLER::JobExportStep( JOB* aJob )
}
else
{
EXPORTER_STEP_PARAMS params = aStepJob->m_params;
EXPORTER_STEP_PARAMS params = aStepJob->m_3dparams;
switch( aStepJob->m_format )
{