View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001279 | FreeCAD | Bug | public | 2013-10-18 14:47 | 2017-03-27 08:29 |
| Reporter | pkoning | Assigned To | yorik | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 0.13 | ||||
| Fixed in Version | 0.14 | ||||
| Summary | 0001279: Wrong operator in DraftGeomUtils.getRotation | ||||
| Description | The code says: angle = math.degrees(math.sqrt((v1.Length ^ 2) * (v2.Length ^ 2)) + v1.dot(v2)) but ^ is the XOR operator, which is not valid for float. Presumably squaring was intended, which would be: angle = math.degrees(math.sqrt((v1.Length ** 2) * (v2.Length ** 2)) + v1.dot(v2)) | ||||
| Tags | No tags attached. | ||||
| FreeCAD Information | |||||
|
|
Actually, the bigger problem is that this line doesn't produce the correct answer. I can't figure out how the product of two squares has any relationship to an angle. If I replace the line by: angle = math.degrees(DraftVecUtils.angle(v1,v2,axis)) I get the right answer. |
|
|
Good catch, thanks for the fix! Committed with 5233aa7 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-10-18 14:47 | pkoning | New Issue | |
| 2013-10-18 15:49 | pkoning | Note Added: 0003765 | |
| 2013-10-18 19:31 | yorik | Status | new => assigned |
| 2013-10-18 19:31 | yorik | Assigned To | => yorik |
| 2013-10-18 19:32 | yorik | Note Added: 0003772 | |
| 2013-10-18 19:32 | yorik | Status | assigned => closed |
| 2013-10-18 19:32 | yorik | Resolution | open => fixed |
| 2013-10-18 19:32 | yorik | Fixed in Version | => 0.14 |
| 2017-03-27 08:29 | Kunda1 | Changeset attached | => FreeCAD master 5233aa7e |
FreeCAD