SketchUp / sketchup-ply

A SketchUp Ruby Extension that adds PLY (Polygon File Format) file format import.
Apache License 2.0
10 stars 1 forks source link

NoMethodError #9

Open ghost opened 7 years ago

ghost commented 7 years ago

Not sure if this is still maintained, but I received this upon trying to import a .ply file of a terrain model (around 60mb)

Error: #<NoMethodError: undefined method 'description' for #<ArgumentError: invalid byte sequence in UTF-8>>

line pointers:

SketchUp/Plugins/sketchup-ply/importer.rb:239:in 'rescue in load_file'
SketchUp/Plugins/sketchup-ply/importer.rb:223: in 'load_file'
jimfoltz commented 7 years ago

What is the full path to the the .ply file?

If you can, try to import the .ply file from a location without any unicode chars in the filename or path.

jimfoltz commented 7 years ago

Can you share the .ply file?

ghost commented 7 years ago

The file was located in C:\Temp - so no non-standard characters in the path.

I've posted it here: https://drive.google.com/open?id=0BzOMUnuY-Hi8Rm9STkd2bjdMbFU

I created it from an SRTM-3 .hgt file, using the python method (gdal) described here:

http://gis.stackexchange.com/questions/121561/generating-a-mesh-from-dtm/121873#121873

Thanks for taking a look!

jimfoltz commented 7 years ago

So one problem is that the .ply file appears to be a binary .ply file and the importer only knows about ascii .ply files.

I tried several ways to convert the .ply file and was finally able to export an .stl from Meshlab, but as of yet can not get anything useful from the data.

ghost commented 7 years ago

Thanks Jim, a bit more research on my end reveals that the .hgt format is problematic with ogr/gdal. I exported it to a geotiff, and then converted that raster to a ply - around 2gb. My home workstation (linux, using meshlab and blender) choked on that filesize, but my work PC is much more capable. I'll try running the same process there on Monday and see if I can achieve different results. Will follow up then with my findings.

thomthom commented 7 years ago

So one problem is that the .ply file appears to be a binary .ply file and the importer only knows about ascii .ply files.

Can this be easily detected? Wondering if a warning message could be given to the user.