[Ipe-discuss] Creating arcs in lua ipelet
cristo
ccristoo at gmail.com
Tue Oct 26 15:25:11 CEST 2010
Hello,
I am trying to create an ipe.Arc in a lua ipelet using the following code:
arc_shape = {}
table.insert(arc_shape, { type="curve", closed=false })
table.insert(arc_shape, { type="arc", arc=ipe.Arc(m, points[j], points[i])
})
table.insert(arcs, ipe.Path(model.attributes, arc_shape))
where the points table is obtained in the following way:
for i, obj, sel, layer in p:objects()
do
if sel
then
if obj:type() == "reference" and obj:symbol():sub(1,5) == "mark/"
then
table.insert(points, obj:matrix() * obj:position())
end
end
end
When I run the ipelet, I get this error
/home/cristo/.ipe/ipelets/rch.lua:340: element 2 has invalid type
stack traceback:
[C]: in function 'Path'
/home/cristo/.ipe/ipelets/rch.lua:340: in function 'maximal_arcs'
The line mentioned in the error is in which ipe.Path is created. Does anyone
can see where am I wrong?
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/ipe-discuss/attachments/20101026/0d1ac77e/attachment.html
More information about the Ipe-discuss
mailing list