diff --git a/lib/plasm-fun.js b/lib/plasm-fun.js index 5b321bc..c8f5586 100644 --- a/lib/plasm-fun.js +++ b/lib/plasm-fun.js @@ -191,7 +191,7 @@ !(item instanceof plasm.Struct)) { transformations = COMP2([transformations, item]); } else { - temp.push(APPLY([transformations, item]).clone()); + //temp.push(APPLY([transformations, item]).clone()); objects.push(APPLY([transformations, item])); } }); diff --git a/lib/plasm.js b/lib/plasm.js index c53426c..66ed4af 100644 --- a/lib/plasm.js +++ b/lib/plasm.js @@ -1199,19 +1199,40 @@ */ plasm.Struct.prototype.extrude = function (hlist) { - var struct = new plasm.Struct; + var newStruct = new plasm.Struct; this.models.forEach(function (model) { - struct.models.push(model.extrude(hlist)); + newStruct.models.push(model.extrude(hlist)); }); this.structs.forEach(function (struct) { - struct.structs.push(struct.extrude(hlist)); + newStruct.structs.push(struct.extrude(hlist)); }); - return struct; + return newStruct; }; + /** + * boundary + * + * @return {plasm.Struct} boundary + * @api public + */ + + plasm.Struct.prototype.boundary = function () { + var boundary = new plasm.Struct; + + this.models.forEach(function (model) { + boundary.models.push(model.boundary()); + }); + + this.structs.forEach(function (struct) { + boundary.models.push(struct.boundary()); + }); + + return boundary; + }; + /** * SimplicialComplex *