SRL Archive - OSR Help

Adding to TPAs


Rich

2011-06-27 04:57:55

If I have something like this:
Path:= [Point(3230, 3217), Point(3242, 3224), Point(3257, 3226),
Point(3260, 3238), Point(3254, 3250), Point(3251, 3263),
Point(3242, 3275), Point(3239, 3290), Point(3241, 3306),
Point(3251, 3317), Point(3264, 3324), Point(3278, 3332),
Point(3287, 3345), Point(3296, 3356), Point(3296, 3369),
Point(3294, 3382), Point(3292, 3396), Point(3290, 3409),
Point(3285, 3422), Point(3279, 3429), Point(3264, 3428),
Point(3252, 3429), Point(3238, 3430), Point(3224, 3429),
Point(3208, 3429), Point(3194, 3430), Point(3185, 3438),
Point(3187, 3447), Point(3179, 3450), Point(3168, 3459),
Point(3165, 3471), Point(3167, 3480), Point(3165, 3488)];
And I want to add more points later on in the script, how would I do that? I've tried all sorts of ways but I can't get it to work, and I'm sure it's just me being thick. Thanks!

masterBB

2011-06-27 05:00:29

combineTPA

Edit: I used combineTPA in my previous scripts. But I think appendTPA should also work. You can also do it manual:

setLength(TheTPA,Length(TheTPA)+1);
TheTPA[High(TheTPA)] := YourNewPoint;

TomTuff

2011-06-27 05:03:38

SetLength(TPA, Length(TPA) + 1);
TPA[High(TPA)] := Point(x, y);

masterBB

2011-06-27 05:04:31

Who was faster :P

Rich

2011-06-27 05:12:49

CombineTPA is the way forward. Thanks guys!