diff --git a/Boolean2.js b/Boolean2.js index 62d7381e..cf275c28 100644 --- a/Boolean2.js +++ b/Boolean2.js @@ -328,20 +328,14 @@ function subtract( path1, path2, _cache ){ function exclude( path1, path2 ){ var res1 = subtract( path1, path2 ); var res2 = subtract( path2, path1 ); - res1 = ( res1 instanceof CompoundPath )? res1.children : [ res1 ]; - res2 = ( res2 instanceof CompoundPath )? res2.children : [ res2 ]; - var res = new CompoundPath(); - res.addChildren( res1.concat( res2 ), true ); + var res = new Group( [res1, res2] ); return res; } function divide( path1, path2 ){ var res1 = subtract( path1, path2 ); var res2 = intersect( path1, path2 ); - res1 = ( res1 instanceof CompoundPath )? res1.children : [ res1 ]; - res2 = ( res2 instanceof CompoundPath )? res2.children : [ res2 ]; - var res = new CompoundPath(); - res.addChildren( res1.concat( res2 ), true ); + var res = new Group( [res1, res2] ); return res; }