Changes between Initial Version and Version 1 of Ticket #7889, comment 1
- Timestamp:
- 2012-09-02T16:03:18+02:00 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #7889, comment 1
initial v1 5 5 "Orthogonalize Shape" without the two selected nodes results in the test case in an overlapping way. When you additionally select two nodes, the result will be adjusted to these nodes (the selected nodes will keep their positions). 6 6 7 It looks like the nodes will be rotated twice in this case. First they are rotate around theto make all ways orthogonal. Then from line 371 in OrthogonalizeAction.java the is some strange code: Now the nodes are rotated back and all nodes in headingNodes will be checked that they don't change their positions after all. But normally all ways will potentially change their length during orthogonalize() operation. So it is impossible to keep more than one node at the same position (but headingNodes contains the two selected nodes). For not failing all the time, there is a "magic" test that the position of the nodes in headingNodes don't change "too much". Even if the test don't fail, the result will not be really orthogonal, because the tiny changes of the headingNodes will not be stored.7 It looks like the nodes will be rotated twice in this case. First they are rotate around a calculated centroid to make all ways orthogonal. Then from line 371 in OrthogonalizeAction.java the is some strange code: Now the nodes are rotated back and all nodes in headingNodes will be checked that they don't change their positions after all. But normally all ways will potentially change their length during orthogonalize() operation. So it is impossible to keep more than one node at the same position (but headingNodes contains the two selected nodes). For not failing all the time, there is a "magic" test that the position of the nodes in headingNodes don't change "too much". Even if the test don't fail, the result will not be really orthogonal, because the tiny changes of the headingNodes will not be stored. 8 8 9 9 To fix this, the nodes in headingNodes should never be moved.


