Archived issue #0026445
It's impossible to create Ellipse with MinorRadius > MajorRadius.
Description
OCCT don't allow the ellipse with MinorRadius longer than MajorRadius. But from mathematic parametric definition, it's very natural to have MinorRadius > MajorRadius.
I'm not very clear about the background of such constraint in OCCT, is it possible to remove it without affecting other feature?
I'm not very clear about the background of such constraint in OCCT, is it possible to remove it without affecting other feature?
Public activity
5 archived notes
Participants are labeled by their role within this record.
I had a look in the source code and found out that this limitation was made in order to make the code more simple.
Let's look at the method Eccentricity:
inline Standard_Real gp_Elips2d::Eccentricity() const
{
if (majorRadius == 0.0) { return 0.0; }
else {
return sqrt(majorRadius * majorRadius -
minorRadius * minorRadius) / majorRadius;
}
}
If we let majorRadius < minorRadius then we must make another branch in this method. There are many such places of code in classes describing 2D and 3D ellipse in packages gp and Geom. Probably the performance may suffer if we make such complication. It should be carefully tested.
The usual solution is finding the axis of greater radius and call constructor with proper parameters.
If anyway you would like us to make such improvement, please make request to our support.
Let's look at the method Eccentricity:
inline Standard_Real gp_Elips2d::Eccentricity() const
{
if (majorRadius == 0.0) { return 0.0; }
else {
return sqrt(majorRadius * majorRadius -
minorRadius * minorRadius) / majorRadius;
}
}
If we let majorRadius < minorRadius then we must make another branch in this method. There are many such places of code in classes describing 2D and 3D ellipse in packages gp and Geom. Probably the performance may suffer if we make such complication. It should be carefully tested.
The usual solution is finding the axis of greater radius and call constructor with proper parameters.
If anyway you would like us to make such improvement, please make request to our support.
This is not a problem for me to construct an ellipse to obey the rule of OCCT. I post this issue because i'm not just thinking as a software developer. It depends on the OCCT team whether or not to make such improvement, As a user, i do hope occt become more and more powerful and user friendly.
Andrey, let's decide if it is worth investing in this improvement.
As for me, I would not invest, by 2 reasons:
1. We should find correct balance between "powerful" and "user friendly". Because frequently making a thing more user friendly makes it less powerful.
2. This improvement will require significant work load.
As for me, I would not invest, by 2 reasons:
1. We should find correct balance between "powerful" and "user friendly". Because frequently making a thing more user friendly makes it less powerful.
2. This improvement will require significant work load.
I find that ACIS and Parasolid ellipse curve has such constraint too. But i do find some other system without this constraint.
Dear Andrey, i agree with msv and please close this issue.
Dear Andrey, i agree with msv and please close this issue.
Dear Participant, thank you for understanding.
Dear Commenter 1, please close this bug.
Dear Commenter 1, please close this bug.