I am working on calculating the points on an arc where I know the (X, Y) coordinates of the end points and the radius of the arc.
The arc is to form a fillet on a thread profile for driving a CNC machine and I have 4 arcs to calculate in total:
- Left hand tip fillet
- Left hand root fillet
- Right hand tip fillet
- Right hand root fillet
The data points are represented as (X, Y, N), where "N" is the angle to the outward normal from that point.
I do have a math routine that will calculate the arc point coordinates given the following information:
- Start angle (in radians)
- Subtended (swept) angle (in radians)
- Arc radius
- Quadrant number
- Arc origin (X, Y)
The routine returns the number of points calculated and an array of those points which can then be merged into the rest of the profile.
I was wondering if I could get some help with configuring the origin point as I am trying to set it up to work for the grinding wheel profile which is calculated from the actual thread profile, so the documentation I have on the method is aimed at the thread profile.
I have attached a diagram of a simplified wheel profile showing where the start and end points of the arc would be for the left hand root fillet, but the others would be fairly similar I think.
I have been calculating the origin as follows so far but I think this is incorrect:
$X_origin = X_start + radius \cdot tan \pi / 2 - N_start$ $Y_origin = Y_end-radius$
Where: $(X_{start}, Y_{start}, N_{start})$ are the coordinates and normal angle for the start point of the arc. $(X_{end}, Y_{end}, N_{end})$ are the coordinates and normal angle for the end point of the arc.
The profile is checked for any points that fall out of sequence (they should flow in a reasonably smooth curve), and I do encounter this type of error (a "point reversal" error), so I am thinking that I need to calculate the arc origin point differently.
(It is also possible for the point reversal error to occur due to the parameters set by the user when defining the dimensions of the thread to be machined.)
I hope I have explained this clearly enough, please let me know if there's anything I've missed out that would help and I'll answer to the best of my knowledge.
Edit to add: I've added this new diagram to try and explain what I mean by "normal angle".
The "normal angle" measures the angle between the horizontal X axis and the outward normal to the tangent for the point.

