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.
Parametric Curve not generating LD-Haack curve
alex_ramirez327
Member Posts: 2 EDU
I tried writing the LD-Haack equation that is in the wikipedia page, into the y variable of the parametric curve function but it keeps saying it can't regenerate properly. I made sure there isn't any unit conflicts and tried to divide the function into two parts, one in the x variable and the other in the y. Do you guys have any tips or know how to do it properly? The dimensions of the curve, has a radius of 6 inches and its maximum height is 1.5 meters, or 59.055 inches.
This link takes you to the document Im working on.
https://cad.onshape.com/documents/7b2bde7228785d9873741e76/w/b57f355fb8b142c2e73359d7/e/bbbfbe62b73820f43a5840a0
This link takes you to the document Im working on.
https://cad.onshape.com/documents/7b2bde7228785d9873741e76/w/b57f355fb8b142c2e73359d7/e/bbbfbe62b73820f43a5840a0
0
Best Answer
-
@alex_ramirez327
It took some doing, but here's a functional version. Looks like OS was hiccuping on adding an angle to a non-angle, so I had to divide by "rad" in one spot. Take a look.<a rel="nofollow" href="https://cad.onshape.com/documents/806fd3a0e7926db94f37794d/w/27cbe82bc35c7cf9267e6a01/e/4b66ed7509d6c90d8d02b282" title="Link: https://cad.onshape.com/documents/806fd3a0e7926db94f37794d/w/27cbe82bc35c7cf9267e6a01/e/4b66ed7509d6c90d8d02b282">https://cad.onshape.com/documents/806fd3a0e7926db94f37794d/w/27cbe82bc35c7cf9267e6a01/e/4b66ed7509d6c90d8d02b282</a>
5
Answers
-
Looks like there are some unit issues going on with your formula for Y. Acos() does not take angle input. It requires a unitless number. I may have also found a bug with how sqrt() is processed by the featurescript (or possibly Onshape itself). I can plot the output of a sin(), but not sqrt(sin()) or (sin())^.5.
@ilya_baran can you take a look?0 -
@mahir I tried and don't see an issue. Do you have a doc you can share that illustrates it?
Keep in mind that sin has a tendency to go negative sometimes, in which case sqrt will throw.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0 -
@ilya_baran I think you're on to something with the negative sin(). Onshape doesn't support imaginary numbers... go figure.
¯\_(ツ)_/¯0 -
@alex_ramirez327
It took some doing, but here's a functional version. Looks like OS was hiccuping on adding an angle to a non-angle, so I had to divide by "rad" in one spot. Take a look.<a rel="nofollow" href="https://cad.onshape.com/documents/806fd3a0e7926db94f37794d/w/27cbe82bc35c7cf9267e6a01/e/4b66ed7509d6c90d8d02b282" title="Link: https://cad.onshape.com/documents/806fd3a0e7926db94f37794d/w/27cbe82bc35c7cf9267e6a01/e/4b66ed7509d6c90d8d02b282">https://cad.onshape.com/documents/806fd3a0e7926db94f37794d/w/27cbe82bc35c7cf9267e6a01/e/4b66ed7509d6c90d8d02b282</a>
5 -
Yes this is exactly what I wanted, Thank you. The parametric program is difficult to use, but I'm still trying to learn.0
-
thanks so muck, I had the same issue and you solved it0


