dxf2gcode / lathe; why is x doubled?

63 views
Skip to first unread message

mr

unread,
May 23, 2021, 1:09:32 PM5/23/21
to dxf2gcode-dev
Hi,

in postpro/postprocessor.py

def make_print_str(self, keystr):
"""
This is the main function which converts the Keyvalues given in the
Postprocessor Configuration into the values.
@param keystr: String in which all keywords are to be
replaced by the variables etc.
@return: Returns the string with replaced keyvars (e.g. %Z is replaced
by the real Z value in the defined Number Format.
"""
if g.config.machine_type=='lathe':
fac = 2
else:
fac = 1

there's this code in dxf2gcode, why is the multiplier 2 for the lathe?
Is anyone really using it like that and could explain why it's done that way?

the way I use linuxcnc I don't really need it, but maybe there's some idea behind that. 

Br,
Markus

Markus Rechberger

unread,
May 23, 2021, 2:15:06 PM5/23/21
to dxf2gc...@googlegroups.com
I'm answering it myself.

Since annotation didn't work in the sourceforge interface (or that
feature is not there at all)
2278e563 ( neveruml 2015-10-28 03:15:53 +0100 643)
if g.config.machine_type=='lathe':
00000000 (Not Committed Yet 2021-05-23 14:06:14 -0400
644) fac = 1
551acadc (Christian Kohl<C3><B6>ffel 2014-11-23 22:21:07
+0000 645) else:
551acadc (Christian Kohl<C3><B6>ffel 2014-11-23 22:21:07
+0000 646) fac = 1

----

commit 551acadcb892398b9123e07442d21dcfd802251c
Author: Christian Kohl<C3><B6>ffel <christian-...@t-online.de>
Date: Sun Nov 23 22:21:07 2014 +0000

Changes according to:
https://groups.google.com/forum/#!topic/dxf2gcode-users/LpHqC8Jf0mE
----

> There are two additional details that I would like to massage in the code. The most important one is that my lathe control (1980 Fanuc 5T)
> expects to see all X axis moves described as Diameter moves

I usually use linuxcnc in radius mode, not in diameter mode that's why
I was confused about that feature.

So everything's ok.
> --
> --
> You received this message because you subscribed to the Google
> Groups-group "dxf2gcode-dev".
> To post a message, send mail to dxf2gc...@googlegroups.com
> To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com
> See http://groups.google.de/group/dxf2gcode-dev?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 a topic in the Google Groups "dxf2gcode-dev" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/dxf2gcode-dev/7GfXF0GaRG0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to dxf2gcode-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dxf2gcode-dev/9de2780b-0873-4b36-942f-d884d9ce270bn%40googlegroups.com.

Christian Kohlöffel

unread,
May 24, 2021, 4:23:59 AM5/24/21
to 'Timo Birnschein' via dxf2gcode-dev
Hi Markus, I am not aware of really someone is using it. But I guess it's the calculation from Radius to Diameter. Some machines may need the Diameter on the Y axis what I still think to remember. Maybe an option in the postprocessor would be adequate to handle this.
Regards Christian

--
--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-dev".
To post a message, send mail to dxf2gc...@googlegroups.com
To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-dev?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-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-de...@googlegroups.com.

Markus Rechberger

unread,
Jun 17, 2021, 11:45:43 AM6/17/21
to dxf2gc...@googlegroups.com
Hi,

linuxcnc by default is in radius mode.
G7 ... Lathe Diameter Mode
G8 ... Lathe Radius Mode
it's no problem it just has to be known...

Best Regards,
Markus
> To view this discussion on the web visit https://groups.google.com/d/msgid/dxf2gcode-dev/CAPOA9D0BVyF1o-k2OJs5eJfDZLiZdY4o9AkbNUH_oNx1jNqwxg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages