17 lines
541 B
JavaScript
17 lines
541 B
JavaScript
export function IsStepFileName (fileName)
|
|
{
|
|
let lowerCaseName = fileName.toLowerCase ();
|
|
return lowerCaseName.endsWith ('.step') || lowerCaseName.endsWith ('.stp');
|
|
}
|
|
|
|
export function BuildStepOutputFileName (fileName)
|
|
{
|
|
if (fileName.toLowerCase ().endsWith ('.step')) {
|
|
return fileName.substring (0, fileName.length - 5) + '-edited.step';
|
|
}
|
|
if (fileName.toLowerCase ().endsWith ('.stp')) {
|
|
return fileName.substring (0, fileName.length - 4) + '-edited.stp';
|
|
}
|
|
return fileName + '-edited.step';
|
|
}
|