Gcode tools - lathe extension develop

cnc-club.ru for English speaking users

Gcode tools - lathe extension develop

Сообщение Nick » 08 апр 2010, 09:25

Gcode tools - lathe extension develop



Questions to discus


  1. Cutting tool parameters
  2. Additional lathe parameters
  3. Lathe's Gcode features
  4. Special places
  5. ...

Desired features list


  1. Special mode for 4axis mills
  2. Automatic flip along axis

Awaiting of realization


  1. Automatic flip along axis

Done


  1. Path calculation
  2. Export path to gcode
  3. Defailt X and Z axis remap
Аватара пользователя
Nick
Мастер
 
Сообщения: 22398
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1475
Заслуга: Developer
Медальки:

Re: Gcode tools - lathe extension develop

Сообщение alfcnc » 03 авг 2010, 23:25

First try in real use condition of lathe extension:

The machine configuration is a Mill with a little motor for rotary axis the long of the X axis.
Gcodetool extension lathe generate gcode in XY mode remap.

Making a wood ball...

Gcode tools - lathe extension develop boule.png


boule1.svg
(385.8 Кб) Скачиваний: 647


On turning...

Gcode tools - lathe extension develop turning_ball.jpeg


The result.... :

Gcode tools - lathe extension develop turning_ball_finish.jpeg


It have some little bug for finishing pass that doesn't subdivise the finishing width by the number of subdivision set...
It's not so easy to set the good direction for the path to tell gcodetools to go left to righ or righ to left... perhaps have you a trick... i make more try
and reports you another bugs...
The first try is nice for me ... good results to come.

Have a nice day :beer:
alfcnc
Кандидат
 
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester

Re: Gcode tools - lathe extension develop

Сообщение Nick » 04 авг 2010, 09:46

Hi! Nice job!
Thanks for the photos!
I've been doing some 3d modelin/drawing/rendering and photo of your wooden ball looks like a material test from the Vray :).

It have some little bug for finishing pass that doesn't subdivise the finishing width by the number of subdivision set...

It's not a bug it's a feature :D! The subdivision is not needed there. If you are cutting a ball you can cut it using only one gcode command G02 because ball' projection is a circle ;).

It's not so easy to set the good direction for the path to tell gcodetools to go left to righ or righ to left... perhaps have you a trick...

Sure I have a trick :). It's in the FAQ... Oooppps I have forgot to publish it in English :oops:. But thanks to Dormouse who have made this job. So see his FAQ http://kalyaev.com/2010/20100408/inkscape-faq.html.
In a nutshell:
To check the direction of the path add middle or end markers that looks like an arrow pointing to the End. (Ctrl+Shift+F -> Stroke Style -> set stroke width more than '0', Middle markers Arrow2MEnd.)
To change paths direction do the following Path->Reverse.
That's it. Easy, isn't it?

I have some advises:

  1. Remove that vertical line from the left. Material width should be defined in the lathe window.
  2. Add horizontal line at level 0 from the right. Doing this you avoid high depth step during the fine cut at the right.
    Gcode tools - lathe extension develop 0068 gcode tools lathe.png
  3. Define depth step at the tools parameters.
  4. Define material width at lathe's window.
    Gcode tools - lathe extension develop 0066 gcode tools lathe.png
  5. Some advises how to draw your scene:
    1. Draw a circle and a rectangle.
    2. Move circle until it's center not on the rectangle's edge. It will be easy if you turn on snapping and grab circle near the left or right points.
    3. Add them together (Ctrl+Shit+"+")
    4. Add rectangle at the left to hold your ball while it's being cut.
    5. Add them together (Ctrl+Shit+"+")
    6. Using knots editing tool (F2) remove unnecessary knots.
    Gcode tools - lathe extension develop 0067 gcode tools lathe.png
  6. Image that just showing that reverse works:
    Gcode tools - lathe extension develop 0070 gcode tools lathe.png


i make more try
and reports you another bugs...
The first try is nice for me ... good results to come.


Will be waiting for new results.
Аватара пользователя
Nick
Мастер
 
Сообщения: 22398
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1475
Заслуга: Developer
Медальки:

Re: Gcode tools - lathe extension develop

Сообщение alfcnc » 04 авг 2010, 12:56

"
It have some little bug for finishing pass that doesn't subdivise the finishing width by the number of subdivision set...


It's not a bug it's a feature :D! The subdivision is not needed there. If you are cutting a ball you can cut it using only one gcode command G02 because ball' projection is a circle ;). "



Hum I think you have don't understand me for this feature....
The feature i was thinking for this is that for have a good finishing surface at the end of cut require to cut very thin depht of material...
So when the tool arrive to finishing depth for example 1 mm and if have set 10 step the tool must cut all the shape Ten time with widht of 0,1mm
depht minus each pass... until arrive to the end of the last shape cuting.

Because if i cut in one time G02 the depht is too big and for example soft wood is tear... and to suppress this tearing effect of fiber
I must cut 3 or 5 pass with very thin depht befor arrive to final pass...

