Page 1 of 2

Any way to import STL?

Posted: 12 Mar 2017, 19:45
by ActionArt
Just wondering if anyone knows of a way to directly import .stl files?

Re: Any way to import STL?

Posted: 12 Mar 2017, 19:49
by mc_axe
I only found an export script in this thread :(

Re: Any way to import STL?

Posted: 12 Mar 2017, 20:49
by ActionArt
Yes. Unfortunately I need import. It's such a nice way to get solid geometry from CAD programs into polys. Blender can do it really well. I was hoping to skip a step and go straight to SI but I haven't found anything yet. Sure wish there was.

Re: Any way to import STL?

Posted: 12 Mar 2017, 21:48
by Bullit
I think you can convert STL to Obj without much trouble.

Re: Any way to import STL?

Posted: 13 Mar 2017, 14:52
by ActionArt
Yes, I can import in Blender and convert to .obj then import that into SI. I was just hoping to skip a step because sometimes I have a lot of them. Oh well.

Re: Any way to import STL?

Posted: 13 Mar 2017, 17:07
by Daniel Brassard
If you know somebody that can script, you can use python and/or some existing libraries such as numpy-stl, the python stl library, PyMesh or OpenMesh to import natively to Softimage.

Do you import in ascii or binary normally?

Re: Any way to import STL?

Posted: 13 Mar 2017, 18:10
by ActionArt
Unfortunately I don't. For what I'm doing it's probably not worth the time. I just thought someone might have one already. Thanks.

Re: Any way to import STL?

Posted: 13 Mar 2017, 23:46
by mc_axe
Ascii stl looks more or less like

start
normal and 3vertexes
normal and 3vertexes
normal and 3vertexes
end

so its a bounch of triangles, it is even more readable than the quite simple obj ascii, it gets longer with lots of triangles tho.

Here is a single stl triangle

Code: Select all

solid model

facet normal 0.0 1.0 0.0
outer loop
vertex 1.0 0.0 1.0
vertex 1.0 0.0 -1.0
vertex -1.0 0.0 -1.0
endloop
endfacet

endsolid model
I hope someone can do at least the ascii import

Re: Any way to import STL?

Posted: 14 Mar 2017, 04:05
by ActionArt
Doh, I forgot to even answer the question. Ascii or binary is fine, doesn't matter.

Re: Any way to import STL?

Posted: 15 Mar 2017, 09:04
by Hirazi Blue
You should probably look into dedicated conversion software that allows for batch processing. I haven't tried this myself, but this one apparently does the trick and it's free: http://www.nchsoftware.com/3dconverter/

Re: Any way to import STL?

Posted: 15 Mar 2017, 21:48
by NNois
Hi, the best way without any doubt is using the MOI modeler software, the mesh generated is 2 to 3 times better than in any other apps

Re: Any way to import STL?

Posted: 16 Mar 2017, 15:09
by ActionArt
Thanks Hirazi, I'll give that a try.

NNois, I do have Moi and I agree, it does a fantasic job. There are two problems however. Moi is 32bit and the parts I need to convert are complex and not easily broken down. It runs out of RAM. I've been hoping for a 64 bit version but hasn't happened yet.

The other advantage of STL is Inventor can create them in a few seconds (much faster than Moi) even for very complex parts. Blender can then import them just as fast. It would be so nice to have the same feature in SI. The problem also with an intermediate step like Moi is there is often time wasted getting the right orientation, units, polys facing the right way etc.

Re: Any way to import STL?

Posted: 19 Mar 2017, 01:01
by rray
I've been needing STL import for a while too - had a try today scripting a simple importer. Check out if it works for you: ImportSTL.zip

Re: Any way to import STL?

Posted: 20 Mar 2017, 16:14
by ActionArt
Wow, that seems to work perfectly, thanks rray! No errors so far. Very nice! Incredibly fast too! This is awesome.

Re: Any way to import STL?

Posted: 20 Mar 2017, 22:19
by mc_axe
Thanx rray, very nice to have stl import in SI! Thx for share!

Re: Any way to import STL?

Posted: 21 Mar 2017, 20:46
by rray
Glad to share nice to see it works well. The "new" meshBuilder class from the sdk makes writing importers quite easy and fast.