DXF for cut and engrave

classic Classic list List threaded Threaded
64 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

DXF for cut and engrave

OpenSCAD mailing list
I think this has been raised before but I would like to be able to export a
single DXF file containing both parts for cutting (like an outline) and
parts for engraving (inside the outline). I don't really need them to be
distinguished by color but it would be nice if all parts could be in a
single DXF file - currently I only get the outline and have to export two
DXFs and merge in the laser cutter software.




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
The problem is OpenSCAD can only model solid objects, not laser tool paths.

The correct model for an engraved line would be a shallow trench with a width equal to the laser beam width. I.e. it would be a 3D object and laser host software won't process it.

I plan to build my own laser cutter next year and if I do I will write my own CAM software to handle STLs. In the laser world the CAM step seems to be missed out because the kerf is so small. The design modelled in a vector art packages is the tool path.

On Mon, 21 Oct 2019 at 12:18, kitwallace via Discuss <[hidden email]> wrote:
I think this has been raised before but I would like to be able to export a
single DXF file containing both parts for cutting (like an outline) and
parts for engraving (inside the outline). I don't really need them to be
distinguished by color but it would be nice if all parts could be in a
single DXF file - currently I only get the outline and have to export two
DXFs and merge in the laser cutter software.




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
In reply to this post by OpenSCAD mailing list
I am trying to visualize your problem, and am having difficulty in seeing how
you can export a DXF with anything OTHER than an outline. When you export
the two files, does the 'engrave' file have a 'fill' with no 'stroke'?

My usual method is to export all parts of the object, then use something
like Inkscape to set the colours for whatever I want the laser cutter
control software to do.


OpenSCAD mailing list wrote

> I think this has been raised before but I would like to be able to export
> a
> single DXF file containing both parts for cutting (like an outline) and
> parts for engraving (inside the outline). I don't really need them to be
> distinguished by color but it would be nice if all parts could be in a
> single DXF file - currently I only get the outline and have to export two
> DXFs and merge in the laser cutter software.
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
Suppose you have
  square(40,center=true);
  circle(10);

The implicit union() means that the DXF file contains only the outline of
the square and not that of the enclosed circle.

Actually I've just thought that
 difference() {
      square(40,center=true);
      circle(10);
 }

outputs DXF with both paths ; how those paths are used on the laser cutter
depends on how I color the lines and configure to cut one and engrave the
other.

so maybe Ive answered my own question :)



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
I think that only works if you want to engrave closed, non overlapping loops.

On Mon, 21 Oct 2019 at 15:24, kitwallace via Discuss <[hidden email]> wrote:
Suppose you have
  square(40,center=true);
  circle(10);

The implicit union() means that the DXF file contains only the outline of
the square and not that of the enclosed circle.

Actually I've just thought that
 difference() {
      square(40,center=true);
      circle(10);
 }

outputs DXF with both paths ; how those paths are used on the laser cutter
depends on how I color the lines and configure to cut one and engrave the
other.

so maybe Ive answered my own question :)



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
Not sure how you could engrave a open area?

and why have we gone all anonymous?

kitwallace



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
On 21.10.19 18:09, kitwallace via Discuss wrote:
> and why have we gone all anonymous?

