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.
Creating a super elipses featurescript
Michael_Goldblatt
Posts: 3 ✭
Super elipses for reference: http://demonstrations.wolfram.com/VisualizingSuperellipses/
I'm trying to create a superelipses featurescript, but am having some trouble getting the shape to behave the way I want.
The two solutions I can think of are to 1) make geometry and then constrain it (so that the corner fillets are tangent to the rest of the arcs) in featurescript.
or 2) to make a sketch that will plot equations with a selected origin.
"The superellipse has parametric equations
,
,
Any insight would be great.
I'm trying to create a superelipses featurescript, but am having some trouble getting the shape to behave the way I want.
The two solutions I can think of are to 1) make geometry and then constrain it (so that the corner fillets are tangent to the rest of the arcs) in featurescript.
or 2) to make a sketch that will plot equations with a selected origin.
"The superellipse has parametric equations
,
, for
in the first quadrant (
,
); multiplying by
gives the equations for the curve in the other quadrants."
in the first quadrant (
,
); multiplying by
gives the equations for the curve in the other quadrants."Any insight would be great.
Tagged:
0
Comments
-
I think the best way is to make a sketch. Calculate the points all around the superellipse explicitly and use a single skFitSpline call (or if the superellipse has four sharp corners, use four skFitSpline calls). Let me know if that's enough to get you through or if more info is needed.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc1
-
That is what I ended up trying to do. Actually stuck now on skfitspline. I get no errors but it won't create the geometry.ilya_baran said:I think the best way is to make a sketch. Calculate the points all around the superellipse explicitly and use a single skFitSpline call (or if the superellipse has four sharp corners, use four skFitSpline calls). Let me know if that's enough to get you through or if more info is needed.
This is what I have:skFitSpline(sketch, "spline", {"points" : [point1,point2,point3,point4,point5,point6,point7,point8,point1]});
Where the points are skPoint that I can see.
Thanks0 -
Woops just figured it out. My spline was crossing over itself.0
-
For reference, here's my attempt: https://cad.onshape.com/documents/79dbbeb51f35887c803024ea/w/7a0e243d4c22fe97f0673b18/e/77e013e2655245fee378e7b4Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc1
-
Very nice, Ilya. I did something similar in SW. I'm currently working on a more versatile parametric XYZ curve, but I'm having trouble getting FeatureScript to evaluate string expressions as values, e.g. "tan(45)" should evaluate to 1.0
-
@mahir_abrahim
Unfortunately I think having the feature user input the equation is very difficult to do for now, since we don't allow much even in the isAnything input and FS isn't great for string parsing. We will need to do a bit of work on our side to make this possible...Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0


