Hello,
As continuation of this topic, I can now laser cut with scripted python files, but there is another problem. The chinese laser cut machine we use understand only dxf files. So I did one, with Inkscape option Files/Save and then changing filetype to AutoCAD DXF R14, it is the only dxf format that I found in Inkscape.
There is of course a generated .dxf file, I could cut rectangle, but some things are missing, I've noticed theses:
Scale is lost.
Rounded rectangles are no more rounded.
Circles are missing.
Text is missing.
A friend told me that it is a question of path, I should convert the rectangles/circles/texts in path, I'm not aware about that. Perhaps I am wrong, It's surely a newbee error of mine, but I haven't found anything concerning that. Anyway, the two files are in attachment, .svg and .dxf.
Regards,
Pfeuh
svg to dxf
Re: svg to dxf
I have used Inkscape to generate dxf files for import into RDWorks, the software used to drive our Chinese laser cutter.
I have not had a problem with the scale being lost. This may help, set
File -> Document Properties -> Page (tab) - Display units = mm
and then,
File -> Save as - Save file type = *.dxf
in the "Desktop Cutting Plotter" pop up window set, Base unit = mm
You are correct that Objects must generally be converted to paths before saving as a dxf file. Select each object (or all) and then convert with Path -> Object to path
I hope this helps.
I have not had a problem with the scale being lost. This may help, set
File -> Document Properties -> Page (tab) - Display units = mm
and then,
File -> Save as - Save file type = *.dxf
in the "Desktop Cutting Plotter" pop up window set, Base unit = mm
You are correct that Objects must generally be converted to paths before saving as a dxf file. Select each object (or all) and then convert with Path -> Object to path
I hope this helps.
Re: svg to dxf
Thank you for this answer. It helps a lot. I have done these jobs:
install the last inscape 9.2
load the file test.svg
change all objects to path
Change current unit to mm
save the file as test.dxf
Open file selector with new file
select file test.dxf
selected "Scaling -> read from file
load the file
It works much better, I have now all missing parts, circles, rounded rectangles and texts. But...
The new sketch is really too small, not scaled at all
the stroke_width is too big
Texts are not filled, just stroked.
This was the case of a new file. If I import the file test.dxf in the already open test.svg, scale is good but I have still the problems of stroke_width and not filled text.
install the last inscape 9.2
load the file test.svg
change all objects to path
Change current unit to mm
save the file as test.dxf
Open file selector with new file
select file test.dxf
selected "Scaling -> read from file
load the file
It works much better, I have now all missing parts, circles, rounded rectangles and texts. But...
The new sketch is really too small, not scaled at all
the stroke_width is too big
Texts are not filled, just stroked.
This was the case of a new file. If I import the file test.dxf in the already open test.svg, scale is good but I have still the problems of stroke_width and not filled text.
Re: svg to dxf
See here for the size issue:
https://inkscape.org/learn/faq/#inkscap ... rogram-xyz
https://inkscape.org/learn/faq/#inkscap ... rogram-xyz
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: svg to dxf
Shame on me! I didn't noticed this in the FAQ! Anyway, my problem seems to be the same, but this tip doesn't fix the issue.
Re: svg to dxf
Have you tried using a different template for your drawing?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: svg to dxf
I don't know wath template you are talking about. I script with svgwrite, it makes me a svg file, then I open it with inkscape to generate a dfx file.
Re: svg to dxf
Ah. Can you share the head part of an svgwrite svg file and of one that has been opened with Inkscape? I think you might just need to add some unit identifiers to fix this.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: svg to dxf
(full files are fine, too)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: svg to dxf
With regard to "filled text" and based on my use of RDWorks (the software that generates the driver files for our laser cutter):
Text is generally engraved onto the surface of a piece of material using a sequence of parallel very shallow cuts. These shallow cuts are created by running the laser at very low power and moving it very quickly over the material (high power and slow would cut through the material), in our case this equates to 500mm/s and 10% power for acrylic sheet.
The text is exported as (saved as) an outline path from Inkscape in a dxf file:
In RDWorks the imported text outline path from the dxf file is placed on a layer that is set as "scan" (=engrave). RDWorks automatically generates the required scan paths for the laser head:
Thus the text only becomes "filled" once the job is run on the laser cutter.
Text is generally engraved onto the surface of a piece of material using a sequence of parallel very shallow cuts. These shallow cuts are created by running the laser at very low power and moving it very quickly over the material (high power and slow would cut through the material), in our case this equates to 500mm/s and 10% power for acrylic sheet.
The text is exported as (saved as) an outline path from Inkscape in a dxf file:
In RDWorks the imported text outline path from the dxf file is placed on a layer that is set as "scan" (=engrave). RDWorks automatically generates the required scan paths for the laser head:
Thus the text only becomes "filled" once the job is run on the laser cutter.
Re: svg to dxf
Hello, thank you very much for your answers, much appreciated! I'm not at home at the moment. Back in a while!
Re: svg to dxf
Bas post. I haven't find how to delete it.
Last edited by pfeuh on Sun Jul 07, 2019 5:34 pm, edited 2 times in total.
Re: svg to dxf
Hello,
The .svg file generated in python is here:
The .dxf generated from this .svg file is here:
Thanks for informatrion about engraving text on laser cutter.
The .svg file generated in python is here:
The .dxf generated from this .svg file is here:
Thanks for informatrion about engraving text on laser cutter.