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.
Points to Bezier Curves
Enes_HIZLI
Member Posts: 9 ✭
Hi everyone,
I just wonder that if there is a way to create a bezier curve through the coordinates not the control points? The only way I see is to create a sketch and set a coincident constraint for the bezier curve to the points.
In summary, I have 3D coordinates in .csv file. I need a tool that creates a bezier curve that satisfies all the coordinates I provide. It will arrange the control points itself to satisfy my coordinates.
However I found a feature script on the community support but it is not a bezier curve, it is just an approximate spline. So I need a tool to do it to have a Class-A surface.
Thanks for your help,
Enes
I just wonder that if there is a way to create a bezier curve through the coordinates not the control points? The only way I see is to create a sketch and set a coincident constraint for the bezier curve to the points.
In summary, I have 3D coordinates in .csv file. I need a tool that creates a bezier curve that satisfies all the coordinates I provide. It will arrange the control points itself to satisfy my coordinates.
However I found a feature script on the community support but it is not a bezier curve, it is just an approximate spline. So I need a tool to do it to have a Class-A surface.
Thanks for your help,
Enes
0
Best Answer
-
Matt_Shields Member, Onshape Employees Posts: 465Hi Enes,
I created a few custom features a while ago that may suit your needs. The document below has three custom features.
https://cad.onshape.com/documents/ce3ffb7bcb1ad02727fd8f8a/w/da9113a2ff4358ac51752b6a/e/cbd6bb0f0c9ab175358f21e03D Bezier uses the Bezier equation to find the specified number of points given the user-defined control points. The parameter t can be specified as well. Use t = 0 to 1 for the full curve. A spline is then drawn through the points.
Bezier Through Points uses the user-defined points to find new control points such that the curve passes through the user’s points. It then creates a spline thorough the user’s points.
Bezier Least Square Fit was basically the whole point of this exercise. It not only uses linear algebra to find new control points based on the user-defined points, but it allows the user to specify the order of the final curve. This is useful if you want to fit to a lot of points. For example, if you want to fit to 20 points, the default curve would be a 19th order curve. Reducing the order can result in a satisfactory fit and better computational time. Finally, this feature creates a b-spline of best fit through the given points and with the given order.
I haven't done a ton of testing, but hopefully it helps.
Matt1
Answers
I created a few custom features a while ago that may suit your needs. The document below has three custom features.
https://cad.onshape.com/documents/ce3ffb7bcb1ad02727fd8f8a/w/da9113a2ff4358ac51752b6a/e/cbd6bb0f0c9ab175358f21e0
Bezier Through Points uses the user-defined points to find new control points such that the curve passes through the user’s points. It then creates a spline thorough the user’s points.
Bezier Least Square Fit was basically the whole point of this exercise. It not only uses linear algebra to find new control points based on the user-defined points, but it allows the user to specify the order of the final curve. This is useful if you want to fit to a lot of points. For example, if you want to fit to 20 points, the default curve would be a 19th order curve. Reducing the order can result in a satisfactory fit and better computational time. Finally, this feature creates a b-spline of best fit through the given points and with the given order.
I haven't done a ton of testing, but hopefully it helps.
Matt
Thanks,
Matt
Thanks for the answer again.
Enes