issue #0003174: Import of simple shapes no longer works

This commit is contained in:
wmayer
2017-12-06 17:54:10 +01:00
parent 23cdde88e0
commit 52fe4cd2a7
3 changed files with 12 additions and 13 deletions

View File

@@ -343,10 +343,10 @@ private:
Handle(XCAFApp_Application) hApp = XCAFApp_Application::GetApplication();
Handle(TDocStd_Document) hDoc;
bool optionReadShapeCompoundMode_status;
bool optionReadShapeCompoundMode = true;
hApp->NewDocument(TCollection_ExtendedString("MDTV-CAF"), hDoc);
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Import/hSTEP");
optionReadShapeCompoundMode_status = hGrp->GetBool("ReadShapeCompoundMode",false);
optionReadShapeCompoundMode = hGrp->GetBool("ReadShapeCompoundMode", optionReadShapeCompoundMode);
if (file.hasExtension("stp") || file.hasExtension("step")) {
try {
@@ -419,7 +419,7 @@ private:
// way. This is drastically improving STEP rendering time on complex STEP files.
pcDoc->recompute();
if (file.hasExtension("stp") || file.hasExtension("step"))
ocaf.setMerge(optionReadShapeCompoundMode_status);
ocaf.setMerge(optionReadShapeCompoundMode);
ocaf.loadShapes();
pcDoc->purgeTouched();
pcDoc->recompute();

View File

@@ -36,12 +36,11 @@ FreeCAD.addImportType("PLMXML files (*.plmxml)","PlmXmlParser")
# Add initial parameters value if they are not set
paramGetV = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Import/hSTEP")
ReadShapeCompoundMode_status=paramGetV.GetBool("ReadShapeCompoundMode")
if not ReadShapeCompoundMode_status:
paramGetV.SetBool("ReadShapeCompoundMode",False)
Scheme_203_status=paramGetV.GetBool("Scheme_214")
if not Scheme_203_status:
paramGetV.SetBool("Scheme_203",False)
Scheme_214_status=paramGetV.GetBool("Scheme_214")
if not Scheme_214_status:
paramGetV.SetBool("Scheme_214",True)
if paramGetV.GetBool("ReadShapeCompoundMode", False) != paramGetV.GetBool("ReadShapeCompoundMode", True):
paramGetV.SetBool("ReadShapeCompoundMode", True)
if paramGetV.GetBool("Scheme_203", False) != paramGetV.GetBool("Scheme_203", True):
paramGetV.SetBool("Scheme_203", False)
if paramGetV.GetBool("Scheme_214", False) != paramGetV.GetBool("Scheme_214", True):
paramGetV.SetBool("Scheme_214", True)

View File

@@ -89,7 +89,7 @@
<string>Enable STEP Compound merge</string>
</property>
<property name="checked">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>ReadShapeCompoundMode</cstring>