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.
Is there a featurescript to evenly space points along a (2D) spline.
Cobalt_Echo
Member Posts: 31 ✭✭
I'm working on a large project (personally hobby for 3D printing) which has a TON of splines. I'm trying to make points along the spline that are evenly spaced. Is there a way to do this more effeciently then creating points and then having to dimention on each one? Hard to explain, so pic attached.
0
Comments
So, what's the purpose of putting the points along the spline? Do you need the points to define the spline? Or the spline to define the points?
Basically, I'm trying to make a wireframe of a ships hull based off old 2D sketches. I've tried using it with less "wires" but there are to many anomolies, so I'm having to go back and add a ton more. Evetually to be surface lofted and/or filled.
The red lines are the planes for each deck of the ship.
https://cad.onshape.com/documents/bd55d146aca05eabb86ca6b4/w/11afcdc66103aab94bb119e3/e/47f36138be3f0f94f4cbedb3
Very early in my career I did the surfacing on a computer mouse based on some probe scans of a hand sculpted ID model. The Pro/E model was 20MB just for the surface because I made cross-sections every few mm, through tons of scan points. For the next generation of the mouse, which was basically the same shape, I got help from an Alias modeler, and they did a surface which was 17KB, and smoother. Now I could do this surfacing myself in just about any decent CAD tool, but back then it was helpful.
Each spline through point is an opportunity to make the surface more wobbly because of the small rounding/approximation errors.
This guideline from Autodesk Alias is just as true for any tool which uses splines:
https://knowledge.autodesk.com/support/alias-products/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/Alias-Tutorials/files/GUID-F13D7596-D7AD-45DC-84A6-1065EAE07953-htm.html
The Alias tutorial link is a really helpful 'primer' on surfacing. Thanks for sharing your experience and resources! Big help in knowing best practices and principles.
I've found it to be one of the more useful nuggets of surfacing I've learned. Things to keep in mind when interpreting the Alias advice for Onshape:
- Sketched splines in Onshape are all degree 3. If you sketch a spline with through points, you're creating what Alias calls a multi-span curve (AKA a B-spline which is degree 3). Each point adds another span.
- Bridge curve is the only native way to get a spline with higher than degree 3. They go up to degree 5.
- Lofts and fill surfaces degree in U and V are determined internally, but the degree and arrangement of the driving curves and tangent influences has an influence on surface complexity.
- Onshape does do what Alias calls a periodic curve (basically a full loop) but they have to be multi-span degree 3 curves.
Under the hood, Onshape has the ability to do weighted control points, or higher degree curves, or all kinds of stuff, but it needs to be added either to the built in tools, or to custom FeatureScript.