[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    Re: Review Request 127570: take advantage of "orientability" of arcs to
From:       Maurizio Paolini <paolini () dmf ! unicatt ! it>
Date:       2016-04-10 14:49:29
Message-ID: 20160410144929.25275.66574 () mimi ! kde ! org
[Download RAW message or body]

--===============8133553017841683611==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit


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

(Updated April 10, 2016, 2:49 p.m.)


Status
------

This change has been marked as submitted.


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


--===============8133553017841683611==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/127570/">https://git.reviewboard.kde.org/r/127570/</a>
  </td>
    </tr>
   </table>
   <br />



<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; \
border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  <tr>
  <td>
   <h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been marked as \
submitted.</h1>  </td>
 </tr>
</table>
<br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Edu and David Narváez.</div>
<div>By Maurizio Paolini.</div>


<p style="color: grey;"><i>Updated April 10, 2016, 2:49 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kig
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">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.</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">The first problem is addressed by a test in the \
firstEndPoint and secondEndPoint methods.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">The second problem is \
addressed by changing t in 1-t in both getParam and getPoint methods when mradius \
&lt; 0.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">The first problem can be made apparent with the \
following construction:</p> <ol style="padding: 0;text-rendering: inherit;margin: 0 0 \
0 2em;line-height: inherit;white-space: normal;"> <li style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;">Construct an arc by three points (say A, P, B)</li> <li style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Hide \
points A and B</li> <li style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: normal;">Right-click on the arc and select \
Construct-&gt;First End Point</li> <li style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: normal;">Move point P so that the \
the arc becomes a segment and then changes its concavity</li> </ol>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Without the proposed patch observe the sudden jump of \
the newly created point</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">Similarly, the second problem becomes \
apparent with the further step:</p> <ol style="padding: 0;text-rendering: \
inherit;margin: 0 0 0 2em;line-height: inherit;white-space: normal;"> <li \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;">Right-click on the arc (in a position near an end-point) and select "Add \
Text Label-&gt;(any choice)"</li> <li style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: normal;">Move point P as \
before</li> </ol></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>objects/other_imp.cc <span style="color: grey">(7bc143e)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/127570/diff/" style="margin-left: \
3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>


 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2016/04/04/0d3f9dc5-06eb-4ec1-8b54-57ffc0c97b10__arc_param.kig">kig \
construction showing the problem</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2016/04/04/b8532477-262c-4d0a-9c19-a1b3ce0e98a3__arc_param.png">snapshot \
of the kig file construction</a></li>

</ul>




  </td>
 </tr>
</table>



  </div>
 </body>
</html>


--===============8133553017841683611==--


[Attachment #3 (text/plain)]

_______________________________________________
kde-edu mailing list
kde-edu@mail.kde.org
https://mail.kde.org/mailman/listinfo/kde-edu


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic