Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
2. Need support? Ask a question to our Community Support category.
3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
4. 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

Member 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 ,
for  in the first quadrant (); multiplying by  gives the equations for the curve in the other quadrants."

Any insight would be great.

Tagged:

## Comments

• Onshape Employees, Developers, HDM Posts: 993
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 \ Director, Architecture and FeatureScript \ Onshape Inc
• Member Posts: 3
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.
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.
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.

Thanks
• Member Posts: 3
Woops just figured it out. My spline was crossing over itself.
• Onshape Employees, Developers, HDM Posts: 993
Ilya Baran \ Director, Architecture and FeatureScript \ Onshape Inc
• Member, Developers Posts: 1,031 ✭✭✭✭✭
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.
• Onshape Employees, Developers, HDM Posts: 993
@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 \ Director, Architecture and FeatureScript \ Onshape Inc
Sign In or Register to comment.

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!