Hi,
i try to make a new vakuum desk for my router, and need to drill about 2000 holes for that.
Because FC needs a very long time to create a array for 2000 holes, i made only one hole, create a drilling path from it and made a Array with path.
The resulting gcode works (tested on LinuCNC) but the whole code contends much unnedet lines.
FC shows this output for the array:
The big amount of rapid movements are only a display problem. If i import the FC gcode at the machine, the done path will be shouwn correct, from one hole to the next.
The gcode Path WB creates looks like that:
The code don't need the lines between the the different drilling lokations. If i reduce it to:
both codes are working, the machine makes the same operation.
It works on that way to, and if it's more easy to programm... why not.... But repeading only the operation, without the only one time needed commands and comments, minors the code very much... in this example from about 16000 to 2000 lines.
a lot of unneeded lines gcode if using array
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
a lot of unneeded lines gcode if using array
Last edited by herbk on Thu Oct 05, 2017 5:39 pm, edited 1 time in total.
Gruß Herbert
Re: a lot of unneeded lines gcode if using array
Hi herbk,
I kind of agree - array generates a lot of redundancy. But getting rid of that will probably be difficult. Right now, the Array command simply creates a copy of the G-Code. Getting rid of comments would be easy of course, but at least I don't want that every time, so that should be enabled by some checkbox in the Array command. To make it more intelligent, the system would need to know about modality of G-Code, so if we already are in G90 mode, it would be removed from the copies. Or if Z is already 16, the rapid G0 Z16 would be removed and so on.. Those could probably be done, but it might be risky business, I don't know if all CNC controllers handle modality the same way. I might even consider making that logic into post processor instead of all the PathOps..
I kind of agree - array generates a lot of redundancy. But getting rid of that will probably be difficult. Right now, the Array command simply creates a copy of the G-Code. Getting rid of comments would be easy of course, but at least I don't want that every time, so that should be enabled by some checkbox in the Array command. To make it more intelligent, the system would need to know about modality of G-Code, so if we already are in G90 mode, it would be removed from the copies. Or if Z is already 16, the rapid G0 Z16 would be removed and so on.. Those could probably be done, but it might be risky business, I don't know if all CNC controllers handle modality the same way. I might even consider making that logic into post processor instead of all the PathOps..
Re: a lot of unneeded lines gcode if using array
Doesn't solve the array problem, and it might not work at all - I was wondering if you would be better off creating those 2000 holes in the model (which also has an array feature so it should be about the same amount of work) and use the "Reset" feature of the Drilling operation - it should find all of them and generate more efficient g-code.
Re: a lot of unneeded lines gcode if using array
Hi Markus,
to buid the array of 2000 "drills" is not the (time) problem, that needs nearly the same time as the Path array. What needs time is the boolean cut for the holes, about 2,5 Minutes (i'v had longer in mind...)
Also, if i select the cut for the job, it needs about 30 secounds till the job is createt and if it is FC slows down.
And last: in this moment i don't know how to select all 2000 holes at once....
Edit Figured out: just select the base object (the cut) and click "drilling"...? FC works 10 minutes now... and still works...
So "make only one hole per boolean and the others per Path array" is much faster.
The order of the holes createt from path array isn't so bad as the picture suggests, the machine shows line after line
to buid the array of 2000 "drills" is not the (time) problem, that needs nearly the same time as the Path array. What needs time is the boolean cut for the holes, about 2,5 Minutes (i'v had longer in mind...)
Also, if i select the cut for the job, it needs about 30 secounds till the job is createt and if it is FC slows down.
And last: in this moment i don't know how to select all 2000 holes at once....
Edit Figured out: just select the base object (the cut) and click "drilling"...? FC works 10 minutes now... and still works...
So "make only one hole per boolean and the others per Path array" is much faster.
The order of the holes createt from path array isn't so bad as the picture suggests, the machine shows line after line
Gruß Herbert
Re: a lot of unneeded lines gcode if using array
We had a similar discussion before and IIRC it should be in the post processor. I have it in my philips postprocessor configurable. I did not adapt it for quite a while so I guess it is currently not working, but you may still have a look if you are interested.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: a lot of unneeded lines gcode if using array
Hi Markus,
i was patient and rund a the drilling operation for the 2000 holes till the end. After 1h 10 min it finishd and i got a perfect result, - gcode and screenview. .
Im sure that a drilling operation with such a lot of holes is not needet very often and so it's not a real problem if the produced code contends a few unneedet lines. The code based on Path array results not in an error on the machine and so that's nothing important.
Only thing is: In my mind the code is confusing if there are redundant commands and comments, - but thats i'm in mind... now i know and as long as the code works i can life with it.
i was patient and rund a the drilling operation for the 2000 holes till the end. After 1h 10 min it finishd and i got a perfect result, - gcode and screenview. .
Im sure that a drilling operation with such a lot of holes is not needet very often and so it's not a real problem if the produced code contends a few unneedet lines. The code based on Path array results not in an error on the machine and so that's nothing important.
Only thing is: In my mind the code is confusing if there are redundant commands and comments, - but thats i'm in mind... now i know and as long as the code works i can life with it.
Gruß Herbert
Re: a lot of unneeded lines gcode if using array
Hi Markus,
the trophy have to go to the people which make that possible...
For me it was easy, only difficulty i'f had: keeping patient...
the trophy have to go to the people which make that possible...
For me it was easy, only difficulty i'f had: keeping patient...
Gruß Herbert