Removing segments from an ellipse with D2 (2)
Posted: Thu Oct 09, 2025 10:09 am
Same reason as for the other topic (topic 11899)
In the attached example drawing using the latest stable QCAD release 3.32.4:
- Try removing segment A with D2 ... Undo (OO)
- Try removing segment B with D2 ... Undo (OO)
- Try removing segment C with D2 ... Undo (OO)
- Try removing segment D with D2 ... Undo (OO)
This doesn't remove only the segments A, B, C or D, the action removes A+B or C+D.
The workaround would be using B2 but there is no intersection between the ellipse and the magenta lines.
In this case one could exploit an intersection with the green line (SI) and one of the ellipse reference points (SR), a major point.
This can be replicated at any point on the ellipse and then SI or SR are of no use.
- - - - - - - - -
D2, B2 and AX all fail because of no intersections with the magenta lines.
On purpose these lines are almost tangent but not crossing the ellipse
Since fixing FS#2685 a line almost tangent with an ellipse is defined as:
- Not tangent or not a single root for a quadratic equation within mathematical limits.
- 2 real roots and intersecting twice at two points really close together.
There is no analog for a line passing near a circle at R + epsilon (A very small extra distance).
While a circle is nothing more than a special ellipse case with ratio 1.00.
Let's handle this in a different way...
Revert to the drawing as given:
- Unlock layer 'Notes'.
- Select the system of drawing entities centered at the origin.
- Scale (SZ) the whole system disproportional to convert the ellipse into a circle: Focus point = origin = center ; X factor = 0.50 ; Y factor = 1.00
- Remove circle segment A with D2.
One should end up with a CCW ellipse arc going from parameter angle 180 to parameter angle 130.
The length is reported as NaN ... See topic 11899
The deeper problem here is:
A certain minute offset to a circle is still a circle, quadratic, but the offset to an ellipse is a problematic octic algebraic curve.
There is no easy solution for 'almost' tangent but not crossing the ellipse.
Regards,
CVH
In the attached example drawing using the latest stable QCAD release 3.32.4:
- Try removing segment A with D2 ... Undo (OO)
- Try removing segment B with D2 ... Undo (OO)
- Try removing segment C with D2 ... Undo (OO)
- Try removing segment D with D2 ... Undo (OO)

The workaround would be using B2 but there is no intersection between the ellipse and the magenta lines.
In this case one could exploit an intersection with the green line (SI) and one of the ellipse reference points (SR), a major point.
This can be replicated at any point on the ellipse and then SI or SR are of no use.
- - - - - - - - -
D2, B2 and AX all fail because of no intersections with the magenta lines.
On purpose these lines are almost tangent but not crossing the ellipse

Since fixing FS#2685 a line almost tangent with an ellipse is defined as:
- Not tangent or not a single root for a quadratic equation within mathematical limits.
- 2 real roots and intersecting twice at two points really close together.

While a circle is nothing more than a special ellipse case with ratio 1.00.
Let's handle this in a different way...
Revert to the drawing as given:
- Unlock layer 'Notes'.
- Select the system of drawing entities centered at the origin.
- Scale (SZ) the whole system disproportional to convert the ellipse into a circle: Focus point = origin = center ; X factor = 0.50 ; Y factor = 1.00
- Remove circle segment A with D2.
- D2 is functional for all indicated circle segments.
Tangent or almost is defined as at a distance to the center between R - epsilon and R + epsilon.
The point on the circle the closest to the line is regarded as intersection.
One should end up with a CCW ellipse arc going from parameter angle 180 to parameter angle 130.
The length is reported as NaN ... See topic 11899
The deeper problem here is:
A certain minute offset to a circle is still a circle, quadratic, but the offset to an ellipse is a problematic octic algebraic curve.
There is no easy solution for 'almost' tangent but not crossing the ellipse.
Regards,
CVH