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.
3D polylines with featurescript?
albjerre
Member Posts: 23 ✭✭✭
Hi. I want to make featurescript where I can make a 3D polyline with featurescript. When the polyline is created I also want to be able to make sketch fillets on the corners afterwards. How should I approach this?
One of the featurescript samples is "Featurescript 3D spline". Can I use this as a basis?
https://cad.onshape.com/documents/573f7b36e4b02e83c71782fc/w/7b1a7d7098a0e39517ade066/e/5718da06c22e7b08a5fb58b3
One of the featurescript samples is "Featurescript 3D spline". Can I use this as a basis?
https://cad.onshape.com/documents/573f7b36e4b02e83c71782fc/w/7b1a7d7098a0e39517ade066/e/5718da06c22e7b08a5fb58b3
Tagged:
0
Best Answer
-
ilya_baran Onshape Employees, Developers, HDM Posts: 1,215Making a number of 3D line segments is relatively simple -- and yes, the 3D spline can be used as an example. Filleting corners would not be (you'd have to create the right sketch plane, "use" the lines and fillet the corner and then trim them). Here's a script that creates the lines and arcs given 3D points and a radius: https://cad.onshape.com/documents/453c51c8807f37082c1247f3/v/9dac4678249816079b401245/e/8b9b8d950f11fd8c3015a878
Currently, to turn it into one wire body (as opposed to the mixture of 3D lines and sketch arcs that it is currently), you'd have to convert it into something opCreateBSplineCurve could take. In the near future, you'll be able to combine the results into one curve more easily.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc5
Answers
Currently, to turn it into one wire body (as opposed to the mixture of 3D lines and sketch arcs that it is currently), you'd have to convert it into something opCreateBSplineCurve could take. In the near future, you'll be able to combine the results into one curve more easily.
For some reason, I did not see your reply before know. Yes, that custom feature was exactly what I needed.
My thought is that you maybe do this by converting a spline into a series of arcs and thenyou use the chords to achieve the desired deviation, instead of just dividing up until you achieve the target (which would mean you get a high concentration of point divisions where they aren't needed).
Late response to @angelo_scozzarella:
Freeform spline can do this by @Evan_Reese. The 3D Lines (which is already in your toolbar if you search; because it is an official custom feature), can do it as well, but it only does orthogonal lines to the world xyz. 3D Lines can also do fillet corners which is cool.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Edit:
@Jonathan_Hutchinson, I was not intending to skip your question. Since it was directed toward Ilya, I was going to let him answer that since I'm not sure about that topic.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Ty @Evan_Reese
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