[Ipe-discuss] Specify direction of an arc in a curve containing many segments

Andrew Martchenko andrew.martchenko at gmail.com
Thu Nov 24 06:54:58 CET 2016


Hi all,

I have written an ipelet (attached) called "fillet", which will create 
circular fillets on a polyline or polygon. The problem I am having is 
that I am unable to specify which side of an arc to draw when 
constructing the filleted curve. On line 108, swapping x1 and x2 around 
in the function
     ipe.Arc(ipe.Matrix(r, 0, 0, r, c.x, c.y), x1, x2)
does not make a difference to the arc that gets drawn.

I have attached a test.ipe file to illustrate the problem. Here's how to 
run the ipelet
1) select the shape
2) type Ctrl-F
3) enter 12 for the radius of the fillet and select OK

Notice that the inner fillets are correctly applied while the outer 
fillets are incorrect. So how can I specify the direction in which the 
arc is drawn.

Also, how would I go about deleting the old polygon/polyline?

Cheers,
Andrew M.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: fillet.lua
Type: text/x-lua
Size: 2965 bytes
Desc: not available
URL: <http://lists.science.uu.nl/pipermail/ipe-discuss/attachments/20161124/14b964c4/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.ipe
Type: text/xml
Size: 6426 bytes
Desc: not available
URL: <http://lists.science.uu.nl/pipermail/ipe-discuss/attachments/20161124/14b964c4/attachment-0001.xml>


More information about the Ipe-discuss mailing list