Sg2.9
intersection bug
Recent RSS
intersection bug
From:  simon
Date:  6. October 2011, 14:04

hi i just wrote the following code and noticed that the result for lines with only two points differs from lines with more points.

var selectedItems = document.getItems({ selected: true });

selectedItems[0].strokeColor = 'red';
selectedItems[1].strokeColor = 'blue';

console.log("------------------------");

for(i=0; i<selectedItems.length; i++){
for(j=0; j<selectedItems.length; j++){
if(i!=j){
console.log("c ", i, j, selectedItems[i].contains(selectedItems[j]));
console.log("i ", i, j, selectedItems[i].intersects(selectedItems[j]));

}
}
}

Scripts
26.04.12, 16:05
19.04.12, 16:54
07.04.12, 16:17
05.04.12, 00:49
15.03.12, 13:02
14.02.12, 19:00
Posts
17.05.12, 11:04
15.05.12, 02:38
15.05.12, 01:51
12.05.12, 00:54
11.05.12, 05:26
09.05.12, 21:16
Script of the Moment
Shape Contours V2 26.04.12
Donation

If you use Scriptographer regularly or for commercial purposes, please consider making a donation via PayPal:

Thank you!