Bulge Calculation

This section is for general discussion about Gadgets
Post Reply
User avatar
jimandi5000
Vectric Wizard
Posts: 330
Joined: Wed Mar 11, 2015 6:50 pm
Model of CNC Machine: Home Made 60 x 120
Location: North Houston Tx.

Bulge Calculation

Post by jimandi5000 »

Hi all,

Looking for some help. before I do the deep dive on spending a bunch of time, I would ask... I am looking for the formula to calculate arc bulge. Anyone out there crossed that bridge?

This is what I have so far:

Code: Select all

function BulgeCalculator (Rad, Ang) 
   return math.tan (math.rad(Ang) * Rad)
end
Thanks,
Jim

User avatar
jimandi5000
Vectric Wizard
Posts: 330
Joined: Wed Mar 11, 2015 6:50 pm
Model of CNC Machine: Home Made 60 x 120
Location: North Houston Tx.

Re: Bulge Calculation

Post by jimandi5000 »

Hi,

I wrote this and ran 30 to 40 test. I am thing it is working.

Code: Select all

function Arc2Bulge (p1, p2, Rad) 
    local chord = math.sqrt(((p2.x - p1.x) ^ 2) + ((p2.y - p1.y) ^ 2))
    local seg = (Rad - (0.5 * (math.sqrt((4.0 * Rad^2) - chord^2))))
    local bulge = (2 * seg) / chord 
    return bulge
end
Thanks,
Jim

vgraves
Vectric Craftsman
Posts: 122
Joined: Sat Sep 29, 2012 2:04 am
Model of CNC Machine: CNC Router Parts PRO4848 w/LinuxCNC
Location: Knoxville, TN

Re: Bulge Calculation

Post by vgraves »

Not exactly sure what you mean by bulge, but I interpreted it to refer to circular segments. This may help you validate the results of your existing function.

https://en.wikipedia.org/wiki/Circular_segment

Van

User avatar
jimandi5000
Vectric Wizard
Posts: 330
Joined: Wed Mar 11, 2015 6:50 pm
Model of CNC Machine: Home Made 60 x 120
Location: North Houston Tx.

Re: Bulge Calculation

Post by jimandi5000 »

Hi Van,

Thanks for the reply. Here is what the SDK states on page 95.
Attachments
Annotation 2019-11-11 220048.jpg
Thanks,
Jim

armbrusterco
Vectric Craftsman
Posts: 128
Joined: Tue Feb 14, 2012 5:26 am
Model of CNC Machine: Roland MDX-40A
Location: Lake Barrington, IL
Contact:

Re: Bulge Calculation

Post by armbrusterco »

In geometry, the "bulge" is called a sagitta. Surveyors sometimes calculate the sagitta to use when staking out arcs.

If you know the radius and chord length of the arc, here are two links with the formula to calculate the length of the sagitta.
https://www.mathopenref.com/sagitta.html https://www.liutaiomottola.com/formulae/sag.htm

If you know the radius and the angle of the arc, here is a link with a formula to calculate the length of the sagitta.
https://planetcalc.com/1421/
Bob Armbruster
www.ArmbrusterCo.com

User avatar
jimandi5000
Vectric Wizard
Posts: 330
Joined: Wed Mar 11, 2015 6:50 pm
Model of CNC Machine: Home Made 60 x 120
Location: North Houston Tx.

Re: Bulge Calculation

Post by jimandi5000 »

Hi armbrusterco,

Not sure I agree. the SDK states
The bulge represents a ratio between the chord length of an arc and its height (bulge = (2*arc_height) / chord_length).
So you are somewhat correct we do need the sagitta but we need the ratio to the chord to the sagitta.

Thoughts?
Thanks,
Jim

armbrusterco
Vectric Craftsman
Posts: 128
Joined: Tue Feb 14, 2012 5:26 am
Model of CNC Machine: Roland MDX-40A
Location: Lake Barrington, IL
Contact:

Re: Bulge Calculation

Post by armbrusterco »

You are correct. I missed the ratio. Oooops.
Bob Armbruster
www.ArmbrusterCo.com

User avatar
jimandi5000
Vectric Wizard
Posts: 330
Joined: Wed Mar 11, 2015 6:50 pm
Model of CNC Machine: Home Made 60 x 120
Location: North Houston Tx.

Re: Bulge Calculation

Post by jimandi5000 »

No Problem... I am just trying to learn as much as I can... ;)
Thanks,
Jim

Post Reply