Or actualy if I set 1 mm fine cut width and cut count to 10 the gcode generate do 10 time the end shape.... and doesn't subdivide
the 1 mm depht to 10 depth cutting thin pass...

Excuse me if i have bad explain you this feature on the start of work...

So another solution is to do Twice the gcode generation ... One with roughing and another one just for finish... whith two sheet in inkscapte or two gcode file...but less beautifull and practical...
alfcnc
Кандидат
 
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester

Re: Gcode tools - lathe extension develop

Сообщение alfcnc » 04 авг 2010, 13:07

For the reverse funtion very Nice... It's so obvious that i don't understand why i haven't see it before... :oops:
alfcnc
Кандидат
 
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester

Re: Gcode tools - lathe extension develop

Сообщение Nick » 04 авг 2010, 13:08

Now I get it... Ok, I'll try to do it...
Аватара пользователя
Nick
Мастер
 
Сообщения: 22398
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1475
Заслуга: Developer
Медальки:

Re: Gcode tools - lathe extension develop

Сообщение alfcnc » 04 авг 2010, 13:46

Just for illustrate and show you the errors... of no subdivide of end cutting depth and why i have a vertical line to the left of end of drawing...
because gcodetools go wrong in depht at the start or end of cutting depending the direction...

See on picture...and in gcode file were Y go to negative value....

Gcode tools - lathe extension develop lathe_error_end_cutting.png


The svg...

lathe_error_end_cutting.svg
(32.72 Кб) Скачиваний: 692


The ngc...

lathe_error_end_cutting.ngc
(5.25 Кб) Скачиваний: 503
alfcnc
Кандидат
 
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester

Re: Gcode tools - lathe extension develop

Сообщение Nick » 04 авг 2010, 16:04

alfcnc писал(а):Just for illustrate and show you the errors... of no subdivide of end cutting depth and why i have a vertical line to the left of end of drawing...
because gcodetools go wrong in depht at the start or end of cutting depending the direction...

See on picture...and in gcode file were Y go to negative value....

lathe_error_end_cutting.png


The svg...

lathe_error_end_cutting.svg


The ngc...

lathe_error_end_cutting.ngc


There was a bug... while doing fine cutting penetration g00 was path.y - fine_cutting_width instead of path.y + fine_cutting_width.
I'll correct this in some minutes...
Аватара пользователя
Nick
Мастер
 
Сообщения: 22398
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1475
Заслуга: Developer
Медальки:

Re: Gcode tools - lathe extension develop

Сообщение Nick » 04 авг 2010, 16:30

Revision 139



I've add a parameter "Create fine cut using" and two options:
"Move path" just moves original path up. And so creates a number of fine cuts. Gives worse results than offset but there should not be bugs.

"Offsets" offsets original path up. And so creates a number of fine cuts. Gives the best result but could be bugs due to offsets bugs. You can always try it first and in case of bugs try to add some knots to the path near the problem places or just use the first option.

I've changed the inx file so you'll have to run python create_inx.py before using separate lathe window.

Here's an illustration:
Вложения
Gcode tools - lathe extension develop 0071 gcode tools lathe fine cut.png
Аватара пользователя
Nick
Мастер
 
Сообщения: 22398
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1475
Заслуга: Developer
Медальки:

Re: Gcode tools - lathe extension develop

Сообщение alfcnc » 04 авг 2010, 18:01

Ok ! I'll test...
alfcnc
Кандидат
 
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester

Re: Gcode tools - lathe extension develop

Сообщение Nick » 04 авг 2010, 18:06

Oppps wait a minet I've got to do the push.... :oops:
Аватара пользователя
Nick
Мастер
 
Сообщения: 22398
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1475
Заслуга: Developer
Медальки:

Re: Gcode tools - lathe extension develop

Сообщение Nick » 04 авг 2010, 18:11

Now you can try it... Revision 140.
Аватара пользователя
Nick
Мастер
 
Сообщения: 22398
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1475
Заслуга: Developer
Медальки:

Re: Gcode tools - lathe extension develop

Сообщение alfcnc » 04 авг 2010, 19:41

Ok ! That's come great... but little error with offset...

The fine cuting path goes out on the left...
And on the right start at curious position for some of them....

Gcode tools - lathe extension develop finishing_offset_error.png


svg file with trajectory and setting...

boule1.svg
(368.04 Кб) Скачиваний: 801


if setting 1mm fine cut and 5 count the right is good... but left alwas go out...

Gcode tools - lathe extension develop more_thin_finishing_pass_error_on_left.png



Hum Curious ! I see now with different setting all is ok... curious..perhaps this can help you to find
were is the bug..
Вложения
Gcode tools - lathe extension develop fine_cuting_error_ok_with_this_parameters.png
alfcnc
Кандидат
 
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester

Re: Gcode tools - lathe extension develop

Сообщение Nick » 04 авг 2010, 21:49

Revision 142


I've found the bug. While calculating line and Bezier curve intersection we have to solve cubic equation and take only real roots that are 0<=root<=1. But due to calculation tolerances root becomes 1.000000001 which was ignored. Now we take roots that's abs(root.imag)<1e-7 = 0.0000001 and -0.0000000001<=root.real<=1.0000000001.

