Modify

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)

alignincircle.patch (3.3 KB ) - added by Daeron 16 years ago.

Download all attachments as: .zip

Change History (2)

by Daeron, 16 years ago

Attachment: alignincircle.patch added

comment:1 by stoecker, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in r1947 with wrong commit comment :-)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.