- Posts: 22011
- Thank you received: 7491
C coded dxf to g-code converter, the building process...
- tommylight
- Offline
- Moderator
-
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
-
- Posts: 12170
- Thank you received: 4153
tommylight wrote: As RodW pointed out in another thread, as we use plasma cutters ( i do not use them much to do actual cutting ), we know that there is an inherent drawback to cutting small circles and radius's, so if you can think of a way to put lower feed rates for such instances, that would be very usable. That is supposedly what Hypertherm refers to as TruHole technology and they do use much better torches, for sure.
My idea is anything smaller than 50mm should be done at half the speed, from 50 to 100mm at 75% of the speed, and above that it is all good.
Thank you,
Tom.
That would be very cool as would drag and drop onto the gremlin preview to commence processing. I'm sure Grotius has the data to do that. I'm not sure of what the thresholds might need to be and it could change with material thickness but I'm sure you guys will work it out.
I almost think it would be good for now to just keep this as a separate command line program that accepts a few command line parameters and switches that can be called from the GUI to do its thing. Maybe something like this:
Grotius, well done on mastering C pointers you are rapidly becoming stronger and stronger with your skills! So now study up on structures and how you can use them with pointers with -> very cool!
Then once you master structures, take the time to understand unions (where you can overlay data on top of each other eg a char over a byte or a byte over a bitmap.)
I thought of you when I wrote this over the weekend:
So what does this mean? HINT: it is C's ternary operator at work....
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
- Posts: 2419
- Thank you received: 2349
Feel free to make any request.
The request's are placed into the c file intro todo list.
My idea is anything smaller than 50mm should be done at half the speed, from 50 to 100mm at 75% of the speed, and above that it is all good.
Hi Tom, the path rules for a circle are very easy to adapt. The circle is the most easy shape to isolate from a dxf file. Also adding feed parameters to the circle value's are easy.
In the c-code i will provide a few parameters to add this path rules related to diameter.
Also i will add something extra to circle shapes. Circle Lead In Correction for small circle's.
If you have a file with different part's of 10mm steel and the lead in programmed let's say 10mm. And the smalles circle is 15mm, the function automaticly does the lead in for the 15mm hole setting at 7.5mm. :woohoo: So it repair's the lead in without you are noticing.
Rodw,
dxfdecode infile.dxf outfile.ngc --units:mm --feed:1350 --small:50 --large:100 --skiparc:5
Very good !!
I think it can be like that with using terminal window commands.
If you use a glade add on screen the linuxcnc python program line for using terminal commands should be looking similar to :
os.system ("dxfdecode -p {0}".format(self.widgets.INFILE.get_text()) + ... next item to load.
Above line sets the INFILE name in the terminal command line...
I don't know what your hint mean's, maybe next year i can say it directly.
First i will work on the inside and outside offsets. Find the biggest contours, compare them with smaller contours inside.
Rod, please think also about a nesting technique.
How we can rotate objects in a g-code file and do some plate optimalisation calculations.
The basic autonesting begin's with taking the oject's min and max dimension's in square form and compare them until it fits in a steel plate of a certain dimension in relation to most minimum mm2 area.
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
- Posts: 2419
- Thank you received: 2349
Tonight i had to store an x,y or z value of a certain g-code line into memory to compare the biggest objects.
I had to converse a character to a float. This week i must make a compare function for comparing all the value's within one g-code file.
I have used a new funtion called memorycopy. memcpy.
This is handy for copy the first 10 characters after X.. instead of copy a whole line into the memory. I need only a X value of type float.
So the atof function converses the string into a float value.
Later on i must make a kind of array i think to compare all the value's inside the g-code file.
For now it works so far.
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
-
- Posts: 12170
- Thank you received: 4153
I'd probably consume each character in the line
while(pointer++){
switch(*pointer){
case 'x':
case 'X':
pointer++; // skip the letter
// convert the number into a structure
axis->x = atof(pointer);
break;
default:
}
}
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
-
- Posts: 12170
- Thank you received: 4153
You should also study malloc() and free() although in c++ these are kinda old hat
Please Log in or Create an account to join the conversation.