Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Giant STLs (3+MB) cause crashing. #160

Open
indrora opened this issue Feb 15, 2016 · 9 comments
Open

Giant STLs (3+MB) cause crashing. #160

indrora opened this issue Feb 15, 2016 · 9 comments

Comments

@indrora
Copy link

indrora commented Feb 15, 2016

I'm trying to import a big thing and when doing so, Sketchup chokes after about 30 seconds, then will eventually just cause SketchUp to give up and Windows to come reap the dead Sketchup instance.

Sketchup eats about 200MB of RAM before petering out and just chewing on CPU time.

Specs:

  • Intel Core i5 6200u (mobile skylake)
  • Win10 pro
  • 8GB of RAM
@thomthom
Copy link
Member

Which one of the files are you trying to import?

@indrora
Copy link
Author

indrora commented Feb 15, 2016

I'm trying to import sch_base_rev2_no_support.stl.

MeshLab says it has 205k verticies and 68k faces.

(edit: If I use MeshLab to transmogrify it into a Collada DAE model, it's happy. Takes a few seconds, but it's happy)

@thomthom
Copy link
Member

What's your import settings?

I tried SCH_Base_rev2_no_support.STL and it imported within 1-2min. However, I set the import units to meters. Comes in huge.

image

But I did that because if you import really dense meshes you end up with vertices very close to each other - less than 1mm and that comes within the lower range of SU tolerance. After that things start merging and breaking apart. Currently the script will try to heal these things which in turn becomes very slow.

I suspect this might be the cause - and that the script could be improved to detect this and even time out. But please verify so we can be sure.

@thomthom
Copy link
Member

Also, what SketchUp version do you use? (I don' think it should matter - but just to be sure.)

@thomthom
Copy link
Member

Even when imported in meters there are edges ~15mm. It's clear that any smaller units will cause issues. The model is very dense - even for 3d printing this seem excessive.

image

@indrora
Copy link
Author

indrora commented Feb 15, 2016

My settings are the defaults: Import in MM, preserve object origin. If I set import to be in "meters" or "feet", it does indeed import after a few minutes of an unresponsive interface, but it imports.

I'm on Sketchup �Make 2016 with no other extensions added.

Again, exporting a Collada DAE model from MeshLab or severely decimating the mesh makes it possible to import into SketchUp.

@thomthom
Copy link
Member

What is the original unit of that STL file? Millimeters?
I don't think there's any way to not get issues with the file if you import in original size. Since SU has a fixed precision which was tuned for architectural size.
The best the extension can do is try to avoid locking up for too long.

@indrora
Copy link
Author

indrora commented Feb 15, 2016

Original unit is MM. I don't think we're hitting a limitation of SketchUp. If I transmogrify the model Into a DAE model using MeshLab, it imports happily (and nicer)

@thomthom
Copy link
Member

Su has a hard coded precision of 1/1000". If the model have 17mm edges when imported at meters it will be well under that limit when importing in mm.
Native importers use the C API or the old C++ SDK which might not trigger the same internal functions as the Ruby API. The Ruby API cause a lot more clean up operation to run automatically.
Even if dae or anything manage to import initially there will quickly be issues when manipulating the mesh as the algorithm will fail due to the vertices being treated as equal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants