Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

Errors when using Parametric Curve Feature Script

dan_abidovdan_abidov Member Posts: 4 EDU

Hello,

I have been attempting to make use of the Parametric curve feature script by Mahir Abrahim & Ilya Baran. I am modeling a parametric Cycloidal disc, and am receiving the following error in the Feature Script Notices.

R = 36

N=21

Rr = 4

E = Rr/2

P = -atan((sin((1-#N)*#t(deg)))/((#R/(#E*#N))-(cos((1-#N)*#t(deg)))))

X = (#Rcos((#t360degree))-#Rrcos((#t360degree)-#Phi)-#Ecos(#N(#t360degree)))*mm

Y = 0mm

Z = (-#Rcos((#t360degree))+#Rrcos((#t360degree)-#Phi)+#Ecos(#N(#t360degree)))*mm

Min t = 0

Max t = 1

Apologies for the poor formatting. The multiplication is bolding parts and I don't know how to prevent that.

Is there somewhere I'm going wrong? I'm sure there's just a small syntax error I made and have yet to notice or something else to that effect, but I've been tearing hairs out over this and any help would be greatly appreciated.

Answers

  • dan_abidovdan_abidov Member Posts: 4 EDU

    Update: I have found some errors in my equations and have since corrected them. my new equations are as follows

    X = (#Rcos((#t360degree))-#Rrcos((#t360degree)-#Phi)-#Ecos(#N(#t360degree)))*mm
    Z = (-#Rsin((#t360degree))+#Rrsin((#t360degree)-#Phi)+#Esin(#N(#t360degree)))*mm

    The part is now generating, but nothing is being displayed on screen, and I am limited in the number of samples I can set. For some reason I receive an error when requesting anything above 70 except for 71.

Sign In or Register to comment.