Standardized test shapes

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Standardized test shapes

Post by chrisb »

I can see the residuals in the simulation, but not in the paths:
Bildschirmfoto 2019-06-04 um 19.09.20.png
Bildschirmfoto 2019-06-04 um 19.09.20.png (20.26 KiB) Viewed 4106 times
You use a 6mm mill so everything should be removed from the 11.8 mm material.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: Standardized test shapes

Post by freman »

Thanks Chris,

So what you have done is a geometric calculation, you are not talking about the Gcode paths. I see that same resid in the real cut as in the sim, so it seems to indicate that the Gcode path is leaving some material.

Would you agree that is the correct conclusion?
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Standardized test shapes

Post by chrisb »

I will have a look at the GCodes.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: Standardized test shapes

Post by freman »

GRBL can handle G2 G3 and G91.1 arc codes. It interpolates them internally to straight lines. Having intimate knowledge of the hardware this is the best place for that to be done.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Standardized test shapes

Post by chrisb »

There is indeed a (precision?) issue:
Bildschirmfoto 2019-06-04 um 22.25.15.png
Bildschirmfoto 2019-06-04 um 22.25.15.png (11.58 KiB) Viewed 4080 times

Code: Select all

(cyl-pocket0)
G0 Z13.000000
G0 X36.085881 Y-8.156760
G1 F10.000000 X36.085881 Y-8.156760 Z9.000000
G1 F40.000000 X8.156760 Y-36.085881 Z9.000000
G3 F40.000000 I-8.142926 J36.072048 K0.000000 X36.085881 Y-8.156760 Z9.000000
G1 F10.000000 X36.085881 Y-8.156760 Z7.000001
G1 F40.000000 X8.156760 Y-36.085881 Z7.000001
G3 F40.000000 I-8.142926 J36.072048 K0.000000 X36.085881 Y-8.156760 Z7.000001
G0 Z13.000000
- The left lower corner of the path has the coordinates X8.156760 Y-36.085881 (line 4 above).

- The center of the model's arc is the origin, thus the offset I and J should be the exact negative values of X and Y, i.e.
I-8.156760 J36.085881

- Alas there is a small offset in line 5 (G3 ...) of roughly 1/100 in each direction:
I-8.142926 J36.072048
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: Standardized test shapes

Post by freman »

Thanks for digging into that. I don't see one "centieme" as a problem, that's about half a thou. IIRC I saw an option of 10 microns ( aka 0.01mm) as an accuracy option somewhere in the interface, so presumably that could be tightened, at the expense of calculation time.

I drive my steppers in half step mode and I think that is about the same degree of precision.

1.8 deg /step on 5mm pitch in half step mode = 0.0125mm

Is it possible to measure the residual thickness in the simulator? IMO what I am seeing cutting wood must be several thou thick (maybe 10 thou), it's not a fag paper thickness. Also if you look at the photo of the piece I posted, you will see that the cruft was in the middle of the arc , not at the end point. It was most evident on the side pointed to by the gouge.

For the moment, I cannot see how you can define an arc with just two IJ points. You need three points or two points and a radius to specify and arc.

Image
Last edited by freman on Tue Jun 04, 2019 9:55 pm, edited 1 time in total.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Standardized test shapes

Post by chrisb »

I have simplified the example. In the attached file the left lower end of the Path arc should be at
X0 Y-37
This is not the case, they are at
X0.007285 Y-36.992715 instead.

Furthermore the parameters I and J should accordingly have the values I0 J37. Or the should have the negative offsets of the real X and Y values, which they haven't either, they are at

I0.004085 J36.987868
Attachments
diamond-circ-sqr-2-resid_cb.FCStd
(26.01 KiB) Downloaded 75 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Standardized test shapes

Post by chrisb »

I had thought that precision was used only for approximations of non cirular curves.
If I set accurracy to 10nm I get these very precise values:

Code: Select all

G1 F40.000000 X0.000099 Y-36.999901 Z9.000000
G3 F40.000000 I0.000057 J36.999836 K0.000000 X36.999992 Y-0.000008 
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: Standardized test shapes

Post by freman »

I just ran the sim on the model which I cut in wood. I zoomed in on the arcs to measure the residuals. It shows 92.46 microns worst case. About 0.1mm.

That is the sim's approximation to the arc, not what my GRBL necessarily does with it.

I think it may be an accumulation of errors: 1/100th in the GCODE; some inaccuracy in GRBL's segmentation; a tad more in the stepper increments, plus some mechanical flexing.

The fact that it is on one side is curious but it is at 45 deg. , not on the X or Y reversal where you would expect backlash to show up.

I may try reducing the geometric tolerance to 2um in FreeCAD and look at the corresponding setting for GRBL's arc linearisations.

Thanks for you input, it has pointed me in the right direction.
Attachments
sim-snip.png
sim-snip.png (7.35 KiB) Viewed 4049 times
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: Standardized test shapes

Post by freman »

Here, finally, is the test block I wanted to make with the 10mm steps. This should be realisable with an end mill long enough to plunge 31mm into the stock. 30mm of depth should give an indication of z perpendicularity wrt X and Y.

I have not reduced the geometric accuracy limit as discussed above yet and it would be good to know how to leave tabs to control the work-piece when doing a final cut to release it.
Attachments
neg-test-OK.FCStd
(85.08 KiB) Downloaded 88 times
Post Reply