Use STEP AP203 for 64-bit due to a bug in OCC
This commit is contained in:
parent
a5d9ee4be9
commit
9316de659d
|
@ -92,6 +92,17 @@ void PartExport initPart()
|
|||
str << OCC_VERSION_MAJOR << "." << OCC_VERSION_MINOR << "." << OCC_VERSION_MAINTENANCE;
|
||||
App::Application::Config()["OCC_VERSION"] = str.str();
|
||||
|
||||
// see Init.py
|
||||
#if defined (_OCC64)
|
||||
#if OCC_VERSION_HEX < 0x060503
|
||||
App::GetApplication().addImportType("STEP AP203 format (*.step *.stp)","Part");
|
||||
App::GetApplication().addExportType("STEP AP203 format (*.step *.stp)","Part");
|
||||
#else
|
||||
App::GetApplication().addImportType("STEP AP214 format (*.step *.stp)","ImportGui");
|
||||
App::GetApplication().addExportType("STEP AP214 format (*.step *.stp)","ImportGui");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
PyObject* partModule = Py_InitModule3("Part", Part_methods, module_part_doc); /* mod name, table ptr */
|
||||
Base::Console().Log("Loading Part module... done\n");
|
||||
|
||||
|
|
|
@ -50,12 +50,13 @@ FreeCAD.addExportType("BREP format (*.brep *.brp)","Part")
|
|||
FreeCAD.addImportType("IGES format (*.iges *.igs)","Part")
|
||||
FreeCAD.addExportType("IGES format (*.iges *.igs)","Part")
|
||||
|
||||
# There is a bug in OCC 6.5.3 (and older which leads to a crash)
|
||||
# There is a bug in OCC 6.5.0 64-bit and older which leads to a crash
|
||||
# The registration of the STEP filetype for 64-bit is handled in initPart()
|
||||
import platform
|
||||
if platform.architecture()[0]=='64bit':
|
||||
FreeCAD.addImportType("STEP AP203 format (*.step *.stp)","Part")
|
||||
FreeCAD.addExportType("STEP AP203 format (*.step *.stp)","Part")
|
||||
else:
|
||||
FreeCAD.addImportType("STEP AP214 format (*.step *.stp)","ImportGui")
|
||||
FreeCAD.addExportType("STEP AP214 format (*.step *.stp)","ImportGui")
|
||||
if platform.architecture()[0]=='32bit':
|
||||
FreeCAD.addImportType("STEP AP214 format (*.step *.stp)","ImportGui")
|
||||
FreeCAD.addExportType("STEP AP214 format (*.step *.stp)","ImportGui")
|
||||
#else:
|
||||
# FreeCAD.addImportType("STEP AP203 format (*.step *.stp)","Part")
|
||||
# FreeCAD.addExportType("STEP AP203 format (*.step *.stp)","Part")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user