Fix STEP AP203/214 flaws
This commit is contained in:
@@ -95,11 +95,11 @@ void PartExport initPart()
|
||||
// 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");
|
||||
App::GetApplication().addImportType("STEP (*.step *.stp)","Part");
|
||||
App::GetApplication().addExportType("STEP (*.step *.stp)","Part");
|
||||
#else
|
||||
App::GetApplication().addImportType("STEP AP214 format (*.step *.stp)","ImportGui");
|
||||
App::GetApplication().addExportType("STEP AP214 format (*.step *.stp)","ImportGui");
|
||||
App::GetApplication().addImportType("STEP with colors (*.step *.stp)","ImportGui");
|
||||
App::GetApplication().addExportType("STEP with colors (*.step *.stp)","ImportGui");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -446,9 +446,10 @@ CmdPartImport::CmdPartImport()
|
||||
void CmdPartImport::activated(int iMsg)
|
||||
{
|
||||
QStringList filter;
|
||||
filter << QString::fromAscii("STEP AP203 (*.stp *.step)");
|
||||
filter << QString::fromAscii("STEP AP214 (*.stp *.step)");
|
||||
filter << QString::fromAscii("STEP (*.stp *.step)");
|
||||
filter << QString::fromAscii("STEP with colors (*.stp *.step)");
|
||||
filter << QString::fromAscii("IGES (*.igs *.iges)");
|
||||
filter << QString::fromAscii("IGES with colors (*.igs *.iges)");
|
||||
filter << QString::fromAscii("BREP (*.brp *.brep)");
|
||||
|
||||
QString select;
|
||||
@@ -459,7 +460,7 @@ void CmdPartImport::activated(int iMsg)
|
||||
if (!pDoc) return; // no document
|
||||
openCommand("Import Part");
|
||||
if (select == filter[1] ||
|
||||
select == filter[2]) {
|
||||
select == filter[3]) {
|
||||
doCommand(Doc, "import ImportGui");
|
||||
doCommand(Doc, "ImportGui.insert(\"%s\",\"%s\")", (const char*)fn.toUtf8(), pDoc->getName());
|
||||
}
|
||||
@@ -504,9 +505,10 @@ CmdPartExport::CmdPartExport()
|
||||
void CmdPartExport::activated(int iMsg)
|
||||
{
|
||||
QStringList filter;
|
||||
filter << QString::fromAscii("STEP AP203 (*.stp *.step)");
|
||||
filter << QString::fromAscii("STEP AP214 (*.stp *.step)");
|
||||
filter << QString::fromAscii("STEP (*.stp *.step)");
|
||||
filter << QString::fromAscii("STEP with colors (*.stp *.step)");
|
||||
filter << QString::fromAscii("IGES (*.igs *.iges)");
|
||||
filter << QString::fromAscii("IGES with colors (*.igs *.iges)");
|
||||
filter << QString::fromAscii("BREP (*.brp *.brep)");
|
||||
|
||||
QString select;
|
||||
@@ -515,7 +517,7 @@ void CmdPartExport::activated(int iMsg)
|
||||
App::Document* pDoc = getDocument();
|
||||
if (!pDoc) return; // no document
|
||||
if (select == filter[1] ||
|
||||
select == filter[2]) {
|
||||
select == filter[3]) {
|
||||
Gui::Application::Instance->exportTo((const char*)fn.toUtf8(),pDoc->getName(),"ImportGui");
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -54,9 +54,9 @@ FreeCAD.addExportType("IGES format (*.iges *.igs)","Part")
|
||||
# The registration of the STEP filetype for 64-bit is handled in initPart()
|
||||
import platform
|
||||
if platform.architecture()[0]=='32bit':
|
||||
FreeCAD.addImportType("STEP AP214 format (*.step *.stp)","ImportGui")
|
||||
FreeCAD.addExportType("STEP AP214 format (*.step *.stp)","ImportGui")
|
||||
FreeCAD.addImportType("STEP with colors (*.step *.stp)","ImportGui")
|
||||
FreeCAD.addExportType("STEP with colors (*.step *.stp)","ImportGui")
|
||||
#else:
|
||||
# FreeCAD.addImportType("STEP AP203 format (*.step *.stp)","Part")
|
||||
# FreeCAD.addExportType("STEP AP203 format (*.step *.stp)","Part")
|
||||
# FreeCAD.addImportType("STEP (*.step *.stp)","Part")
|
||||
# FreeCAD.addExportType("STEP (*.step *.stp)","Part")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user