AW: [dxf2gcode-users] The 'mill:' prefix - how and where to apply?

166 views
Skip to first unread message

Christian Kohlöffel

unread,
Oct 13, 2014, 2:50:57 PM10/13/14
to dxf2gco...@googlegroups.com
Hello Mark, you need to rename the layer in your tool which is used to generate the dxf. E.g. AutoCAD. This can not be done in dxf2gcode. Christian


Chatter Mark <ya.chat...@gmail.com> schrieb:

Hi again,
Here I stumbled over the mentioning of that "mill:" prefix. I have to admit that I don't fully understand how and where the layers to be processed can be renamed.

Hoping for another good advice (tm) from the crowd, I say thanks in advance!

Regards,


CM

--
--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-users".
To post a message, send mail to dxf2gco...@googlegroups.com
To unsubscribe, send mail to dxf2gcode-use...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-users?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chatter Mark

unread,
Oct 13, 2014, 5:19:43 PM10/13/14
to dxf2gco...@googlegroups.com


Am Montag, 13. Oktober 2014 20:50:57 UTC+2 schrieb Christian Kohlöffel:
Hello Mark, you need to rename the layer in your tool which is used to generate the dxf. E.g. AutoCAD. This can not be done in dxf2gcode. Christian

 Christian,
in Qcad I can rename a layer, but it refuses to accept a colon ( : ) as a character in the name. It  just ignores that. Does it have to be that exotic?  

Chatter Mark

unread,
Oct 14, 2014, 3:29:27 PM10/14/14
to dxf2gco...@googlegroups.com


Am Montag, 13. Oktober 2014 20:50:57 UTC+2 schrieb Christian Kohlöffel:
Hello Mark, you need to rename the layer in your tool which is used to generate the dxf. E.g. AutoCAD. This can not be done in dxf2gcode. Christian


Hello again, Christian,

the more I think about this, the more I am in doubt if I understand that directive right, specially for the use of Qcad. 

A practical step-by-step example of what to do with a layer in qcad would help me (and potentially others, I guess) tremendously! Thanks!


Regards,

CM

Tim March

unread,
Oct 14, 2014, 10:24:54 PM10/14/14
to dxf2gco...@googlegroups.com

Mark

Maybe I can be of some assistance. Many proprietary cad programs and open-source cad programs use different syntax for their layer names when the file is saved. It most likely will not be to Auto-Cad standards. I have the same problem with the Cad program that I use,  only a little different. The program will allow a colon in the name, but white spaces show up as underscores in DXF2GCODE which does not work. When I reopen the DXF file with my Cad program the white spaces in the layer names are just spaces as I saved it. For the developers of DXF2GCODE to write their program to accept every syntax that different Cad programs save their files with would be impossible. If you want to use the layer MILL function in your layer names with DXF2GCODE may I suggest you try something. Download and install the program called JEDIT, http://www.jedit.org/ it is a open-source free program, you will need a JAVA runtime environment  for the program to function. This works for Windows as well as LINUX. Save a DXF file with QCAD and give a layer a name but instead of using a colon use a exclamation point, (!) everywhere you would need a colon for DXF2GCODE in the layer name, QCAD will do this.  Then open it by right clicking on it and choose open with JEDIT. There is a ton of information in this file, but if you scroll thru you will be able to recognize the code with your layer name. You can edit the file by hand then resave and it will work in DXF2GCODE. But there is a better way, JEDIT has the capability for you to record, (create) a macro to edit the file for you. In the MENUS bar there is a heading called Macros. In sub menu use Record Macro, it will record all of your key strokes. So use the search and replace function to find the MILL! and replace with MILL: Remember to stop recording your macro and to save it. The next time you need to edit a DXF file to work with DXF2GCODE open it with JEDIT and run your macro it will be in the Macro sub menu with the name you gave it when you saved it.

Hope this is of some help

Tim

Timothy March

unread,
Oct 14, 2014, 11:38:11 PM10/14/14
to dxf2gco...@googlegroups.com
Mark

As a note when recording your macro make sure when doing search an replace choose replace all because layer names show up many times in a DXF file. Also I suggest making a separate macro for each option for the layer functions used for DXF2GCODE instead of on long macro. Because you may choose a different option from one DXF to the next.

