More scripts: Vector
Syntax Highlighing:
comments, key words, predefined symbols, class members & methods, functions & classes
# adjpoly.sml
# reads the poly list of all adjacent polygons to a given polygon
# it only returns polygons that have common lines !!!
# not a single common node
clear();
class VECTOR V;
array numeric polylist[10]; # array to hold poly list
numeric numadjacent, polynum;
GetInputVector(V);
polynum = 150; # polynum = 150 works for cb_soils/CBSOILS_Light
numadjacent = GetVectorPolyAdjacentPolyList(V, polylist, polynum);
print("number of polygons adjacent to polygon:", polynum, " = ", numadjacent);
numeric i;
for i = 1 to numadjacent {
print(i, ":", polylist[i]);
}
CloseVector(V);
print("Done");