Geom_Ellipse with MajorRadius < MinorRadius

Hi all,

When creating an ellipse with MajorRadius

Thanks,
Thomas

[1]
ENTITY ellipse
SUBTYPE OF (conic);
semi_axis_1 : positive_length_measure;
semi_axis_2 : positive_length_measure;
END_ENTITY; -- ellipse
(http://www.cax-if.org/documents/ccd_cla_gvp_ast_asd.exp)

Sharjith Naramparambath's picture

The only solution is to rotate the ellipse axis system by 90 degrees.

Thomas Krijnen's picture

Thanks, I see. The problem is that since I am working on a general purpose file conversion utility, it is very likely that the ellipse is trimmed based on some parameter values. Rotating the ellipse messes up the parameters. I could subtract PI/2 from the parameter values, but really impacts the modularity of my code, in which the trimmed curve is supposed to be agnostic about the underlying base curve. Sorry, don't mean to nag.

Do you have an idea why this constraint of MajorRadius > MinorRadius exists?

Thanks,
Thomas

Sharjith Naramparambath's picture

That's probably because the ellipse has a major radius along the major axis which gets defined by its local coordinate system's orthonormal vectors -- Plane Normal, First Axis(Horizontal) and Second Axis(Vertical). I guess the First axis is considered to define the major radius and the other one for the minor radius and hence the limitation, though that shouldn't be there.

Thomas Krijnen's picture

Hi,

I see. I ended up implementing a work-around just as we discussed, in case someone is interested, code is available here:
http://sourceforge.net/p/ifcopenshell/svn/212

Thanks,
Thomas