Request G6, Ellipse and G7, bezier curve

More
6 years 5 months ago - 6 years 5 months ago #168776 by Grotius
Hi,

I have a programmer request for adding a G6, Ellipse and a G7, Bezier curve to the Linuxcnc source code.

This request is done because the cubic spline G5, is already available for Linuxcnc. For my cam software i want
the possiblily to output G5, G6 and G7 code format's. This would be inline with a uniform program output.

At this moment i see a non uniform output for linuxcnc happening :
We can output a cam G5 for spline, but we can only output fragmented linestrips to cnc a Ellipse or Bezier curve.


Attached c/c++ basic function's that can be adapted to the Linuxcnc Gcode intepreter with minimal changes.
This tiny step forward in linuxcnc source code, is a huge step for cnc cam program's. The power of
a G6 and G7 output is that the cam program does not have to facetate a ellipse into a fragmented linestrip. This results in
thousand lines of code when the cam program's calculate a very accurate cnc path. Let linuxcnc do this real time calculation
while the machine is moving.

I hope some linuxcnc programmer will pick this up and put it in the next Linuxcnc release.

WIch Gcode Numbers are used, doesn't matter for me. G6 and G6.1 are fine for example. G7 is already used for lathe.

Warning: Spoiler!


Warning: Spoiler!
Last edit: 6 years 5 months ago by Grotius.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago #168784 by rodw
Grotius, I wish I knew more about the internal code but you gave me an excuse to read a bit more of it

Can you give some gcode examples of how you think these could be used in a Gcode file?
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago #168790 by Grotius
Hi Rod,

Can you give some gcode examples of how you think these could be used in a Gcode file?
Sure,

Attached example is in line with current Gcode programming style.

For ellipse the example is an open ellipse, the ellipse itself is defined under a angle. So the most difficult ellipse example
can be done in 1 line of gcode.

For bezier curve the input is like the cubic spline. I,J are first control points. P,Q are second control points.
Gcode can be done in 1 line of gcode.

The following user(s) said Thank You: tommylight, rodw

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago - 6 years 4 months ago #170942 by Grotius
Okey,

After some research about the current linuxcnc G5 Cubic splines and G5.1 Quadratic splines i came to the conclusion yesterday this
type of splines are not compatible with following open source programs :

Freecad
Inkscape
Librecad (uses two types of splines)
Cadcam

The linuxcnc G5 Cubic splines and G5.1 Quadratic splines are in my opinion not preferred to use for robot trajectory.
The perfect spline to use to stay in line with above programs : mathworld.wolfram.com/CubicSpline.html
image missing https://mathworld.wolfram.com/images/eps-gif/CubicSpline_700.gif

What we miss is the G code command for a Ellipse and Bezier curve and a Gcode command for
a cubic spline that is constructed of piecewise third-order polynomials.

So i can do 3 things.

1. Lean back in my chair and do nothing about it.
2. Post this on the forum and hope someone will add it to the source code.
3. Add it to the linuxcnc source code myself.

What would you do? :laugh:

Imagine the above criteria is integrated in the linuxcnc source code. The G-code output will reduce with 80-96%.
The cnc machine will be more accurate to the path, because it no longer depends on interpolating the path over 1000+ line segments,
wich are not interpolated as should be in my opinion.
Last edit: 6 years 4 months ago by Grotius.

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago #170944 by tommylight
Might be better to post that question on the LinuxCNC IRC channel as most of the developer hang out there.
webchat.freenode.net/?channels=%23linuxcnc
It requires registering the nic to be able to post, due to spammer protection.
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago #170951 by rodw

Grotius wrote: Okey,

So i can do 3 things.

1. Lean back in my chair and do nothing about it.
2. Post this on the forum and hope someone will add it to the source code.
3. Add it to the linuxcnc source code myself.
.


In my experience, the only way to make it happen is option 3. But 1 is a lot easier.
I also want to make some changes to the core code. Maybe we can work together...
I think the new G code will need to align with an existing gcode flavour so that there is post processor support.
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

Time to create page: 0.253 seconds
Powered by Kunena Forum