added detection for inside-out models

This commit is contained in:
casperlamboo 2015-10-16 14:28:10 +02:00
parent 0f6c73e93f
commit 7ae57e0bda

View File

@ -342,6 +342,21 @@ export default class {
return a.boundSize() - b.boundSize();
});
console.log('test');
if (holes.length > outlines.length) {
[holes, outlines] = [outlines, holes];
}
else if (holes.length === outlines.length) {
holes.sort((a, b) => {
return a.boundSize() - b.boundSize();
});
if (holes[0].boundSize > outlines[0].boundSize()) {
[holes, outlines] = [outlines, holes];
}
}
for (var i = 0; i < holes.length; i ++) {
var hole = holes[i];