Opened 17 years ago
Closed 17 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)
Change History (4)
by , 17 years ago
Attachment: | CreateCircleAction.java added |
---|
comment:1 by , 17 years ago
Summary: | NEW: Create circle action → [PATCH] Create circle action |
---|
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.
the new action