I work on polyhedra and their construction and rendering. A rather complex
part is the production of a net from a solid. i'd like to laser-cut these
needs, but this needs two layers - one for the outline to cut though, the
other for the interior lines to score. I see there has been some discussion
on the issue list re layer export but until it is implemented, what
work-arounds have folk used? I guess I could export two separate DXFs and
merge them somehow?
http://forum.openscad.org/file/n21157/rd.png
TIA
Chris
http://kitwallace.co.uk/3d/solid-index.xq
--
View this message in context: http://forum.openscad.org/Export-two-layers-to-DXF-tp21157.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
If you aren't averse to using other programs, a couple options pop into my
alleged mind.
If you're starting from an STL file, consider that the free program Slic3r
provides for export to a DLP 3D printer, in the form of sliced segments
determined by the user-defined layer thickness. Sending your STL to the
program, setting zero infill and layer thickness to your requirements should
result in a set of graphic images, although I've forgotten the format of
those images. Even if they are JPG, BMP, PNG, one can easily convert them to
your laser format.
Another option is to use Inkscape to import the flattened image and modify
the lines as needed. I selected Inkscape because it's free, but any vector
editing program should provide for your requirements. If you haven't checked
out Pepakura, you may find it contains even better answers. Although not
free, it's astonishingly low priced considering the features.
--
View this message in context: http://forum.openscad.org/Export-two-layers-to-DXF-tp21157p21159.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
2017-04-10 10:41 GMT-03:00 kitwallace kit.wallace@gmail.com:
Wow! What a huge and rich work. I tip my hat to you.
Ronaldo - thanks - it's a bit of a monster and still growing. It's great that
OpenSCAD can do this stuff - multiple hat-tips to the team (but oh for an
associate array)
Fred -thanks for the suggestions. It seems both those approaches go via
images and that will loose accuracy and require manual work. I feel that
merging the 2 DXF files should work - I'm looking for, say, a python script
which does this.
Chris
--
View this message in context: http://forum.openscad.org/Export-two-layers-to-DXF-tp21157p21172.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Hi Kit
I took one of your polyhedra net files and played around with it. As there's
no way of drawing lines, let alone exporting them, from OpenSCAD, I resigned
to drawing them by hand. I added a projection cut to get the net in 2D, then
exported a dxf and svg.
If you're exporting a dxf, you're probably going to have to reconnect the
lines at some point anyway, as OpenSCAD exports dxfs as individual line
segments. Opening the dxf in a drawing package (eg Inkscape) should give you
the outline (or cut line). You can reconnect the points easily in Inkscape,
or if you export from OpenSCAD as an SVG, they stay connected.
To draw the internal 'fold' lines in Inkscape, create a new layer, and
select the line tool (pen tool). Set the cursor to snap to 'cusp nodes' (
View > Show/Hide > Snap Controls Bar), and the cursor should snap to the
nearest point, and allow you to draw the lines accurately to the points.
Inkscape's drawing tools are somewhat of an acquired taste (especially after
years using Illustrator!), so if you need extra guidance on the above, let
me know, though there is extensive online help. You can, of course, do
something similar in other vector drawing packages.
Once all the lines are drawn, export the file as a dxf (uncheck 'use
ROBO-master...' but check 'use LWPOLYLINE...'). If you have problems
importing the dxf into the laser cutter software, you may need to resave it
with a better dxf creation tool than Inkscape; I use QCAD. This opens
Inkscape dxfs (and OpenSCAD's and Illustrator's), and allows you to resave
them in a version other software will understand. I tend to use R15 dxf
version, which seems to have the broadest support for my uses.
Haven't tried laser cutting the resulting file yet, but will... soon...
Ian A-S (Bristol Hackspace)
--
View this message in context: http://forum.openscad.org/Export-two-layers-to-DXF-tp21157p21177.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Hi Ian
Many thanks for that advice. I can generate two dxf files one for the outer
http://forum.openscad.org/file/n21180/rd-outer.png
the other for the inner lines
http://forum.openscad.org/file/n21180/rd-inner.png
so I was thinking that I could combine these as layers in one DXF I might
not need much manual intervention. I've generated the two DXF files to
experiment with and would be glad of your help.
Chris
--
View this message in context: http://forum.openscad.org/Export-two-layers-to-DXF-tp21157p21180.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Hi Chris - great progress.
I'd be inclined to load them into inkscape and select the paths and group
them there. The advantage being that the result can be scaled and exported
as SVG with useful dimensions.
Exporting from Inkscape as a PDF for printing, or send the SVG straight to
someone like Ponoko - which takes svg files from inkscape and laser cuts
them using their templates as a guide (colours define cut or score).
(all templates here: https://www.ponoko.com/starter-kits/inkscape)
Having said that a lot of laser cutters also take DXF - but its such a
crusty format. Looks like you'll always be using straight lines though, so
more chance of success...
--
View this message in context: http://forum.openscad.org/Export-two-layers-to-DXF-tp21157p21189.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Thanks for the suggestions folks.
I switched to exporting SVG since its easier to manipulate. However, even
the SVG paths are difficult to simplify to single lines for the laser cutter
because the thin rectangles get joined into complex areas if they touch.
After a struggle, I suddenly realised that I could construct the complete
SVG in openscad as text, with lines as lines rather than rectangles and
outer and inner lines as two differently coloured paths. This works fine
even if I have to copy and paste echoed output to create the file.
http://forum.openscad.org/file/n21207/pC-svg.png
I'll write up the approach and post a link.
Chris
--
View this message in context: http://forum.openscad.org/Export-two-layers-to-DXF-tp21157p21207.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
wow
--
View this message in context: http://forum.openscad.org/Export-two-layers-to-DXF-tp21157p21210.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
hmmm...resize a box-drawing-vertical char?
Admin - PM me if you need anything, or if I've done something stupid...
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
View this message in context: http://forum.openscad.org/Export-two-layers-to-DXF-tp21157p21212.html
Sent from the OpenSCAD mailing list archive at Nabble.com.