Well, a few algorithms later..
As some of you may or may not know, what LTurn is attempting is very very hard. SO much so thats its really a subbranch of math code you can call "physics similations on concave polynomial motion. ". I might add that it, like so much I attempt is very much above my pay grade. Its why very few good lathe programs exist that are easy. Most are difficult due to the collision detections required, so they pass much of that to the user to use his ituitive abilkities to overcome the difficulty in the math. Its much easier for a person to tell how much a tool will collide and which direction one woudl have to go to correct it than a computer can. Attempting this has
given me high appreciation for the math wizards that do this well. ( Few of them as there are..).
LazyCam is meant to be easy, I dont want all kinds of user interfaces and things or it fails its purpose and is best left to the Wizards. No, this isnt a "I quit" message,
I just want to explain with this release some of the inherant rules that will now start to apply in order to get a good toolpath. I found many bugs anf inefficiencies while attempting fine pathing, and have corrected and changed much of the code in roughing as a result.
Roughing works ona scan line pricinple, scan horizontal lines though the profile, clipping them when they enter and leave the profile, and correcting their lengths for
things liek polygon( tool) hitting the profile. And tool non-flank areas hitting the remaining stock. The only way to do this in the time that is feasably given the code, is
to check the start and end of lines for these complex collisions and adjust the lines accordingly. This means a tool may hit in the center of a line IF the tool radius is not the outter most point of the tool. For example if you rotate a diamond more than 27 degree's or so. Youll find problems in your cuts if the tool does exceed as the scanline calculations only see the tool at the start and end of the lines. It assumes a cut across the lines of tool radius size. ( You may not understand all that, but it boils down to this rule: )
LazyTurn Roughing Rule #1: If any part of a tool is further out in the X than the radial tip, then the roughing may fail and cut into the profile. USers shoudl always check their profile onthe screen to ensure the leftover material is not cut into the profile..
I may , soon, force that rule into effect codewise if you testers dont see any reason not to. You may find however that in certain instances your fine with the cutoff as long as you KNOW it will happen. If so, Ill leave it alone.
Issue #2.
Finepathing is more difficult than rough by orders of magnitude. This is because the true difficulty mathmatically, of calculating
oriented polygon intersections over the profiles length comes to the forefront. After experimenting with a great many methods using very complex modelling and logical analysis , I came to the conclusion that the only real way to do it was to simulate the fumbling of a
user as he would try to follow a mental image of what he's trying to cut. Even attempting to follow the intuitive nature of a person
as he cuts is more diffcult than youd imagine. However, by simply limiting the capability of a polygon to hit in the X direction
we come very close to what one woudl think of as the "best pass" type of finish pass.
Few problems with this of course. First, a human sees distance as infinitely variable. As you move a tool from Z0 to Z-10, you see
at each point along the way if youll cross into the profile. A computer has no sense of the infinity of distance, it must granulate
the distance to check it, meanign it cant check every .000000001 inch to see if its a hit or not, since the profile is not moving in straight
lines necessarily, you cant simply vector check the collision, ( you could if the profiles were convex, but most are concave in nature).
SO we have a setitng in the fine path called "Tolerance" . This is how often along the profile we progress from step to step. In Inch mode I use .01 inches. Seems a fair constraint, but your feee to override it with the cost being time of caluclation. In Metric I use .05mm's. These
limits get me a finish pas sin a few seconds, if you desire high precision your time penalty for that is decided by how small "Tolerance" is set to in the finish pass dialog.
Undercuts are not yet dealt with. Soem program simply dont allow them, I will , but I have to come up with a few filtering tricks in the logic to take them into account, another complex situation thats easy for a human.
So with all that being said, Here is release 1.02 . You cannot yet cut any finish pass. You WILL see one though, and it will reflect
how far laong we are to getting a final output. This release is to hopefully make the roughing better and more accurate, and to allow you to send me pictures of problem area's in finsih pass generation. As it gets better and more usable, Ill set the post processor to allow its output. What youll see is only the final finsh pass, other passes will be generated form the final pass profile.
Let me kwno what you find generally. I suspect we'll come up with rules as to what works and what doesnt, what can be done, and what will have to be passes to human intervention.
There is a new button called ToolTest that allows you to put the screen tool on any spot to ensure the toolpath actually works. Ive seen many instances where I thought he tool will definitely hit, and when I plce the tool there it is indeed a fine place for it.
To use that button, hit it, the cursor will become an arrow, click on th screen at any spot and the tool will appear there..
Good luck
Art