Creating arcs in lua ipelet

"[cristo]" <[email protected]>
Newsgroups gmane.comp.graphics.ipe.general
Message-ID <[email protected]>
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

_______________________________________________
Ipe-discuss mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/ipe-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.