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.

Are the rounding functions a Fourier series?

haley_weisshaley_weiss Member Posts: 2

I'm currently learning how to use the parametric curve custom feature and noticed some odd behavior when using the round, floor, ceil, etc functions. Rather than straight lines, they are curved and often under or overshoot the correct value in a way that looks similar to a Fourier series. Increasing the number of points plotted helps to an extent, but doesn't really fix the issue. The functions themselves give the correct values if I simply type in something like round(1.99), but it has issues when I input a variable instead. What's going on, and is there any way to fix it? I've included an image using the floor function to demonstrate what I'm seeing.

Best Answer

  • S1monS1mon Member Posts: 2,988 PRO
    Answer ✓

    Parametric curve is designed to create a continuous curve. Unless you're using a special version of it, Parametric curve uses multi-span degree-3 curves. Round, floor and ceil all have discontinuous outputs.

    If you increase the number of points to a very high amount (say 200 in a graph from 0..2), I would expect that there would be less overshoot, but it will always be there, just at a different scale.

    If you want to share a public document link, and your end goals, perhaps we can help.

Answers

  • S1monS1mon Member Posts: 2,988 PRO
    Answer ✓

    Parametric curve is designed to create a continuous curve. Unless you're using a special version of it, Parametric curve uses multi-span degree-3 curves. Round, floor and ceil all have discontinuous outputs.

    If you increase the number of points to a very high amount (say 200 in a graph from 0..2), I would expect that there would be less overshoot, but it will always be there, just at a different scale.

    If you want to share a public document link, and your end goals, perhaps we can help.

Sign In or Register to comment.