issue #0003174: Import of simple shapes no longer works
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user