fix in papercraft_unfold
This commit is contained in:
parent
8da67341bd
commit
6f9c2a9ab1
@ -179,11 +179,17 @@ class Unfold(inkex.EffectExtension):
|
|||||||
except FileNotFoundError as e:
|
except FileNotFoundError as e:
|
||||||
inkex.utils.debug("There was no SVG output generated. Cannot continue")
|
inkex.utils.debug("There was no SVG output generated. Cannot continue")
|
||||||
exit(1)
|
exit(1)
|
||||||
p = etree.XMLParser(huge_tree=True)
|
p = etree.XMLParser(huge_tree=True)
|
||||||
doc = etree.parse(stream, parser=etree.XMLParser(huge_tree=True)).getroot()
|
try:
|
||||||
stream.close()
|
doc = etree.parse(stream, parser=etree.XMLParser(huge_tree=True)).getroot()
|
||||||
|
except BaseException as e:
|
||||||
|
self.msg("Error: STL could not be unfolded")
|
||||||
|
exit(1)
|
||||||
|
finally:
|
||||||
|
stream.close()
|
||||||
|
|
||||||
doc.set('id', self.svg.get_unique_id('papercraft_unfold'))
|
doc.set('id', self.svg.get_unique_id('papercraft_unfold'))
|
||||||
self.document.getroot().append(doc)
|
self.document.getroot().append(doc)
|
||||||
|
|
||||||
#adjust viewport and width/height to have the import at the center of the canvas
|
#adjust viewport and width/height to have the import at the center of the canvas
|
||||||
if self.options.resizetoimport:
|
if self.options.resizetoimport:
|
||||||
|
Reference in New Issue
Block a user