Page MenuHome

SVG Import exponential notation filter/fix
AbandonedPublic

Authored by Roel Koster (kostex) on Dec 14 2018, 3:44 PM.

Details

Summary

Hi,

While importing an svg (generated with DraftSight Cad/QT SVG exporter) the addon crashes on numbers depicted as exponential notation.
It seems that due to rounding or so, the exporter, instead of 0.0, had coordinates like:
1.98952e-13 or -4.996e-15

I've slapped in a regular expression to filter them out.. but be aware that my regex is not "pro level"
Maybe you've got a better approach.

Diff Detail

Repository
rB Blender

Event Timeline


If you want an example file ;-)

Wouldn't really rely on the fact that exponential values are small. Those could also be insanely large. Here is a more generic fix, which should solve all those ambiguities and misbehavior D4234.

Sergey created https://developer.blender.org/D4234 which makes this suggestion obsolete
thanks