anoved / gpxtruder

Make 3D-printable elevation models of GPX tracks.
http://gpxtruder.xyz/
MIT License
69 stars 23 forks source link

Errors extruding routes downloaded from RWGPS #48

Open caddac opened 1 year ago

caddac commented 1 year ago

I'm trying to extrude some routes and keep getting an error Error: wrong arguments.

I'm using all the default settings for Route, Model, and Size, and am exporting the route from RWGPS without changing any settings.

The routes are: https://ridewithgps.com/routes/40843939 https://ridewithgps.com/routes/40589829

Full stacktrace shown in the site:

Error: wrong arguments
Stack trace:
Error: wrong arguments
    at new CSG.Vector3D (https://gpxtruder.xyz/js/csg.js:2193:10)
    at https://gpxtruder.xyz/js/csg.js:1560:10
    at Array.map (<anonymous>)
    at CSG.parseOptionAs3DVectorList (https://gpxtruder.xyz/js/csg.js:1559:16)
    at CSG.polyhedron (https://gpxtruder.xyz/js/csg.js:2094:21)
    at profile (blob:https://gpxtruder.xyz/005523e1-7cf0-4b65-9a0e-9fec28c497ad:2:12)
    at main (blob:https://gpxtruder.xyz/005523e1-7cf0-4b65-9a0e-9fec28c497ad:1817:53)
    at OpenJsCad.runMainInWorker (https://gpxtruder.xyz/js/openjscad.js:542:18)
    at blob:https://gpxtruder.xyz/005523e1-7cf0-4b65-9a0e-9fec28c497ad:1851:96
caddac commented 1 year ago

In the "Parametric CAD Scripts" section I found this:

function profile() {
return polyhedron({points:[
[-57.5617, -26.5606, 0.0000],
[-59.5566, -26.4179, 0.0000],
[-57.5617, -26.5606, 1.0195],
[-59.5566, -26.4179, 1.0195],
[-57.6334, -27.5636, 0.0000],
[-59.6863, -28.2320, 0.0000],
[-57.6334, -27.5636, 1.0034],
[-59.6863, -28.2320, 1.0034],
[-57.1798, -28.1012, 0.0000],
[-58.3469, -29.8193, 0.0000],
[-57.1798, -28.1012, NaN],
[-58.3469, -29.8193, NaN],
... removed many more lines