Accessing individual nodes in a path
Hi,
for a couple of applications I have in mind it would be very desirable if one was able to access and refer to individual nodes in a path in a way that is unaffected by future insertion/deletion of other nodes (in much the same way as accessing the members of a linked list is unaffected by insertion/deletion of other elements).
How easy would it be to achieve this, especially considering the change of path representations to 2geom? What would be necessary to implement it? Can this be easily integrated into existing path representations?
Max
On Wed, May 21, 2008 at 10:20 AM, Maximilian Albert <Anhalter42@...173...> wrote:
for a couple of applications I have in mind it would be very desirable if one was able to access and refer to individual nodes in a path in a way that is unaffected by future insertion/deletion of other nodes (in much the same way as accessing the members of a linked list is unaffected by insertion/deletion of other elements).
In essence, you will need to add a new attribute, similar to sodipodi:nodetypes, which would hold per-node information attaching it to node number. Then you will have to add support for reading and writing it into all places where path can be changed, most notably nodepath. There it's not too difficult (just model on sodipodi:nodetypes), but I think especially difficult (if possible at all) would be to track the node correspondence during operations like boolops or simplifying. Overall, quite some work I'd say.
participants (2)
-
bulia byak
-
Maximilian Albert