Tim


On Tuesday, October 14, 2014 9:24:54 PM UTC-5, Timothy March wrote:

Mark

Maybe I can be of some assistance. Many proprietary cad programs and open-source cad programs use different syntax for their layer names when the file is saved. It most likely will not be to Auto-Cad standards. I have the same problem with the Cad program that I use,  only a little different. The program will allow a colon in the name, but white spaces show up as underscores in DXF2GCODE which does not work. When I reopen the DXF file with my Cad program the white spaces in the layer names are just spaces as I saved it. For the developers of DXF2GCODE to write their program to accept every syntax that different Cad programs save their files with would be impossible. If you want to use the layer MILL function in your layer names with DXF2GCODE may I suggest you try something. Download and install the program called JEDIT, http://www.jedit.org/ it is a open-source free program, you will need a JAVA runtime environment  for the program to function. This works for Windows as well as LINUX. Save a DXF file with QCAD and give a layer a name but instead of using a colon use a exclamation point, (!) everywhere you would need a colon for DXF2GCODE in the layer name, QCAD will do this.  Then open it by right clicking on it and choose open with JEDIT. There is a ton of information in this file, but if you scroll thru you will be able to recognize the code with your layer name. You can edit the file by hand then resave and it will work in DXF2GCODE. But there is a better way, JEDIT has the capability for you to record, (create) a macro to edit the file for you. In the MENUS bar there is a heading called Macros. In sub menu use Record Macro, it will record all of your key strokes. So use the search and replace function to find the MILL! and replace with MILL: Remember to stop recording your macro and to save it. The next time you need to edit a DXF file to work with DXF2GCODE open it with JEDIT and run your macro it will be in the Macro sub menu with the name you gave it when you saved it.

Hope this is of some help

Tim

On 10/14/2014 2:29 PM, Chatter Mark wrote:


Am Montag, 13. Oktober 2014 20:50:57 UTC+2 schrieb Christian Kohlöffel:
Hello Mark, you need to rename the layer in your tool which is used to generate the dxf. E.g. AutoCAD. This can not be done in dxf2gcode. Christian


Hello again, Christian,

the more I think about this, the more I am in doubt if I understand that directive right, specially for the use of Qcad. 

A practical step-by-step example of what to do with a layer in qcad would help me (and potentially others, I guess) tremendously! Thanks!


Regards,

CM

--
--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-users".
To post a message, send mail to dxf2gcode-users@googlegroups.com
To unsubscribe, send mail to dxf2gcode-users+unsubscribe@googlegroups.com

See http://groups.google.de/group/dxf2gcode-users?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-users+unsubscribe@googlegroups.com.

Robert Lichtenberger

unread,
Oct 15, 2014, 1:39:50 AM10/15/14
to dxf2gco...@googlegroups.com


Am Montag, 13. Oktober 2014 23:19:43 UTC+2 schrieb Chatter Mark:

 Christian,
in Qcad I can rename a layer, but it refuses to accept a colon ( : ) as a character in the name. It  just ignores that. Does it have to be that exotic?  

Ooops, I was unaware of any kind of restrictions on the layer name in the .dxf - format, therefore I just picked up the groundwork from JP (described in https://groups.google.com/forum/#!topic/dxf2gcode-users/q3hPQkN2OCo ) and made all other layer-control stuff like it.

As a temporary workaround you may try using LibreCAD to rename the layers but we should change the LayerControl stuff in a way that does not require "forbidden" characters.

Robert Lichtenberger

unread,
Oct 15, 2014, 1:44:38 AM10/15/14
to dxf2gco...@googlegroups.com
For reference: http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/index.html?url=WS1a9193826455f5ffa23ce210c4a30acaf-7345.htm,topicNumber=d0e41665 states that:

A layer name can include up to 255 characters (double-byte or alphanumeric): letters, numbers, spaces, and several special characters. Layer names cannot include the following characters:

< > / \ “ : ; ? * | = ‘

As for an example of how to use the various LayerControl stuff, I've written a blog post about that topic; unfortunately this is in German so don't know if that helps. I could translate it to English however, if requested.

Chatter Mark

unread,
Oct 15, 2014, 6:18:48 AM10/15/14
to dxf2gco...@googlegroups.com
Robert,

thanks for your reply. And sorry to none-but-english speaking readers for some German here now!

Mein Deutsch ist trotz Bescheinigung für verhandlungssicheres Englisch (man braucht da offenbar nicht so viel... :)  ) nach (numerisch) 60jährigem Gebrauch immer noch besser als mein Englisch. ;)