Oh, indeed. I suspect this is trying to fix the issue
that some mail providers don't accept outside mails
claiming to come from a domain that does not own the
mail domain.
(https://en.wikipedia.org/wiki/Sender_Policy_Framework)

E.g. GMX publishes the SPF info via DNS so every
compliant mail provider will not accept any mail
coming from a Nabble server claiming to be from a GMX
address. And that's a good thing.
But that also meant I could not really use the forum
interface as most people would not receive the mails.

Looks like the mail part was rolled out but the forum
part is missing.

Thunderbird shows as mail sender now as:
kitwallace via Discuss <[hidden email]>
so there the author is visible.

ciao,
  Torsten.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
In reply to this post by OpenSCAD mailing list
The main issue with OpenSCAD in regards to laser cutting / engraving is that "Solid Modeling" does not transfer well to "line art".  There's no practical way to define a standalone "hairline" with no width.  It works ok If the line you want corresponds to the outline of a soiid, but the "standalone" qualifier is the problem.   You can approximate lines with thin rectangles, but the laser will end up doing a double pass along the two long sides no matter what.  The other issue is that lines can't really be made to overlap.

I'm not sure if its even feasible for OpenSCAD to support such features, since its such a fundamentally different usage from solid modelling.



On Mon, Oct 21, 2019 at 11:01 AM kitwallace via Discuss <[hidden email]> wrote:
Not sure how you could engrave a open area?

and why have we gone all anonymous?

kitwallace



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
In reply to this post by OpenSCAD mailing list
On Mon, Oct 21, 2019 at 06:14:18PM +0200, Torsten Paul via Discuss wrote:
> Thunderbird shows as mail sender now as:
> kitwallace via Discuss <[hidden email]>
> so there the author is visible.

Still, "reply-to-author" in my mailprogram is probably broken by this.

        Rogier.

--
** [hidden email] ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
In reply to this post by OpenSCAD mailing list
I use modules with a unique name suffix _dxf to denote they make dxf files, +stl for STLs, etc. Then I have a script to export them. Another approach would to be make the engraving another module with a different suffix, so they both get exported and combined. I would probably use SVG instead of DXF as it is easier to manipulate in Python with a library.

On Mon, 21 Oct 2019 at 17:57, Hans L via Discuss <[hidden email]> wrote:
The main issue with OpenSCAD in regards to laser cutting / engraving is that "Solid Modeling" does not transfer well to "line art".  There's no practical way to define a standalone "hairline" with no width.  It works ok If the line you want corresponds to the outline of a soiid, but the "standalone" qualifier is the problem.   You can approximate lines with thin rectangles, but the laser will end up doing a double pass along the two long sides no matter what.  The other issue is that lines can't really be made to overlap.

I'm not sure if its even feasible for OpenSCAD to support such features, since its such a fundamentally different usage from solid modelling.



On Mon, Oct 21, 2019 at 11:01 AM kitwallace via Discuss <[hidden email]> wrote:
Not sure how you could engrave a open area?

and why have we gone all anonymous?

kitwallace



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
In reply to this post by OpenSCAD mailing list
And we all seem to have made 45 posts.

The forum has never really worked properly. I stick to the mailing list.

On Mon, 21 Oct 2019 at 22:01, kitwallace via Discuss <[hidden email]> wrote:
Not sure how you could engrave a open area?

and why have we gone all anonymous?

kitwallace



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
In reply to this post by OpenSCAD mailing list
How I do this: I make each color a separate object. So, one cut object, one
engrave object in most cases. Then, I export them separately, stack them in
Lightburn, and then set the settings for each color and burn.

To make it easier to see while working in OpenSCAD, I offset the cut layer 1
mm in Z.

It would be nice if it could be done simpler, but this is the best way I
found.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
In my current project on fractal patterns, both the cut outlines and the
curves to be engraved are closed paths so the difference() {outline;engrave}
trick seems to work, both to preview the design and to create a single DXF
and then into (on our laser cutter) Lasercut 5.3

In a previous project to laser cut the net of a polyhedra from card with the
interior edges scored, to get actual, coloured lines, I had to resort to
generating SVG as a string output to the console to copy into Inkscape to
convert to DXF - it would have been good to have been able to output that
text directly to a file but I never found out how to.

kit




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
I'm a little surprised that there isn't a 2D equivalent to OpenSCAD - basically, a 2D vector drawing program that executes a program to create the drawing.  Yes, I know that Inkscape (and probably others) allows Python plug-ins, but that's not the same as having an editor window and a "run" button.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
Kinda like Logo? https://en.wikipedia.org/wiki/Logo_(programming_language)

On 10/22/19 12:17 PM, Jordan Brown via Discuss wrote:
I'm a little surprised that there isn't a 2D equivalent to OpenSCAD - basically, a 2D vector drawing program that executes a program to create the drawing.  Yes, I know that Inkscape (and probably others) allows Python plug-ins, but that's not the same as having an editor window and a "run" button.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
In reply to this post by OpenSCAD mailing list
There are a number of programs/tools in this space (2D programmatic drawing):

 - METAPOST --- one of the oldest, and the current versions allow one to
create an SVG directly --- I set up a TeX editor such as TeXmaker and use an
image previewer such as nomacs
 - Processing --- popular and well-supported and the subject of a number of
books
 - NodeBox --- originally more popular on the Mac there is now a nice
Windows implementation
 - Asymptote --- front-end to METAPOST
 - https://archives.haskell.org/projects.haskell.org/diagrams/ 

William



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

OpenSCAD mailing list
On Tue, Oct 22, 2019 at 11:10:03AM -0700, WillAdams via Discuss wrote:
> There are a number of programs/tools in this space (2D programmatic drawing):

I have probably missed part of this discussion, but for me: I use
openscad to design a box for a project in 3D and then I lay the pieces
flat and send the outline to be laser-cut. One popular box has a few
markings for the buttons. I can test-fit the design in openscad and
the current processing towards something for the laser-cutting-service
is too long and error prone. I'd much rather hit "export" in openscad
and that's that. But now there are a few more steps to add the
engravings in another program. (this "too difficult" has resulted in
problems that we'd fixed by adjusting an intermediate file, getting
overwritten so that we got an old problem back).  

        Roger.


--
** [hidden email] ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

Troberg
OpenSCAD mailing list wrote
> On Tue, Oct 22, 2019 at 11:10:03AM -0700, WillAdams via Discuss wrote:
>>I have probably missed part of this discussion, but for me: I use
> openscad to design a box for a project in 3D and then I lay the pieces
> flat and send the outline to be laser-cut.

OpenSCAD is heavily oriented towards 3D-printing, and, to some extent,
leaves us laser cutter guys out in the cold, or at least requiring us to
make irritating workarounds.

For example, a line is useless in 3D-printing, but extremely useful in laser
cutting (google "living hinge" for a good example).

I really hope that considerations for laser cuttings will enter into the
plan for OpenSCAD, it would mean a lot to us. 3D-printing is just too slow,
has too small work area and too limited in materials available to be useful
for me.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

nophead
The problem is a laser doesn't cut a line with zero thickness but people pretend it does.

You can model any object a laser can produce in OpenSCAD. What is needed is a CAM stage for lasers that creates the tool path, just as 3D printing and milling. For some reason the CAM stage is ignored when laser cutting.

On Thu, 24 Oct 2019 at 09:39, Troberg <[hidden email]> wrote:
OpenSCAD mailing list wrote
> On Tue, Oct 22, 2019 at 11:10:03AM -0700, WillAdams via Discuss wrote:
>>I have probably missed part of this discussion, but for me: I use
> openscad to design a box for a project in 3D and then I lay the pieces
> flat and send the outline to be laser-cut.

OpenSCAD is heavily oriented towards 3D-printing, and, to some extent,
leaves us laser cutter guys out in the cold, or at least requiring us to
make irritating workarounds.

For example, a line is useless in 3D-printing, but extremely useful in laser
cutting (google "living hinge" for a good example).

I really hope that considerations for laser cuttings will enter into the
plan for OpenSCAD, it would mean a lot to us. 3D-printing is just too slow,
has too small work area and too limited in materials available to be useful
for me.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
rew
Reply | Threaded
Open this post in threaded view
|

Re: DXF for cut and engrave

rew
On Thu, Oct 24, 2019 at 10:56:15AM +0100, nop head wrote:
> The problem is a laser doesn't cut a line with zero thickness but people
> pretend it does.
>
> You can model any object a laser can produce in OpenSCAD. What is needed is
> a CAM stage for lasers that creates the tool path, just as 3D printing and
> milling. For some reason the CAM stage is ignored when laser cutting.

The CAM stage traditionally happens in the printer driver under
windows. A program, ANY program tells windows it wants to print
something. Then together with some confguration, the printer driver
translates e.g. the color of the line into different commands for the
laser (say: red: "all the way through at 100% laser power and 10%
speed, blue: "just a scorched line at 50% laser power and 100%
speed", green: "engraved in bitmap mode").

The problem is that with those things tightly coupled to the laser
device in question, and them being closed source, it is difficult to
optimize those things. For example, at my friends' the laser will
easily cut up a single "rounded box" outline into 4 lines and for
quarter-circles and do them in the woarst possible order you can
imagine.

Optimizing the toolpath is equivalent to the travelling salesman
problem and therefore NP complete. But that doesn't mean you can't do
a meaningful optimization. An easy optimization (that 3D printer
slicers should also do!) would be to always pick the closest
linesegment. In the rounded-box example that immediately leads to the
optimal solution. Then as a post processing step, investigate the
longest non-cutting moves and see if you can improve on them. Take a
segment between two long-moves and try to insert it in the path
somewhere to see if the total non-cutting path length can be reduced.

Sorry for my rant.

        Roger.



>
> On Thu, 24 Oct 2019 at 09:39, Troberg <[hidden email]> wrote:
>
> > OpenSCAD mailing list wrote
> > > On Tue, Oct 22, 2019 at 11:10:03AM -0700, WillAdams via Discuss wrote:
> > >>I have probably missed part of this discussion, but for me: I use
> > > openscad to design a box for a project in 3D and then I lay the pieces
> > > flat and send the outline to be laser-cut.
> >
> > OpenSCAD is heavily oriented towards 3D-printing, and, to some extent,
> > leaves us laser cutter guys out in the cold, or at least requiring us to
> > make irritating workarounds.
> >
> > For example, a line is useless in 3D-printing, but extremely useful in
> > laser
> > cutting (google "living hinge" for a good example).
> >
> > I really hope that considerations for laser cuttings will enter into the
> > plan for OpenSCAD, it would mean a lot to us. 3D-printing is just too slow,
> > has too small work area and too limited in materials available to be useful
> > for me.
> >
> >
> >
> > --
> > Sent from: http://forum.openscad.org/
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > [hidden email]
> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >

> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


--
** [hidden email] ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
1234