Database.checkLineOpenLoopOrder


checkLineOpenLoopOrder(lineArray, reverseArray)

Return true if lines define a continuous open loop

lineArrayarray of Line objects On input, the lines can be given in any order. On output they will have been reordered such that they are in sequence. The input order will be disturbed as little as possible to achieve this.
reverseArrayarray of boolean This array is created and returned by the function. There will be one entry for each line. Each entry will be false if the corresponding line's direction is logically the same as the sense of the returned sequence, and will be true if they are opposite. E.g. Given two lines, 1, and 2, who share a common point, and where both line directions point towards the common point. If the returned array contains lines [1,2], the reverse array will contain [0,1] because line 1's direction is consistent with the direction [1,2]. However if the returned line array were to contain [2,1], the reverse array would contain [1,0] because now line 2's direction is consistent with the direction [2,1]
Return valueboolean

Back to Database

Back to Overview