dxf2gcode schreibt aber auch Zeilen, die länger als 255 Zeichen sind. Die meckert linuxcnc dann als zu lang an.
Die ersten beiden Zeilen aus einer gestern abend  entstandenen .ngc - Datei:

(Generiert mit: DXF2GCODE, Version: PyQt4 Beta, Datum: $Date:: 2014-02-11 12:27:10#$)(Erstellt aus der Datei: F:/caddaten/misc/millthissimple03.dxf)(Zeit: Tue Oct 14 23:25:16 2014)G21 (Units in millimeters) G90 (Absolute programming) G64 (Default cutting) G17 (XY plane) G40 (Cancel radius comp.) G49 (Cancel length comp.)
G0 Z  
15.000


Alles bis "comp.)" in einer Zeile. Mit UltraEdit sind die Kommentare schnell weggeputzt, aber für eine effiziente Umgebung wäre es nützlich, alle Kommentarfunktionen einfach deaktivieren zu können, und dann möglichst ein gcode-Befehl pro Zeile. Spart dann schon mal etwas vergleichsweise sinnfreie Arbeit.
Nebenbei - das erste im Kommentar stehende Datum - bezieht sich das auf den Scriptbau? Mein Systemkalender hat den Februar da nicht reinpraktiziert!

Die zugrundeliegende dxf-Datei hatte ich mit vcarve pro erzeugt. Das akzeptiert in der Eingabe zwar :e im Namen, schreibt dann aber an deren Stelle Tiefstriche, aka Viertelgeviert.

Mein Vorschlag, die mit MILL: verknüpfte Eigenschaft innerhalb von dxf2gcode in einem Auswahlfenster zu schalten, bleibt aktiv.

Back to english:
If I understand you and Tim right, changing MILL* to MILL: in the layernames in the dxf file should allow dxf2gcode to ackowledge that as a directive to submit the data to a tool compensatiion, right? I'll try that later today.

For the time being, thanks for your advice and assistance

Best regards,

Chattermark (in german: 'Rattermarke' - but that nickname is a popular one, therefor the english term.)

Chatter Mark

unread,
Oct 15, 2014, 6:31:43 AM10/15/14
to dxf2gco...@googlegroups.com
Robert, that blogpost is very informative. I think I've learned now that dxf2gcode does nothing but setting the tool compensation flag by G41 / G42 etc. for linuxcnc - which performs the real compensation then. Right?

Regards,

CM


Am Mittwoch, 15. Oktober 2014 07:44:38 UTC+2 schrieb Robert Lichtenberger:

Robert Lichtenberger

unread,
Oct 15, 2014, 6:58:30 AM10/15/14
to dxf2gco...@googlegroups.com


On Wednesday, October 15, 2014 12:18:48 PM UTC+2, Chatter Mark wrote:
Robert,

thanks for your reply. And sorry to none-but-english speaking readers for some German here now!

Mein Deutsch ist trotz Bescheinigung für verhandlungssicheres Englisch (man braucht da offenbar nicht so viel... :)  ) nach (numerisch) 60jährigem Gebrauch immer noch besser als mein Englisch. ;)

dxf2gcode schreibt aber auch Zeilen, die länger als 255 Zeichen sind. Die meckert linuxcnc dann als zu lang an.
Die ersten beiden Zeilen aus einer gestern abend  entstandenen .ngc - Datei:

(Generiert mit: DXF2GCODE, Version: PyQt4 Beta, Datum: $Date:: 2014-02-11 12:27:10#$)(Erstellt aus der Datei: F:/caddaten/misc/millthissimple03.dxf)(Zeit: Tue Oct 14 23:25:16 2014)G21 (Units in millimeters) G90 (Absolute programming) G64 (Default cutting) G17 (XY plane) G40 (Cancel radius comp.) G49 (Cancel length comp.)
G0 Z  
15.000


Das ist jetzt seltsam und ein Bug, bei mir sind da Zeilenumbrüche drinnen:

(Generated with: DXF2GCODE, Version: PyQt4 Beta, Date: $Date:: 2014-02-11 12:27:10#$)
(Created from file: /home/rli/devel/modellbau/KIS/KIS.dxf)
(Time: Sun Mar 16 14:51:45 2014)

G21 (Units in millimeters) G90 (Absolute programming) G64 (Default cutting) G17 (XY plane) G40 (Cancel radius comp.) G49 (Cancel length comp.)

Eventuell hat es was mit Windows zu tun (Zeilenumbruch CR vs CR/LF)?
 
 
Alles bis "comp.)" in einer Zeile. Mit UltraEdit sind die Kommentare schnell weggeputzt, aber für eine effiziente Umgebung wäre es nützlich, alle Kommentarfunktionen einfach deaktivieren zu können, und dann möglichst ein gcode-Befehl pro Zeile. Spart dann schon mal etwas vergleichsweise sinnfreie Arbeit.
Nebenbei - das erste im Kommentar stehende Datum - bezieht sich das auf den Scriptbau? Mein Systemkalender hat den Februar da nicht reinpraktiziert!

Die zugrundeliegende dxf-Datei hatte ich mit vcarve pro erzeugt. Das akzeptiert in der Eingabe zwar :e im Namen, schreibt dann aber an deren Stelle Tiefstriche, aka Viertelgeviert.

Mein Vorschlag, die mit MILL: verknüpfte Eigenschaft innerhalb von dxf2gcode in einem Auswahlfenster zu schalten, bleibt aktiv.
Man kann ja ganz ohne MILL: auch arbeiten, nur muss man dann die Fräsparameter halt jedes Mal händisch einstellen, wenn man die Datei neu lädt. Eine Alternative dazu wäre eine "Beiwagendatei", welche die Fräsparameter parallel zur .dxf-Datei speichert. Da das aber aufwändiger zu implementieren war und ich "alles in einer Datei" bevorzuge, habe ich halt alle LayerControl sachen so gemacht, wie JP ursprünglich die MILL-Geschichte.

 

Back to english:
If I understand you and Tim right, changing MILL* to MILL: in the layernames in the dxf file should allow dxf2gcode to ackowledge that as a directive to submit the data to a tool compensatiion, right? I'll try that later today.
Yes tool radius compensation is done by LinuxCNC.

But the "MILL: "-naming of a layer only specifies the diameter of the tool. Whether any compensation is done or not is controlled by the G4x-state of each shape, which can be changed by the context menu of each shape. If you have "automatic cutter compensation" selected in the menu, dxf2gcode tries to set the compensation automatically for closed shapes.


Robert Lichtenberger

unread,
Oct 15, 2014, 6:59:00 AM10/15/14
to dxf2gco...@googlegroups.com


On Wednesday, October 15, 2014 12:31:43 PM UTC+2, Chatter Mark wrote:
Robert, that blogpost is very informative. I think I've learned now that dxf2gcode does nothing but setting the tool compensation flag by G41 / G42 etc. for linuxcnc - which performs the real compensation then. Right?
Right.

Chatter Mark

unread,
Oct 16, 2014, 4:29:45 PM10/16/14
to dxf2gco...@googlegroups.com

Thanks to all your invaluable advices I just finished the first pretty flawless milling on that little machine. Specially Robert's mentioning of the relevance of setting the tool table straight in his blogpost  led to the final success. To my taste, this is not stressed pronouncedly engough in the Linuxcnc-setup manual. In the end, it was straightforward, of course. But the linuxcnc-novice might easily believe that setting the tool parameters at an earlier stage like in dxf2gcode is sufficient. Oh well...

So, for the time being, I have to thank you all for your assistance at this stage. Be prepared for more questions... :)

Regards and cheers,

CM

Reply all
Reply to author
Forward
0 new messages