Review Request 127570: take advantage of "orientability" of arcs to solve a couple of longstanding problems for arcs by 3 points subject to change of concavity

Maurizio Paolini paolini at dmf.unicatt.it
Mon Apr 4 13:30:46 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127570/
-----------------------------------------------------------

Review request for KDE Edu and David Narváez.


Repository: kig


Description
-------

ArcBTPType can change concavity upon moving the defining points.  In such a situation the construction of the firstEndPoint and secondEndPoint properties get swapped and can lead to subsequent constructions that change abruptly.

Similarly the getPoint and getParam methods (that transform parameter t in [0,1] to a point in the arc and viceversa) is
not defined smoothly upon change of concavity.
A consequence of this is e.g. the sudden change of position of labels attached to an arc when the arc changes concavity.

The first problem is addressed by a test in the firstEndPoint and secondEndPoint methods.

The second problem is addressed by changing t in 1-t in both getParam and getPoint methods when mradius < 0.


Diffs
-----

  objects/other_imp.cc 7bc143e 

Diff: https://git.reviewboard.kde.org/r/127570/diff/


Testing
-------

The first problem can be made apparent with the following construction:

1. Construct an arc by three points (say A, P, B)
2. Hide points A and B
3. Right-click on the arc and select Construct->First End Point
4. Move point P so that the the arc becomes a segment and then changes its concavity

Without the proposed patch observe the sudden jump of the newly created point

Similarly, the second problem becomes apparent with the further step:

5. Right-click on the arc (in a position near an end-point) and select "Add Text Label->(any choice)"
6. Move point P as before


File Attachments
----------------

kig construction showing the problem
  https://git.reviewboard.kde.org/media/uploaded/files/2016/04/04/f6411dbd-89b3-48c4-9c8a-503cd05dfff7__arc_param.kig


Thanks,

Maurizio Paolini

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20160404/f6644c8b/attachment.html>


More information about the kde-edu mailing list