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.
Newb Question? - Paraboloids
marc_crompton
Member Posts: 10 EDU
I'm a teacher wanting to help students integrate their math curriculum into something more hands on through CAD. The students already use Onshape at a basic level and have studied quadratic equations in math. I'd like them to be able to design physical objects using some level of coding, specifically, I'd like them to calculate parabolic nose cones in Onshape. I can show them how to do this in OpenSCAD, and then move the geometries into Onshape, but I'd like to see if they can work directly with FeatureScript as well. Has anyone done this successfully here? Can someone point me to a resource that might walk me through this project (or something similar)?
0
Comments
Here's an example FeatureScript feature making a parabola:
https://cad.onshape.com/documents/37b0e0b35735ff60b372cf33/w/4d836e6c27ced4be10e74f0e/e/a53a863c4036a3a1d3f0ef6d
The inputs may not be what you're used to mathematically – the shape is specified by three 2d points and a "rho" value, as is done in an Onshape sketch. Parabolas have a rho value 0.5, and the "control" point will lie on the parabola's axis of symmetry.
I also seem to be unable to rotate or thicken the parabola that you've created. (yes, I've made an editable copy of your file.)
Thanks,
Marc
Apologies for the wait!
The "rho" value Kevin is referring to is described nicely here: https://www.quora.com/What-does-it-mean-by-rho-value-for-conic-section
The reason there is no interaction in Kevin's feature is that he has not programmed the feature with any inputs. If you take a look at the "Feature Studio 1" tab, you'll see Kevin's simple feature which takes no inputs and produces a parabola on the top plane.
If you wanted to adapt the feature to have rho as an input (as an example of adding some interaction), you could change it to this:
https://cad.onshape.com/documents/3cf1e0bd7c1f6afc553d9b0d/w/f3f8a5be778cc0d018ff92c4/e/1092576dd70d0d88a5bdea80
The reason that you are unable to revolve is because this sort of share is not revolvable in our system. Ideally, you would only want half of the parabola as input to the revolve operation, not the entire parabola. I haven't come up with a good solution for how to do this in FeatureScript, but I'm brainstorming and will get back to you. The way you would do it in a part studio would be to split the parabola during the sketch, and then rotate the half:
https://cad.onshape.com/documents/3cf1e0bd7c1f6afc553d9b0d/w/f3f8a5be778cc0d018ff92c4/e/2b85cec95818e1238673cb4e
Alternatively, instead of writing your own featurescript, I have a couple existing FS that can be used to generate a 2D curve for revolving, or generate a 3D surface outright, respectively.
Parametric Curve
Parametric Surface