You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the current code base: <Value Condition="this.ContainsAngle(0.0)">Center + MajorAxis</Value> <Value Condition="this.ContainsAngle(90.0)">Center + new DxfPoint(0.0, MajorAxis.Length * MinorAxisRatio, 0.0)</Value <Value Condition="this.ContainsAngle(180.0)">Center - MajorAxis</Value> <Value Condition="this.ContainsAngle(270.0)">Center + new DxfPoint(0.0, -MajorAxis.Length * MinorAxisRatio, 0.0)</Value>
Ellipse seems to use the same 0,90,180,270 degree checks when building up the extents as the arc does, but Ellipse parameters are in radians, so it needs to check for radians.
Additionally, those hard code orthogonal points seem to make the assumption that the minor axis is always along the Y axis direction, which isn't necessarily the case.
The text was updated successfully, but these errors were encountered:
Good catch, the calls to ContainsAngle() should be in radians and not degrees.
As for axis assumptions, I think the proper fix would be to cross the extrusion direction (also the normal) with the major axis and ensure the correct length and only then add that to the center point. This would be a much better solution, but still not quite correct, because the extents of a rotated ellipse aren't necessarily the axis endpoints; there could be part of the curve that still sticks out to the side, but that level of math is beyond my capabilities.
From the current code base:
<Value Condition="this.ContainsAngle(0.0)">Center + MajorAxis</Value> <Value Condition="this.ContainsAngle(90.0)">Center + new DxfPoint(0.0, MajorAxis.Length * MinorAxisRatio, 0.0)</Value <Value Condition="this.ContainsAngle(180.0)">Center - MajorAxis</Value> <Value Condition="this.ContainsAngle(270.0)">Center + new DxfPoint(0.0, -MajorAxis.Length * MinorAxisRatio, 0.0)</Value>
Ellipse seems to use the same 0,90,180,270 degree checks when building up the extents as the arc does, but Ellipse parameters are in radians, so it needs to check for radians.
Additionally, those hard code orthogonal points seem to make the assumption that the minor axis is always along the Y axis direction, which isn't necessarily the case.
The text was updated successfully, but these errors were encountered: