Modify

Opened 16 years ago

Closed 16 years ago

#1580 closed enhancement (fixed)

[PATCH] Create circle action

Reported by: Henry Loenwind Owned by: framm
Priority: minor Milestone:
Component: Core Version:
Keywords: Cc:

Description

Some people asked about an action to create a circle. Seems someone even was willing to pay a programmer. Nonsense, here it is for free:

  • New file CreateCircleAction.java
  • Diff for MainMenu.java to include it
  • No icon, I just copied images/aligncircle.png to images/createcircle.png locally

How it works:

(a) Select exactly 3 nodes. The tool will then create a new way that will include the selected nodes and a number of new nodes, aligned in a circle.

(b) Select a way that has exactly 3 nodes. The tool will then create a number of new nodes (aligned in a circle) and put them into the existing way. The nodes in the way will be re-ordered so you'll get a circle, not a scribble ;)

(c) Default number of nodes to add is 8. So the circle will have 11 nodes (8 new at regular intervals and the 3 existing at their current positions). This can be changed by setting the configuration value "createcircle.nodecount" to a number between 1 and 100.

TODO:

  • There is no adjustment for projection errors. However, the circles look good in Mercator projection---and that's what we usually want, isn't it?
  • The "AlignInCircle" action has a different idea about the center of the circle. Seems to be because it just takes the average as center. I think(!) I'm right and it is wrong, but I'm not sure. Just don't use both on the same circle.

Attachments (2)

CreateCircleAction.java (5.7 KB ) - added by Henry Loenwind 16 years ago.
the new action
MainMenu.diff (1.5 KB ) - added by Henry Loenwind 16 years ago.
integration into the Tools menu

Download all attachments as: .zip

Change History (4)

by Henry Loenwind, 16 years ago

Attachment: CreateCircleAction.java added

the new action

by Henry Loenwind, 16 years ago

Attachment: MainMenu.diff added

integration into the Tools menu

comment:1 by anonymous, 16 years ago

Summary: NEW: Create circle action[PATCH] Create circle action

comment:2 by framm, 16 years ago

Resolution: fixed
Status: newclosed

Applied for r996. Code is technically incorrect as it will always create something that looks like a circle in the current projection, while in fact it should always create something that *is* a circle on the ground no matter what your projection... but then... who cares.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
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.