Opened 16 years ago
Closed 16 years ago
#3236 closed enhancement (fixed)
[PATCH] Better behaviour for AlignInCircle when only points are selected
Reported by: | Daeron | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: |
Description
This patch makes the AlignInCircle to behave better when applied to only points.
As the selected points are in an arbitrary order, a polygon formed that way (when calculating the centroid) will most likely be intersecting itself, which will sometimes result the centroid being in an unexpected place that results the AlignInCircle action to move the nodes to places the user didn't expect them to be moved.
This patch adds a sorting phase before calculating the centroid if the nodes didn't come from a way (because way already has a defined order for the nodes). The nodes are sorted based on the heading from the average point of the points. This will yield the desired polygon for the calculation of centroid if the points were at least remotely in the shape of circle, which helps the aligning process yield a desired shape.
Attachments (1)
Change History (2)
by , 16 years ago
Attachment: | alignincircle.patch added |
---|
comment:1 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r1947 with wrong commit comment :-)