Fbcadcam is my hobby (turned into a business for family in the Philippines… well it’s not a business yet since we have no idea how to generate revenues… yet)
My full time job is a truck driver in the United States. Programming is my hobby. I call it a hobby cuz all though I had hoped to create some for profit apps in the past, I gave up on that idea years ago mostly cuz I ain’t no professional programmer, hence I just code for fun and share my open source code freely. Free as in Free Beer is how I describe it…
Anyhow, nice to meet you all. And thanks for making MaslowCNC open source.
So now that I have a Maslow set up in the Philippines and a bunch of college interns learning how to program in freeBASIC and learning about CNC stuff… It’s time to think how add CAM functionality to fbcadcam.
In my program (fbcadcam), you can draw lines, circles, arcs, ellipses, elliptical arcs and rotated ellipses & elliptical arcs. Drawings are saved in DXF (R12, R13 or R14… I can’t remember which) format and for the most part, can be opened in other cad programs but sometimes with error cuz i hand coded the part where the dxf is created. In fact all functions of fbcadcam are hand coded (meaning I’m not using any cookie cutter libraries) except for GTK3. In the older versions of fbcadcam (previously called fbcad) i hand coded my own GUI which was fun to do but lacked anything appealing to the general public. So I decided to use GTK3 cuz it looked great. I was going to use QT but couldn’t figure out how to get it to work with freeBASIC.
Any how’s, it time to focus on CAM. I sure would like to hear from you guys regarding what you think I should do. For example, I anticipate that part of CAM is to define the (drill bit / cutting) PATH which I figure is simply an internal or external parallel (offset based on drill bit radius) to the existing entities in the drawing (entities in my case being lines, circles, arcs, ellipses, and elliptical arcs). Along with this is defining the drill bit depth (Z) for those points where you would want to insert and retract the drill bit (insertion at various depths for cutting purposes and retraction in the event of moving bit to next insertion point).
I do have some parallel functionality built into fbcadcam in which you can created internal / external parallels to lines and arcs but it has bugs and is in need of debuging. Of course I plan to include paralles to circles, ellipses and elliptical arcs as part of this functionality. My idea is that the paralles would serve as the tool bit PATH in which I will derive G-code from.
No regarding G-code…
At the moment I have successfully generated G-code from all my entities by way way of using point to point info, in the case of lines point x1,y1 to x2,y2, in the case of circles, arcs, ellipses and elliptical arcs, i generate a series of points along their circumferences. I do this even for circles and arcs by defaults because I would need to do it for ellipses and elliptical arcs (especially rotated ellipses and elliptical arcs) anyway since most CNC controllers (software) does not support rotated ellipses and elliptical arcs. So at the moment I just generate G-code using G90 (absolute positioning) along with G1. (G0 for moves).
If I am capable, I do hope to some day contribute to Maslow’s python routines in an effort to build in support for things like rotated ellipses and elliptical arcs. In case any of you pythoners would like to help with that and need to know how to calculate the points along a rotated ellipse and / or elliptical arc then please feel free to ask. Even though the code (my method of doing so) is available for your review on my web site, I would still be willing to describe how I figured it to be since most folks like to refer to arc start and arc end of elliptical arcs in degrees based on the angle from point 1 ellipse center (x1,y1) to point 2 (arc start/end) (x2,y2) in a counter clockwise polar coordinate system where 0 degrees is at the 3 O’clock position and 90 degrees is at high noon.
By modifying the Python / Arduino code with such, one would be able to cut ellipses and elliptical arcs and rotated ellipses and elliptical arcs much faster on the Maslow similar to using the current available G2 and G3 functions for circles and arcs. The issue regarding speed of cutting from point to point along the circumference of a circle using a series of G1’s rather then a single G2 or G3 is that the drill bit needs to be slowed down as it approaches its G1 destination (359 times in the case of 1 degree circles circumference movements)
If the maslow code could be modified to supports such things the first question would be what G-codes would we use for ellipses and elliptical arcs. I volunteer a deriviative of G2 and G3, we could use or call it G23. And unlike G2 and G3 where thins are done in a relative way, I would like to suggest to make the parameters of G23 absolute right from the get go, ie. G23 x1,y1,Major Radius, Minor Radius, Arc start, Arc end, Rotation (where x1,y1 is circle center)
Oh, wow, I think I might be ranting too much. Maybe I should wait to see if there is any interests in this post before I go on too much further…