Skip to content

Commit 57bf9da

Browse files
committed
Document semantic of SegmentationToleranceType
.. and default of QgsCircularString::curveToLine [ci skip]
1 parent a2e010c commit 57bf9da

4 files changed

Lines changed: 17 additions & 2 deletions

File tree

‎python/core/geometry/qgsabstractgeometry.sip‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ class QgsAbstractGeometry
5959

6060
enum SegmentationToleranceType
6161
{
62+
6263
MaximumAngle,
64+
6365
MaximumDifference
6466
};
6567

‎python/core/geometry/qgscircularstring.sip‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ class QgsCircularString: QgsCurve
7474
Returns a new line string geometry corresponding to a segmentized approximation
7575
of the curve.
7676
\param tolerance segmentation tolerance
77-
\param toleranceType maximum segmentation angle or maximum difference between approximation and curve*
77+
\param toleranceType maximum segmentation angle or maximum difference between approximation and curve
78+
79+
Uses a MaximumAngle tolerance of 1 degrees by default (360
80+
segments in a full circle)
7881
:rtype: QgsLineString
7982
%End
8083

‎src/core/geometry/qgsabstractgeometry.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ class CORE_EXPORT QgsAbstractGeometry
8888
//! Segmentation tolerance as maximum angle or maximum difference between approximation and circle
8989
enum SegmentationToleranceType
9090
{
91+
92+
/** Maximum angle between generating radii (lines from arc center
93+
* to output vertices) */
9194
MaximumAngle = 0,
95+
96+
/** Maximum distance between an arbitrary point on the original
97+
* curve and closest point on its approximation. */
9298
MaximumDifference
9399
};
94100

‎src/core/geometry/qgscircularstring.h‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ class CORE_EXPORT QgsCircularString: public QgsCurve
7272
/** Returns a new line string geometry corresponding to a segmentized approximation
7373
* of the curve.
7474
* \param tolerance segmentation tolerance
75-
* \param toleranceType maximum segmentation angle or maximum difference between approximation and curve*/
75+
* \param toleranceType maximum segmentation angle or maximum difference between approximation and curve
76+
*
77+
* Uses a MaximumAngle tolerance of 1 degrees by default (360
78+
* segments in a full circle)
79+
*/
7680
virtual QgsLineString *curveToLine( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const override SIP_FACTORY;
7781

7882
void draw( QPainter &p ) const override;

0 commit comments

Comments
 (0)