You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scientific notation 3.4e-4 for 0.00034 in the SVG file causes the error.
Glancing at PShapeSVG::parsePath in core/src/processing/core/PShapeSVG.java, the parser does not seem to handle the scientific notation, though the SVG grammar specification (https://www.w3.org/1999/08/WD-SVG-19990812/paths.html#PathDataBNF) explicitly allows it.
I would really appreciate it if Processing is capable of loading such SVG files.
I found several Forum Post mentioning the problem too (e.g.~https://discourse.processing.org/t/shape-command-not-handled-e-4/44894).
Workaround is to edit SVG to fix the scientific notation to the ordinary decimal by hand or scripts.
This may, however, cause License issues especially when one considers re-distribution, so fixing core seems ideal IMHO.
The text was updated successfully, but these errors were encountered:
Most appropriate sub-area of Processing 4?
Image
Processing version
4.3
Operating system
Linux
Steps to reproduce this
"1. Create a new sketch and put https://github.com/yeyushengfan258/Win11-icon-theme/blob/main/src/mimes/48/application-x-executable.svg into
data
folder.Enter the code in the MWE below and Run.
Got
RuntimeException: shape command not handled: e-4
."snippet
Additional context
The scientific notation
3.4e-4
for0.00034
in the SVG file causes the error.Glancing at
PShapeSVG::parsePath
incore/src/processing/core/PShapeSVG.java
, the parser does not seem to handle the scientific notation, though the SVG grammar specification (https://www.w3.org/1999/08/WD-SVG-19990812/paths.html#PathDataBNF) explicitly allows it.I would really appreciate it if Processing is capable of loading such SVG files.
I found several Forum Post mentioning the problem too (e.g.~https://discourse.processing.org/t/shape-command-not-handled-e-4/44894).
Workaround is to edit SVG to fix the scientific notation to the ordinary decimal by hand or scripts.
This may, however, cause License issues especially when one considers re-distribution, so fixing core seems ideal IMHO.
The text was updated successfully, but these errors were encountered: