Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Math Question (Finding an equation)
john_mcclary
Member, Developers Posts: 3,934 PRO
Non-Onshape question, but I figure there are enough smart people here, someone could help me
I've always just had a CAD program available to me, I just let the software do the math. Silly me..
I have to make an excel sheet that can help quote some straight chutes. They can enter all the black numbers you see below in the form of variables, so I need the full equations to solve for the grey numbers.
The problem I have is I don't know how to solve for H₃ and L₃ which I need to ultimately find A₂
At the very least I need A₂ that is the number all of this mess is trying to solve for. It lets us know if packages will even slide down the chute, or if we need to add/remove friction surfaces.
H₃ and L₃ will help them visualize how large the swoop is without asking for a model.
Here is what I got so far:
H₃ = ? = ~13.875
H₄ = sin(A₁)L₂ = sin(5°)20 = 0.08716 * 20 = ~1.74311
L₃ = ? = ~42.741
A₂ = atan( (H₁-H₂-H₃-H₄) / (L₁-L₂-L₃) ) = atan( (144-22-13.875-1.74311) / (240-20-42.741) ) = ~30.97
Furthermore: the values of A₁ L₂ & H₄ can be equal to Zero
I've always just had a CAD program available to me, I just let the software do the math. Silly me..
I have to make an excel sheet that can help quote some straight chutes. They can enter all the black numbers you see below in the form of variables, so I need the full equations to solve for the grey numbers.
The problem I have is I don't know how to solve for H₃ and L₃ which I need to ultimately find A₂
At the very least I need A₂ that is the number all of this mess is trying to solve for. It lets us know if packages will even slide down the chute, or if we need to add/remove friction surfaces.
H₃ and L₃ will help them visualize how large the swoop is without asking for a model.
Here is what I got so far:
H₃ = ? = ~13.875
H₄ = sin(A₁)L₂ = sin(5°)20 = 0.08716 * 20 = ~1.74311
L₃ = ? = ~42.741
A₂ = atan( (H₁-H₂-H₃-H₄) / (L₁-L₂-L₃) ) = atan( (144-22-13.875-1.74311) / (240-20-42.741) ) = ~30.97
Furthermore: the values of A₁ L₂ & H₄ can be equal to Zero
Tagged:
0
Best Answers
-
konstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭at least it calculates A2you need the formula for "result"Here is a C form for A2:
ArcTan((R*(-H1 + H2 + R*Cos(A1) + L2*Tan(A1)))/Sqrt(Power(L1 - L2 + R*Sin(A1),2) + Power(-H1 + H2 + R*Cos(A1) + L2*Tan(A1),2)) + <br> (L1 - L2 + R*Sin(A1))*Sqrt(1 - Power(R,2)/(Power(L1 - L2 + R*Sin(A1),2) + Power(-H1 + H2 + R*Cos(A1) + L2*Tan(A1),2))),<br> -((R*(L1 - L2 + R*Sin(A1)))/Sqrt(Power(L1 - L2 + R*Sin(A1),2) + Power(-H1 + H2 + R*Cos(A1) + L2*Tan(A1),2))) + <br> (-H1 + H2 + R*Cos(A1) + L2*Tan(A1))*Sqrt(1 - Power(R,2)/(Power(L1 - L2 + R*Sin(A1),2) + Power(-H1 + H2 + R*Cos(A1) + L2*Tan(A1),2))))/Degree
7 -
john_mcclary Member, Developers Posts: 3,934 PROThank you @konstantin_shiriazdanov I'm sure that works, but I was having a hard time simplifying it. me no that smart
Morgan shared a doc with me and we worked it out there. Here is the result he came up with which I transposed into VBA for excel.
EDIT: Fixed bug in codePublic Function AngleOfMainChute(HorizontalLength As Double, ExitHorizontalLength As Double, EntryElevation As Double, ExitElevation As Double, ExitAngle As Double, SwoopRadius As Double) toRad = Application.WorksheetFunction.Pi() / 180 toDeg = 180 / Application.WorksheetFunction.Pi() l1 = HorizontalLength l2 = ExitHorizontalLength h1 = EntryElevation h2 = ExitElevation a1 = ExitAngle * toRad r = SwoopRadius h4 = Tan(a1) * l2 arcEndX = l1 - l2 arcEndY = h1 - h2 - h4 arcCPointX = arcEndX + Sin(a1) * r arcCPointY = arcEndY - Cos(a1) * r triHypot = Math.Sqr(arcCPointX ^ 2 + arcCPointY ^ 2) hypotToMainLineAngle = Application.WorksheetFunction.Asin(r / triHypot) hypotAngle = Math.Atn(arcCPointY / arcCPointX) result = hypotAngle + hypotToMainLineAngle AngleOfMainChute = result * toDeg End Function
Thank you everyone
1
Answers
Trying to take it out of featurescript notaion and get it back to simple math. In the end I need to code it in visual basic in excel
Morgan shared a doc with me and we worked it out there. Here is the result he came up with which I transposed into VBA for excel.
EDIT: Fixed bug in code
Thank you everyone