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.
How can I create and ellipsoid?
luis_suarez
Posts: 4 ✭
Hi, can someone please teach me how to create an ellipsoid in onshape?
a=25mm b=50mm and c=12.5mm
Thanks in advance, I've been trying for hours with no luck
a=25mm b=50mm and c=12.5mmThanks in advance, I've been trying for hours with no luck
0
Answers
-
Hi Luis,
create a new Feature Studio,
then add the following lines:
annotation { "Feature Type Name" : "elipse" }
export const elipse = defineFeature(function(context is Context, id is Id, definition is map)
precondition
{
}
{ definition.center=vector(0, 0, 0) * millimeter;
definition.radius=vector(25, 50, 12.5)*millimeter;
fEllipsoid (context, id + "elipse", definition);
});
so at the end you should see:
FeatureScript 581;
import(path : "onshape/std/geometry.fs", version : "581.0");
annotation { "Feature Type Name" : "elipse" }
export const elipse = defineFeature(function(context is Context, id is Id, definition is map)
precondition
{
}
{ definition.center=vector(0, 0, 0) * millimeter;
definition.radius=vector(25, 50, 12.5)*millimeter;
fEllipsoid (context, id + "elipse", definition);
});
581 may be replaced automatically to another value, this is done automatically by Onshape.
Now click CTRL-S to commit your yust created new feature,
Go back to part studio and add your user defined feature, called "ellipse".
(Find it on top right under "Add user defined features" (sorry can not tell you exact wording, my UI is german).
It looks like "{a cube}v" on top and rightmost of features).
To change size and position, simply edit your feature studio at definition.radius and definition.center.
If you need it often with different values it will be better to write an additional dialog for it were you can edit parameters.
God luck
Stephan
0 -
This isn't in the FeatureScript section. I could be wrong, but I don't think he wants to write any code. I believe he just wants to model an ellipsoid. See below. The simplest method I found was to just model a sphere and use the Power Scale Featurescript to stretch it non-uniformly.
https://cad.onshape.com/documents/57acdfaae4b005c413ed9b6f/w/3fd585a46d3af1b3ba413c53/e/f5faf06679376b2f43a78b84
0 -
Another method would be to Loft an ellipse sketch to a point and then mirror the resulting surface/part. Since the tangency can be adjusted, this wouldn't yield an exact ellipsoid, but it would get you something close that would let you tweak the shape if necessary. An actual ellipse on the other hand only has 3 dimensions (not including positioning/rotation).0
-
He shall not write code, but yust copy it.
Its not complicated at all.
BTW, where do you hide your PS?
0 -
I'm not saying he shouldn't write code. If that's what he wants, more power to him. It just didn't seem like a coding question.
Someone posted the Power Scale feature on the forums a while back. Here's the link.
https://cad.onshape.com/documents/c3f3651d28491d28eefba7d3/v/167ba220d329f5bec671e716/e/dbc28ecb5a20b4bfa14fc748
0
