News for hackers. Stuff that matters.
Re:3D Wireframes Using SVG by th0ma5 on Monday July 08, 2019 @04:36PM (#20386510)
Anyone know of something that vectorizes STLs or OBJs into a 2D perhaps ortho perspective?
Re:3D Wireframes Using SVG by daeken on Monday July 08, 2019 @11:02PM (#20388673)
The `Lightness' subproject under LumberSharp does (among many other things) this: https://github.com/daeken/LumberSharp

I built this out to translate 3d models or signed distance fields to SVGs for pen plotting purposes. You can see an example here, generated from a few lines of distance field code: https://scontent-atl3-1.cdninstagram.com/vp/9212f4c15cf30583...

And another generated from an STL I generated with OpenSCAD (part of an Egg sculpture series I did for 3d printing): https://scontent-atl3-1.cdninstagram.com/vp/d3fdf208c687551a...

Re:3D Wireframes Using SVG by ktpsns on Monday July 08, 2019 @05:09PM (#20386791)
When I did 3D printing, I racked my brain how to render STL files to SVG. Blender (can import STL and) seems to be able to render to SVG with a plugin (https://blender.stackexchange.com/questions/23661/render-3d-...) but I was never so happy about the results. This small Python code is really so much better!
Re:3D Wireframes Using SVG by avhon1 on Monday July 08, 2019 @09:31PM (#20388272)
You don't actually need a plugin -- Blender comes with this feature built-in. It's called "Freestyle" rendering.

https://docs.blender.org/manual/en/latest/render/freestyle/i...

Re:3D Wireframes Using SVG by tapia on Monday July 08, 2019 @05:00PM (#20386716)
Maybe you can do this with gl2ps [1]. You can read the STL file with python-occ [2] and then export it to vector format (it uses gl2ps for this).

[1] http://geuz.org/gl2ps/ [2] http://www.pythonocc.org/

Re:3D Wireframes Using SVG by mkl on Monday July 08, 2019 @05:06PM (#20386763)
It looks like this library could do it. OBJ is a very simple format to parse, but I'm sure there are libraries to do that too.