<div dir="auto">I’m not sure, but some of the things sketchpad did may be useful …<br clear="all"><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></strong></span></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone: +54-011</span></font></span></span></strong></span><font face="tahoma, sans-serif" size="2">-4893-2057</font></div><div style="font-size:12.8px"><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div><div style="font-size:12.8px"><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div></div></div><div><br></div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, 14 Sep 2025 at 05:58 Hilaire Fernandes via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>

  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p><font size="4">On the paper, there are no notion of line nor
        intersection as in DrGeo. </font></p>
    <p><font size="4">The straight lines the user draws with the tools
        are just plain writing in the paper constrained by the tool
        (line6):</font></p>
    <p></p>
    <div style="background:#f8f8f8;overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.1em .6em">
      <table>
        <tbody>
          <tr>
            <td>
              <pre style="margin:0;line-height:125%">1
2
3
4
5
6
7
8</pre>
            </td>
            <td>
              <pre style="margin:0;line-height:125%"><span></span><span style="color:#00f;font-weight:bold">GeometryTool</span><span style="color:#00f">>>mouseButton1Down:</span> <span style="color:#19177c">event</span> <span style="color:#00f">localPosition:</span> <span style="color:#19177c">localPosition</span>
        (<span style="color:#008000">self</span> <span style="color:#00f">paper</span> <span style="color:#00f">writingTool</span> <span style="color:#00f">notNil</span> <span style="color:#00f">and:</span> [<span style="color:#008000">self</span> <span style="color:#00f">inStrokeZone:</span> <span style="color:#19177c">localPosition</span>])
                <span style="color:#008000">ifTrue:</span> [<span style="color:#3d7b7b;font-style:italic">" initiate stroke along the tool "</span>
                        <span style="color:#19177c">lastHandPosition</span> <span style="color:#666">:=</span> <span style="color:#008000">nil</span>.
                        <span style="color:#3d7b7b;font-style:italic">" Let the paper to handle the hand stroke, constraint the hand position to be aligned with a tool border ! "</span>
                        <span style="color:#008000">self</span> <span style="color:#00f">paper</span> <span style="color:#00f">mouseButton1Down:</span> <span style="color:#19177c">event</span> <span style="color:#00f">localPosition:</span> (<span style="color:#008000">self</span> <span style="color:#00f">externalize:</span> (<span style="color:#008000">self</span> <span style="color:#00f">constrainToDirection:</span> <span style="color:#19177c">localPosition</span>))]
                <span style="color:#008000">ifFalse:</span> [<span style="color:#3d7b7b;font-style:italic">"Initate a drag of the tool "</span> 
                        <span style="color:#19177c">lastHandPosition</span> <span style="color:#666">:=</span> <span style="color:#008000">self</span> <span style="color:#00f">externalize:</span> <span style="color:#19177c">localPosition</span> ]
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <div><br>
    </div>
    <div><br>
    </div>
    <div>There are notion of stroke zone (line 1
      above), specific to each tool (SetSquare below):</div>
    <div>
      <div style="background:#f8f8f8;overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.1em .6em">
        <table>
          <tbody>
            <tr>
              <td>
                <pre style="margin:0;line-height:125%">1
2
3
4
5
6
7
8
9</pre>
              </td>
              <td>
                <pre style="margin:0;line-height:125%"><span></span><span style="color:#00f;font-weight:bold">SetSquare</span><span style="color:#00f">>>inStrokeZone:</span> <span style="color:#19177c">localPosition</span>
        (<span style="color:#008000">self</span> <span style="color:#00f">strokeZoneX</span> <span style="color:#00f">containsPoint:</span> <span style="color:#19177c">localPosition</span>) <span style="color:#008000">ifTrue:</span> [
                <span style="color:#19177c">strokeSide</span> <span style="color:#666">:=</span> <span style="color:#19177c">#ox</span>.
                <span style="color:#666">^</span> <span style="color:#008000">true</span>].
        (<span style="color:#008000">self</span> <span style="color:#00f">strokeZoneY</span> <span style="color:#00f">containsPoint:</span> <span style="color:#19177c">localPosition</span>) <span style="color:#008000">ifTrue:</span> [
                <span style="color:#19177c">strokeSide</span> <span style="color:#666">:=</span> <span style="color:#19177c">#oy</span>.
                <span style="color:#666">^</span> <span style="color:#008000">true</span>].
        <span style="color:#19177c">strokeSide</span> <span style="color:#666">:=</span> <span style="color:#008000">nil</span>.
        <span style="color:#666">^</span> <span style="color:#008000">false</span>
