- Status Closed
- Percent Complete
- Task Type Bug Report
- Category QCAD (main)
-
Assigned To
andrew - Operating System All
- Severity Low
- Priority Very Low
- Reported Version 3.21.2
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Attached to Project: QCAD Bugtracker
Opened by HungryLion - 16.07.2018
Last edited by andrew - 16.07.2018
Opened by HungryLion - 16.07.2018
Last edited by andrew - 16.07.2018
FS#1783 - RArc::splitAt(): fails in some cases
RArc::splitAt() works wrong in some cases.
To reproduce execute this script:
var arc = new RArc(new RVector(0, 0), 100, Math.PI*2, Math.PI/2, true);
var points = [];
points.push(arc.getPointAtPercent(1/3));
var arcs = arc.splitAt(points);
if (arcs.length == 2) {
qDebug("OK, arcs count:", arcs.length);
} else {
qDebug("FAILED, arcs count:", arcs.length);
}
arc.mirror(new RLine(0, 0, 0, 100));
points = [];
points.push(arc.getPointAtPercent(1/3));
arcs = arc.splitAt(points);
if (arcs.length == 2) {
qDebug("OK, arcs count:", arcs.length);
} else {
qDebug("FAILED, arcs count:", arcs.length);
}
The first case split in two arcs, but the second splits in one arc only.
I think the reason is the code in RArc::splitAt():
...
if (RMath::getAngleDifference180(a1, a2))*radius()<0.001) {
continue;
}
...
The RMath::getAngleDifference180() return angle between -pi and pi so absolute value should be used.
Closed by andrew
16.07.2018 15:00
Reason for closing: Fixed
Additional comments about closing:
16.07.2018 15:00
Reason for closing: Fixed
Additional comments about closing:
https://github.com/qcad/q cad/commit/6835a4f7a1613805a8d50665d2cfd b8a715dace2
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task