Dear members of curvy spline community.
Is there a quick wat to evaluate if a spline is straight?
Currently, I am traversing the spline and evaluating the tangent at each control point. If the traversal detects a different normal , I consider the spline "not straight". Not sure if this is the best or most efficient way of doing it. I wonder If curvy have a built-in function for it .
I also want to take advantage of this post and report a weird behaviour when using "Optimize" on a straight spline.
If a curvy generator has the shape extrusion path "Optimize" parameter enabled, some things could go wrong.
For example:
I am using Curvy spline v7.1.6 but I do not think is a problem introduced in this version. I've been using curvy since couple of years and I noticed the problem before. However it is only now that I've managed to understand that "optimize" on a "straight" spline, might cause problems.
We have a possible work around:
Thanks for your time and I apologize for the long post.
Is there a quick wat to evaluate if a spline is straight?
Currently, I am traversing the spline and evaluating the tangent at each control point. If the traversal detects a different normal , I consider the spline "not straight". Not sure if this is the best or most efficient way of doing it. I wonder If curvy have a built-in function for it .
I also want to take advantage of this post and report a weird behaviour when using "Optimize" on a straight spline.
If a curvy generator has the shape extrusion path "Optimize" parameter enabled, some things could go wrong.
For example:
- Split: Optimize seems to ignore the "split" parameter (which subdivides the generated extruded geometry). However, if the spline has curvature, the "split" functionality kicks in as expected.
- Custom spline profile: We have a code that modifies the profile shape spline based on a provided height value. If optimized is enabled, and the path is straight, curvy ignores our spline profile changes and generates a "flat" mesh (with no height) . If we disable "optimize" or have it on a "non-straight" spline, curvy works as expected.
- Shadows casting: In some instances, we are using curvy spline to generate tunnel geometry. If "Optimize" is enabled on a straight path to generate the tunnel, the geometry can fail to block the light and it does not cast shadows. once again, if "Optimize" is disabled or we use a "non-straight" spline, curvy works as expected.
I am using Curvy spline v7.1.6 but I do not think is a problem introduced in this version. I've been using curvy since couple of years and I noticed the problem before. However it is only now that I've managed to understand that "optimize" on a "straight" spline, might cause problems.
We have a possible work around:
- Evaluate if the spline is straight.
- If spline is straight, disable "Optimize"
Thanks for your time and I apologize for the long post.