← All bug reports

FS#2476Draw > Circle > Circle3P: Creates null-circle with co-linear points

Type
Bug
Status
Closed
Resolution
Fixed
Category
QCAD (main)
Severity
Low
Priority
Low
Reported version
3.28.1
Operating system
All
Reported
2023-06-06 by CVH
Closed
2023-06-07 by andrew

Andrew,

With 3 co-linear points:
- Arc3P will warn the user that an arc can't be created (Line 141).
- Circle3P creates a null-circle without issuing a similar warning (Line 149).

The difference sits in ShapeAlgorithms.js
- ShapeAlgorithms.createArcFrom3Points Line 1465 checks if the returned arc isValid.
- ShapeAlgorithms.createCircleFrom3Points Line 1436 checks if the returned circle isNull.

Similar as RArc.cpp at Line 108 RCircle.cpp returns an RCircle() at Line 74 when there is no intersection of the two middle lines.
An RCircle() isn't a valid circle as such but it is not nothing.

The error from ShapeAlgorithms.js is also treated somewhat different in the pickCoordinate event of Arc3P vs Circle3P.

Regards,
CVH