- if( theFormatName != "IGES_UNIT" ) {
- GEOM::TPythonDump(aFunction) << result << " = geompy.ImportFile(\""
- << theFileName.ToCString() << "\", \"" << theFormatName.ToCString() << "\")";
+ if (theFormatName != "IGES_UNIT") {
+ GEOM::TPythonDump pd (aFunction);
+ if (theFormatName == "BREP")
+ pd << result << " = geompy.ImportBREP(\"" << theFileName.ToCString() << "\")";
+ else if (theFormatName == "IGES")
+ pd << result << " = geompy.ImportIGES(\"" << theFileName.ToCString() << "\")";
+ else if (theFormatName == "IGES_SCALE")
+ pd << result << " = geompy.ImportIGES(\"" << theFileName.ToCString() << "\", True)";
+ else if (theFormatName == "STEP")
+ pd << result << " = geompy.ImportSTEP(\"" << theFileName.ToCString() << "\")";
+ else if (theFormatName == "STEP_SCALE")
+ pd << result << " = geompy.ImportSTEP(\"" << theFileName.ToCString() << "\", True)";
+ else {
+ pd << result << " = geompy.ImportFile(\""
+ << theFileName.ToCString() << "\", \"" << theFormatName.ToCString() << "\")";
+ }