How to make an elliptical based cone shape?

Currently, I can make a cone with circular base or a prism with a elliptical base. But if I want to make a cone which has elliptical base, for example, given hight, bottom radii and top major radius, how do I make such a geometry in OCC?

Thank you in advance!

Jane

Rob Bachrach's picture

Try using BRepOffsetAPI_ThruSections. You should be able to create a wire from your base ellipse and use a vertex as the tip of the cone. Here are the equivalent commands in the draw test harness:

# create the elliptical base wire
ellipse basecurve 0 0 0 10 5
mkedge baseedge basecurve
wire basewire baseedge

# create the vertex for the tip
vertex v 0 0 10

# create the final cone
thrusections cone issolid isruled basewire v

Rob

Jane Hu's picture

Thanks, Rob. I'll try it.

Jane