I’m trying to do a STL file import. So far I’have the code below. For other file types this works.
With a runscript command I’m also succeeding, but this doesnt seam ideal for me. The file then gets loaded in the active document.
Any ideas on how i can make the Rhinodoc.import work for STL?
What do you dislike about using RunScript? Is it that the Rhino Geometry is loaded into the active document? What do you want to do with the Geometry you load from the stl?
@laurent_delrieu had written some STL importer that works very nicely on this post:
//Read a .stl in grasshopper - #9 by kevs3dhub
you’d probably need to rewrite it for rhino instead of grasshopper though, but this would allow you to keep the mesh in teh script without having it in the document.
I made an assumption here. And maybe I’m to quick. I would like to be able to import STL files in a Rhinodoc while using rhino.compute or Rhino3dmIO library. For me it was/is logical that runscript is not available here.
I’havent tested this so I’m really not sure.
I tried today again. And now it seems to work. I didn’t alter the code. I’ve done something wrong, maybe clicked the wrong file or something.
I got it to work, thanks for your trouble.