Post AR6t80uo9chmbS49ce by tomnardi@hackaday.social
 (DIR) More posts by tomnardi@hackaday.social
 (DIR) Post #AR6pg9DJ1GNr7krCqW by mmu_man@m.g3l.org
       2022-12-29T19:56:47Z
       
       0 likes, 1 repeats
       
       It's possible to import color SVG in #OpenSCAD (for the preview only, color is lost on render anyway) but it needs some massaging:- export each color as separate SVG- convert the text to paths (for some reason the setting in Inkscape didn't work, had to re-process them with -T)color("black") linear_extrude(height=0.1) import("label_b.svg");translate([0,0,.1]) color("red") linear_extrude(height=0.1) import("label_r.svg");translate([0,0,.2]) color("white") …#Mac68k #RetroComputing #3D
       
 (DIR) Post #AR6pvo6TH4rsHk7xVA by linux_mclinuxface@fosstodon.org
       2022-12-29T19:59:38Z
       
       0 likes, 0 repeats
       
       @mmu_man I'm not in love with how SVGs come into OpenSCAD. It produces some really overly complex geometry. I recently had success exporting to HTML5 Canvas in Inkscape and using that code to directly create geometry.
       
 (DIR) Post #AR6q1y7kvksD6LfNXU by mmu_man@m.g3l.org
       2022-12-29T20:00:46Z
       
       0 likes, 0 repeats
       
       @linux_mclinuxface well here it's just for the preview anyway, not actual part so I don't care much. For what I've seen it's not that bad, but I had to separate each color in a layer, export it…
       
 (DIR) Post #AR6qU0QQMCklajeJai by linux_mclinuxface@fosstodon.org
       2022-12-29T20:05:49Z
       
       0 likes, 0 repeats
       
       @mmu_man The dream would be native #OpenSCAD export for Inkscape. It's possible - I looked at the code for the HTML5 save and it's just python. I had hard time wrapping my head around setting up Inkscape for development though.
       
 (DIR) Post #AR6rBjeK5fhSIu0C8W by torsten@chaos.social
       2022-12-29T20:13:42Z
       
       0 likes, 1 repeats
       
       @mmu_man The dev snapshot version has new filter options for SVG import (by id or layer name). This does not solve the color topic but removes the need for exporting layers to separate files.The Advent Calendar has an example for this https://github.com/openscad/openscad-advent-calendar-2022/blob/main/Santa-2.5D/Santa-2.5D.scad
       
 (DIR) Post #AR6rFMTSCJhFaLeBvs by mmu_man@m.g3l.org
       2022-12-29T20:14:14Z
       
       0 likes, 0 repeats
       
       @torsten oh cool
       
 (DIR) Post #AR6t80uo9chmbS49ce by tomnardi@hackaday.social
       2022-12-29T20:34:06Z
       
       0 likes, 1 repeats
       
       @linux_mclinuxface @mmu_man You mean like this?https://github.com/martymcguire/inkscape-openscad-poly
       
 (DIR) Post #AR6uBUldilki0j0A08 by linux_mclinuxface@fosstodon.org
       2022-12-29T20:39:48Z
       
       0 likes, 0 repeats
       
       @tomnardi @mmu_man Neat! I need to look into that. It looks like it exports as polygons which is good, but I've used the  BOSL2 library that has true Bézier support. This was hugely helpful in reducing the overall complexity of the objects (and increase the speed of manipulating/rendering).
       
 (DIR) Post #AR6uBV8gL6BTABmYuu by tomnardi@hackaday.social
       2022-12-29T20:46:40Z
       
       0 likes, 1 repeats
       
       @linux_mclinuxface @mmu_man I should say I've never used the package personally, but simply came across it in the past when I had some Inkscape export issues.For my own purposes, I've been using an Inkscape plugin that provides an OpenSCAD-specific DXF flavor, as the default export would sometimes lead to unexpected results.