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

Aleix Pol Gonzalez aleixpol at kde.org
Tue Apr 5 10:35:30 UTC 2016



> On April 4, 2016, 11:57 p.m., Aleix Pol Gonzalez wrote:
> > +1 from my side, although I don't know about the codebase, you seem to know what you're doing.
> > 
> > Would it be possible to set up some automated testing system?
> 
> Maurizio Paolini wrote:
>     I contributed a lot to kig in the past... however I come from the "C" world, not C++ (with its misteries :)
>     No idea how to set up a testing system; at least it requires some way to simulate the user interaction...
>     Concerning this proposal: actually there is a very little backward compatibility issue: the case of a user
>     that saved a kig construction that used e.g. the "firstEndPoint" of an arc by 3 points (constructed as a property of the
>     arc, not the point used to construct the arc), with the save file made *after* moving points to change the
>     concavity of the arc.   This is a risk that is even smaller than the one considered in my other review request:
>     https://git.reviewboard.kde.org/r/127364/ where I actually introduced the "orientability" of circles/arcs.
>     In that case, avoiding the backward compatibility issue was possible, but at the cost of a much less clean code.
>     All in all, considering that I estimate as "zero" the number of such saved kig files, I decided to follow the
>     cleaner path.

We can help you on the C++ side of things.

Regarding testing, you can look up QtTest: http://doc.qt.io/qt-5/qtest-overview.html. Many projects have automated tests, you can test how they do that.


- Aleix


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


On April 4, 2016, 5:49 p.m., Maurizio Paolini wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127570/
> -----------------------------------------------------------
> 
> (Updated April 4, 2016, 5:49 p.m.)
> 
> 
> 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/0d3f9dc5-06eb-4ec1-8b54-57ffc0c97b10__arc_param.kig
> snapshot of the kig file construction
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/04/04/b8532477-262c-4d0a-9c19-a1b3ce0e98a3__arc_param.png
> 
> 
> Thanks,
> 
> Maurizio Paolini
> 
>

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


More information about the kde-edu mailing list