0001160: Freecad sometimes 'forgets' the ability to handle stp files

This commit is contained in:
wmayer
2013-06-27 14:16:41 +02:00
parent 7f216323ff
commit 4b2474807b
6 changed files with 59 additions and 53 deletions

View File

@@ -93,16 +93,6 @@ 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 (*.step *.stp)","Part");
App::GetApplication().addExportType("STEP (*.step *.stp)","Part");
#else
App::GetApplication().addImportType("STEP with colors (*.step *.stp)","ImportGui");
App::GetApplication().addExportType("STEP with colors (*.step *.stp)","ImportGui");
#endif
#endif
// This is highly experimental and we should keep an eye on it
// if we have mysterious crashes
// The argument must be 'Standard_False' to avoid FPE caused by

View File

@@ -33,7 +33,7 @@ class Document;
namespace Part
{
int ImportIgesParts(App::Document *pcDoc, const char* Name);
PartExport int ImportIgesParts(App::Document *pcDoc, const char* Name);
} //namespace Part

View File

@@ -39,7 +39,7 @@ namespace Part
/** The part shape property
*/
int ImportStepParts(App::Document *pcDoc, const char* Name);
PartExport int ImportStepParts(App::Document *pcDoc, const char* Name);

View File

@@ -49,14 +49,5 @@ FreeCAD.addImportType("BREP format (*.brep *.brp)","Part")
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.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]=='32bit':
FreeCAD.addImportType("STEP with colors (*.step *.stp)","ImportGui")
FreeCAD.addExportType("STEP with colors (*.step *.stp)","ImportGui")
#else:
# FreeCAD.addImportType("STEP (*.step *.stp)","Part")
# FreeCAD.addExportType("STEP (*.step *.stp)","Part")
FreeCAD.addImportType("STEP with colors (*.step *.stp)","ImportGui")
FreeCAD.addExportType("STEP with colors (*.step *.stp)","ImportGui")