Irregularities related to ellipses

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
CVH
Premier Member
Posts: 4917
Joined: Wed Sep 27, 2017 4:17 pm

Irregularities related to ellipses

Post by CVH » Tue Sep 30, 2025 4:46 am

Andrew,

There are several aspect of ellipses that don't correlate.
This makes it hard to well define the estimated length of an elliptic arc. (Topic 11879)
For example D2 would not fail with a correct estimated length not NaN. (FS#2693)

- Start and end angle cannot be altered, these properties are not grayed and disabled. (FS#2695)
... Should be supported based on REllipseEntity::setProperty
... Only changing start and end parameter angles has an effect.

- Reported length (estimated), typically related to normalized parameter angles:
... 0 <= startParam < 360°(2Pi) ; 0 < endParam <= 360°(2Pi)
... A zero sweep ellipse arc does not exists.
... May fail (FS#2565, FS#2693) -> Parameter angles are compared strictly larger or smaller than Pi in REllipse::getLength().

- Rendering based on given parameter angles.
... As a line between endpoints, not at all, as a limited ellipse arc, as a full ellipse or as more than a full turn.

- To what polyline shape it is exploded (XP).
... Sweep is always larger than zero and 2Pi at max.

- How it can be selected.
... Typically relates to the XP shape and not always to what is rendered.

- How it is reloaded (Save-Close-Open or Save-Revert)


For a not-reversed ellipse (CCW) a sweep (+) must always be added to startParam, otherwise the arc reverses to CW.
Meaning that for a ellipse arc starting at for example 180°, anything less than 180 is not attainable in forward CCW direction.
Adding a zero sweep would result in a zero length ellipse but this always reverts to a full ellipse 0-360°.

Some examples:
  • CCW, startParam = 180°, endParam = -315°
    - endParam not attainable in CCW direction.
    - Length = NaN due to startParam > endParam and startParam === 180
    - Renders as a straight line
    - Explodes to a shape 180-0-45°
    - Is not selected near the straight line but rather near the explode shape
    - Reloads as an CCW ellipse with startParam = 180°, endParam = 405°
  • CCW, startParam = 180°, endParam = 405° (= above reloaded)
    - Length = NaN due to startParam < endParam and startParam === 180
    - Renders as a 180-0-45°
    - Explodes to a shape 180-0-45°
    - Reloads as an CCW ellipse with startParam = 180°, endParam = 405°
  • CCW, startParam = 180°, endParam = 585°
    - Length is that of an 45° arc
    - Renders as more than a full turn 180-0-180-225° (405° sweep)
    - Explodes to a shape 180-225° (45° sweep)
    - Reloads as an CCW ellipse with startParam = 180°, endParam = 225°

My question: What is the intended behavior :?:
... As reloaded, as exploded, as rendered or as per reported length?

Regards,
CVH

Post Reply

Return to “QCAD Troubleshooting and Problems”