7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 16:03:43 +00:00

Formatting.

This commit is contained in:
Jeff Young 2025-03-06 15:47:18 +00:00
parent 5c91a7fa3a
commit 52648497b2
2 changed files with 32 additions and 34 deletions

View File

@ -75,8 +75,8 @@ CLI::PCB_EXPORT_3D_COMMAND::PCB_EXPORT_3D_COMMAND( const std::string& aNa
{
m_argParser.add_argument( ARG_FORMAT )
.default_value( std::string( "step" ) )
.help( UTF8STDSTR(
_( "Output file format, options: step, brep, xao, glb (binary glTF), ply, stl" ) ) );
.help( UTF8STDSTR( _( "Output file format, options: step, brep, xao, glb "
"(binary glTF), ply, stl" ) ) );
}
m_argParser.add_argument( ARG_FORCE, "-f" )
@ -84,14 +84,14 @@ CLI::PCB_EXPORT_3D_COMMAND::PCB_EXPORT_3D_COMMAND( const std::string& aNa
.flag();
m_argParser.add_argument( ARG_NO_UNSPECIFIED )
.help( UTF8STDSTR(
_( "Exclude 3D models for components with 'Unspecified' footprint type" ) ) )
.help( UTF8STDSTR( _( "Exclude 3D models for components with 'Unspecified' footprint "
"type" ) ) )
.implicit_value( true )
.default_value( false );
m_argParser.add_argument( ARG_NO_DNP )
.help( UTF8STDSTR(
_( "Exclude 3D models for components with 'Do not populate' attribute" ) ) )
.help( UTF8STDSTR( _( "Exclude 3D models for components with 'Do not populate' "
"attribute" ) ) )
.flag();
if( m_format != JOB_EXPORT_PCB_3D::FORMAT::UNKNOWN
@ -167,14 +167,14 @@ CLI::PCB_EXPORT_3D_COMMAND::PCB_EXPORT_3D_COMMAND( const std::string& aNa
m_argParser.add_argument( ARG_MIN_DISTANCE )
.default_value( std::string( "0.01mm" ) )
.help( UTF8STDSTR(
_( "Minimum distance between points to treat them as separate ones" ) ) )
.help( UTF8STDSTR( _( "Minimum distance between points to treat them as separate "
"ones" ) ) )
.metavar( "MIN_DIST" );
m_argParser.add_argument( ARG_NET_FILTER )
.default_value( std::string() )
.help( UTF8STDSTR( _(
"Only include copper items belonging to nets matching this wildcard" ) ) );
.help( UTF8STDSTR( _( "Only include copper items belonging to nets matching this "
"wildcard" ) ) );
}
if( m_format == JOB_EXPORT_PCB_3D::FORMAT::STEP )
@ -194,14 +194,13 @@ CLI::PCB_EXPORT_3D_COMMAND::PCB_EXPORT_3D_COMMAND( const std::string& aNa
{
m_argParser.add_argument( ARG_VRML_UNITS )
.default_value( std::string( "in" ) )
.help( UTF8STDSTR(
_( "Output units; valid options: mm, m, in, tenths" ) ) );
.help( UTF8STDSTR( _( "Output units; valid options: mm, m, in, tenths" ) ) );
m_argParser.add_argument( ARG_VRML_MODELS_DIR )
.default_value( std::string( "" ) )
.help( UTF8STDSTR(
_( "Name of folder to create and store 3d models in, if not specified or "
"empty, the models will be embedded in main exported VRML file" ) ) );
.help( UTF8STDSTR( _( "Name of folder to create and store 3d models in, if not "
"specified or empty, the models will be embedded in main "
"exported VRML file" ) ) );
m_argParser.add_argument( ARG_VRML_MODELS_RELATIVE )
.help( UTF8STDSTR( _( "Used with --models-dir to output relative paths in the "

View File

@ -353,20 +353,13 @@ int PCBNEW_JOBS_HANDLER::JobExportStep( JOB* aJob )
switch( aStepJob->m_format )
{
case JOB_EXPORT_PCB_3D::FORMAT::VRML: fn.SetExt( FILEEXT::VrmlFileExtension );
break;
case JOB_EXPORT_PCB_3D::FORMAT::STEP: fn.SetExt( FILEEXT::StepFileExtension );
break;
case JOB_EXPORT_PCB_3D::FORMAT::BREP: fn.SetExt( FILEEXT::BrepFileExtension );
break;
case JOB_EXPORT_PCB_3D::FORMAT::XAO: fn.SetExt( FILEEXT::XaoFileExtension );
break;
case JOB_EXPORT_PCB_3D::FORMAT::GLB: fn.SetExt( FILEEXT::GltfBinaryFileExtension );
break;
case JOB_EXPORT_PCB_3D::FORMAT::PLY: fn.SetExt( FILEEXT::PlyFileExtension );
break;
case JOB_EXPORT_PCB_3D::FORMAT::STL: fn.SetExt( FILEEXT::StlFileExtension );
break;
case JOB_EXPORT_PCB_3D::FORMAT::VRML: fn.SetExt( FILEEXT::VrmlFileExtension ); break;
case JOB_EXPORT_PCB_3D::FORMAT::STEP: fn.SetExt( FILEEXT::StepFileExtension ); break;
case JOB_EXPORT_PCB_3D::FORMAT::BREP: fn.SetExt( FILEEXT::BrepFileExtension ); break;
case JOB_EXPORT_PCB_3D::FORMAT::XAO: fn.SetExt( FILEEXT::XaoFileExtension ); break;
case JOB_EXPORT_PCB_3D::FORMAT::GLB: fn.SetExt( FILEEXT::GltfBinaryFileExtension ); break;
case JOB_EXPORT_PCB_3D::FORMAT::PLY: fn.SetExt( FILEEXT::PlyFileExtension ); break;
case JOB_EXPORT_PCB_3D::FORMAT::STL: fn.SetExt( FILEEXT::StlFileExtension ); break;
default:
m_reporter->Report( _( "Unknown export format" ), RPT_SEVERITY_ERROR );
return CLI::EXIT_CODES::ERR_UNKNOWN; // shouldnt have gotten here
@ -408,11 +401,17 @@ int PCBNEW_JOBS_HANDLER::JobExportStep( JOB* aJob )
originY = pcbIUScale.IUTomm( bbox.GetCenter().y );
}
bool success = vrmlExporter.ExportVRML_File(
brd->GetProject(), &messages, outPath, scale,
aStepJob->m_3dparams.m_IncludeUnspecified, aStepJob->m_3dparams.m_IncludeDNP,
!aStepJob->m_vrmlModelDir.IsEmpty(), aStepJob->m_vrmlRelativePaths,
aStepJob->m_vrmlModelDir, originX, originY );
bool success = vrmlExporter.ExportVRML_File( brd->GetProject(),
&messages,
outPath,
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 )
{