</pre>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
    <div><br>
    </div>
    <div>Then, the specific constraint for a
      given tool as the SetSquare:</div>
    <div>
      <div style="background:#f8f8f8;overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.1em .6em">
        <table>
          <tbody>
            <tr>
              <td>
                <pre style="margin:0;line-height:125%">1
2
3
4</pre>
              </td>
              <td>
                <pre style="margin:0;line-height:125%"><span></span><span style="color:#00f;font-weight:bold">SetSquare</span><span style="color:#00f">>>constrainToDirection:</span> <span style="color:#19177c">localHandPosition</span>
        <span style="color:#666">^</span> <span style="color:#19177c">strokeSide</span> <span style="color:#00f">==</span> <span style="color:#19177c">#ox</span>
                <span style="color:#008000">ifTrue:</span> [<span style="color:#19177c">localHandPosition</span> <span style="color:#00f">x</span> <span style="color:#00f">@</span> <span style="color:#666">0</span>]
                <span style="color:#008000">ifFalse:</span> [ <span style="color:#666">0</span> <span style="color:#00f">@</span> <span style="color:#19177c">localHandPosition</span> <span style="color:#00f">y</span>]
</pre>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
    <div><br>
    </div>
    <div>Again, the Morphic3 framework proved to
      be of an invaluable assistance in such design. Even Juan did not
      realize its usefulness until recently, so far for him the Morphic
      protocol to navigate from one reference frame to another one was
      only useful for internal usage, not particularly intended to the
      GUI designer. It proved the opposite and it reminds me this Alan
      Kay quote: <i>Simple things should be simple and complex things
        should be possible.</i> This is exactly where we are with
      Morphic3.<br>
    </div>
    <div><br>
    </div>
    <div>Regarding snapping with line shapes, it
      should be doable. Indeed the handwritings in a paper are grouped
      in StrokeGroupMorph (it manages the writing occurring between a
      pen down and pen up gesture). Such groups could self analyze
      themselves to recognize usual shapes as straight line, circle.
      Then, you could have a cross analysis between such groups to
      identify the intersections between them. Perfectly doable. When
      you have these information available, snapping to a given tool is
      easy. The evil is in the details of course. </div>
    <div><br>
    </div>
    <div>
      <div>There are snapping between the ruler
        and the set square. In the demo, you can observe the set square
        aligns itself with he ruler when it is moved toward it and the
        two are more or less parallel.<br>
      </div>
      <div><br>
      </div>
    </div>
    <div>Dybo targets all kind of teaching in
      school. In math, the geometry tools are the minimum to have, I
      will implement the compass tool next. Snapping is kind of very
      cool to have to attract the attention of math teachers, but I need
      first to develop other tooling for other taught subject. The
      geometry tools are special because they are used to sketch on the
      paper, the other tool to develop would be different, easier to
      implement. These are dynamic knowledge models represented by a box
      morph and scripted with smalltalk code edited by the user (teacher
      or student). The aim is high indeed.<br>
    </div>
    <div><br>
    </div>
    Hilaire</div><div text="#000000" bgcolor="#FFFFFF"><br>
    <div><br>
    </div>
    <div>Le 14/09/2025 à 09:06, Luciano
      Notarfrancesco a écrit :<br>
    </div>
    <blockquote type="cite">
      <div dir="auto">Very cool! Do the tools snap to lines,
        intersections, etc?</div>
    </blockquote>
    <pre cols="72">-- 
<a href="http://mamot.fr/@drgeo" target="_blank">http://mamot.fr/@drgeo</a></pre>
  </div>

-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div></div>