Page MenuHome

Blender VRML2 importer throws ZeroDivisionError when trying to import a certain KiCad file
Open, Confirmed, LowPublic


Blender Version
2.8 release
2.8.2 alpha (23e1fb365b65)

Short description of error
VRML2 (.wrl) import fails with ZeroDivisionError
It divides by zero inside (for me in line 2047), because a bit earlier x_min and x_max are the same.

C:\Germano\Dev\BlenderDev\blender\release\scripts\addons\io_scene_x3d\ DeprecationWarning: 'U' mode is deprecated
  filehandle = open(path, 'rU', encoding='utf-8', errors='surrogateescape')
Traceback (most recent call last):
  File "C:\Germano\Dev\BlenderDev\blender\release\scripts\addons\io_scene_x3d\", line 78, in execute
    return import_x3d.load(context, **keywords)
  File "C:\Germano\Dev\BlenderDev\blender\release\scripts\addons\io_scene_x3d\", line 3633, in load
  File "C:\Germano\Dev\BlenderDev\blender\release\scripts\addons\io_scene_x3d\", line 3529, in load_web3d
    importShape(bpycollection, node, ancestry, global_matrix)
  File "C:\Germano\Dev\BlenderDev\blender\release\scripts\addons\io_scene_x3d\", line 3148, in importShape
    bpydata = geom_fn(geom, ancestry)
  File "C:\Germano\Dev\BlenderDev\blender\release\scripts\addons\io_scene_x3d\", line 2048, in importMesh_IndexedFaceSet
    loops = [co for f in faces
  File "C:\Germano\Dev\BlenderDev\blender\release\scripts\addons\io_scene_x3d\", line 2050, in <listcomp>
    for co in generatePointCoords(points[v])]
  File "C:\Germano\Dev\BlenderDev\blender\release\scripts\addons\io_scene_x3d\", line 2047, in generatePointCoords
    return (pt[s_axis] - s_min) / ds, (pt[t_axis] - t_min) / dt
ZeroDivisionError: float division by zero

Exact steps for others to reproduce the error



Event Timeline

Germano Cavalcante (mano-wii) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.Fri, Nov 8, 2:42 PM

I can confirm.
@Bastien Montagne (mont29), you are one of the maintainers of this addon.
Do you mind taking a look?

@Germano Cavalcante (mano-wii) that add-on is not officially maintained anymore by blender…

Germano Cavalcante (mano-wii) lowered the priority of this task from Confirmed, Medium to Confirmed, Low.Fri, Nov 8, 3:35 PM