FS#2445Misc Information 2D Centroids v0.32 >> Bug for area of full 360° arc segment
- Type
- Bug
- Status
- Closed
- Resolution
- Fixed
- Category
- QCAD (main)
- Severity
- Low
- Priority
- Low
- Reported version
- n/a
- Operating system
- All
- Reported
- 2023-01-18 by CVH
- Closed
- 2023-01-23 by andrew
- Votes
- 1
Andrew,
Seems to be a copy/paste but never re-edited kind of mistake.
Quick fix:
https://github.com/qcad/qcad/blob/master/scripts/Misc/MiscInformation/InfoCentroids/InfoAreaCentroid/InfoAreaCentroid.js#L1320
line 1320 should read:
return [centerPoint.x, centerPoint.y, centerPoint, radius*radius * Math.PI];
line 1318 was intended to replace the 'area' portion of line 1320 literally.
As is, the code in this line makes no sense and line 1318 should be removed.
Still have to investigate if the area of a full 360° arc sector/segment should be signed ...
... and if RS.AngleTolerance is required when comparing.
Regards,
CVH