Thanks for the bug report :D!
Аватара пользователя
Nick
Мастер
 
Сообщения: 22398
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1475
Заслуга: Developer
Медальки:

Re: Gcode tools - lathe extension develop

Сообщение alfcnc » 05 авг 2010, 11:47

:cheesy: YES YES YES ....very very nice...
And I think that's correct some problem with Area....because I have some strange things look like this when working with little value... ;)
alfcnc
Кандидат
 
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester

Re: Gcode tools - lathe extension develop

Сообщение alfcnc » 05 авг 2010, 12:39

Hi despit the debugging another bug arrive... :think:

With some value gcodetools give a zero division error see on screen capture...

Gcode tools - lathe extension develop lathebug_rev142_divisionerror.png


And with another value that's work but the before last fine cuting path is lost....
see another screen capture...

Gcode tools - lathe extension develop lathe_rev_142_one_line_missing.png
alfcnc
Кандидат
 
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester

Re: Gcode tools - lathe extension develop

Сообщение Nick » 05 авг 2010, 13:28

Revision 142


I think I've fixed first problem.
I've added tolerance=0.0000000001 into csp_split_by_two_points function.

The second problem caused by offset's clipping errors. I really do not know how to fix them right now. You can add some knots to path to do a "local" fix.
Аватара пользователя
Nick
Мастер
 
Сообщения: 22398
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1475
Заслуга: Developer
Медальки:

Re: Gcode tools - lathe extension develop

Сообщение alfcnc » 06 авг 2010, 15:57

Hum rev 142 bug bug....
the fine cut count don't work any time if generate path cutting from left to right.... often division error with any settting and
when that work for example with 0.6 mm fine cut width and 3 fine cut count it have any fine cut generate...
And it's more more hard to find value that works with this direction... perhaps have you missing some subroutine for this direction... :!:
alfcnc
Кандидат
 
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester

Re: Gcode tools - lathe extension develop

Сообщение alfcnc » 06 авг 2010, 16:00

alfcnc писал(а):Hum rev 142 bug bug....
the fine cut count don't work any time if generate path cutting from left to right.... often division error with any settting and
when that work for example with 0.6 mm fine cut width and 3 fine cut count it have any fine cut generate...
And it's more more hard to find value that works with this direction... perhaps have you missing some subroutine for this direction... :!:



Hum else if i add more and more knot... like you have tell me to do.
alfcnc
Кандидат
 
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester

Re: Gcode tools - lathe extension develop

Сообщение Nick » 06 авг 2010, 21:51

Could you post your svg and parameters please.

PS We have started to develop a Postprocessing feature. Which will enable axis flipping/remaping and other features...
Revision 145 includes beginning of Postprocessing class.

Postprocesing will look like a script with commands that are separated by semicolon.
command(parameters,..,parameter);command(parameters,..,parameter);command(parameters,..,parameter);command(parameters,..,parameter);

At the moment two one function is available: remap and remapi, they are the same but ramapi works case insensitive.
remap command has simple syntax:

remap("change from"->"change to",...,"change from"->"change to"). This function works almost the same as replace, the only difference that it do all replaces together not one after another.
I'll show the difference at the example:
lets take the code: "x 10 y 20"
remap("x"->"y","y"->"z") will give "y10 z20"
but if we'll do to consecutive replaces we'll have the following:
Original: "x 10 y 20"
after replace "x" to "y" : "y 10 y 20"
after replace "y" to "z" : "z 10 z 20"
See the difference?

Hmmmm... I thin we should start new thread to discuss postprocessing...
Аватара пользователя
Nick
Мастер
 
Сообщения: 22398
Зарегистрирован: 23 ноя 2009, 16:45
Откуда: Gatchina, Saint-Petersburg distr., Russia
Репутация: 1475
Заслуга: Developer
Медальки:

Re: Gcode tools - lathe extension develop

Сообщение alfcnc » 06 авг 2010, 22:17

Ok ! process, processing...

The svg file is the same than post just previous this post... Boule1.svg...
were I have just change the direction of cutting path from "right to left" to
" left to right" with revert path... you'll have the bug with about all the value
you can set for fine cut.... very easy to reproduce...
alfcnc
Кандидат
 
Сообщения: 98
Зарегистрирован: 02 апр 2010, 19:10
Репутация: 0
Заслуга: Tester

Пред.След.

Вернуться в English forum

Кто сейчас на конференции

Зарегистрированные пользователи: Argon-11, ArtK, Bing [Bot], ByCNC, cncmybox, daemon78, Dimka_almighty, Ershoff, evgenbaraba, evgenymcp, FL@gMan, Google [Bot], ilya37rus, Kiriller, Lunatic, Malyarka74, Mamont, mikehv, MX_Master, Nik.M, NikolayUa24, Nonstopich, sas_75, sazn86, sima8520, smoke, Something, spryt, SVP, trafbite, vershininv, vladumur, wenji, Yandex [bot], Zobakka, Курдль, Леонид Владимирович

Поделиться

Reputation System ©'