3 ms·
Anyone know of something that vectorizes STLs or OBJs into a 2D perhaps ortho perspective?
by th0ma5 7y ago
Anyone know of something that vectorizes STLs or OBJs into a 2D perhaps ortho perspective?
- tapia 7y agoMaybe 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/ http://geuz.org/gl2ps/ [2] http://www.pythonocc.org/ http://www.pythonocc.org/
- mkl 7y agoIt 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.
- ktpsns 7y agoWhen 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-mesh-to-2d-svg-export 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!
- avhon1 7y agoYou 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/index.html https://docs.blender.org/manual/en/latest/render/freestyle/i...
- daeken 7y agoThe `Lightness' subproject under LumberSharp does (among many other things) this: https://github.com/daeken/LumberSharp 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/9212f4c15cf305833e57afe2e5d25077/5DBDD3D4/t51.2885-15/e35/47584375_314412145847978_430522436344251005_n.jpg?_nc_ht=scontent-atl3-1.cdninstagram.com 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/d3fdf208c687551a8bf869b6cf96c906/5DB07D3F/t51.2885-15/e35/47689741_914010932139703_2726030096804164662_n.jpg?_nc_ht=scontent-atl3-1.cdninstagram.com https://scontent-atl3-1.cdninstagram.com/vp/d3fdf208c687551a...