fractalize make division zero (reproductible case)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
High
|
Unassigned |
Bug Description
With today SVN version of Inkscape
Open the attached file :
launch the fractalize script with parameters :
Subdivisions : 6
Smoothness : 4.0
This error log is displayed (ZeroDivisionError) :
Traceback (most recent call last):
File "/opt/gfx/
line 89, in <module>
e.affect()
File "/opt/gfx/
153, in affect
self.effect()
File "/opt/gfx/
line 71, in effect
self.fractalize
File "/opt/gfx/
line 79, in fractalize
subdivPoint = calculateSubdiv
File "/opt/gfx/
line 30, in calculateSubdiv
nx = -y3/length
ZeroDivisionError: float division
Originator: YES
working solution,
replace :
nx = -y3/length
ny = x3/length
By
if length != 0:
nx = -y3/length
ny = x3/length
else:
nx = 1
ny = 0
(use attached patch)
File Added: fractalize_ divzeo. patch