Dear devs, I have issues with the return of QgsTriangle.angles(). https://qgis.org/pyqgis/master/core/QgsTriangle.html?highlight=qgstriangle#qgis.core.QgsTriangle.angles
Here is an example: >>> triangle = QgsTriangle() >>> triangle.setExteriorRing(QgsLineString([QgsPoint(78598.328125, 330538.375, >>> 0), QgsPoint(78606.3203125, 330544, 0), QgsPoint(78601.46875, 330550.90625, >>> 0), QgsPoint(78598.328125, 330538.375, 0)])) >>> triangle.angles() [0.7119509950830287, 0.0008857138004074727, 0.85795961791146] >>> [math.degrees(a) for a in triangle.angles()] [40.79178723839677, 0.05074766261984076, 49.157465098983366] If we display this triangle, none of the angles have such a low angle. [cid:e23c990e-fd85-40e1-b5dc-158e5b175048] https://prnt.sc/21p9ju6 We should have a near-90° angle, which we don't... https://www.triangle-calculator.com/?what=vc&a=78598.328125&a1=330538.375&3dd=3D&a2=&b=78606.3203125&b1=330544&b2=&c=78601.46875&c1=330550.90625&c2=&submit=Solve&3d=0 Am I doing this wrong ? Regards,
_______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
