topology.js
function boundary(cells) {
  var res = []
  for(var i=0,il=cells.length; i<il; ++i) {
    var c = cells[i]
    for(var j=0,cl=c.length; j<cl; ++j) {
      var b = new Array(c.length-1)
      for(var k=0, l=0; k<cl; ++k) {
        if(k !== j) {
          b[l++] = c[k]
        }
      }
      res.push(b)
    }
  }
  return normalize(res)
}
function boundary(cells) {
  var res = []
  for(var i=0,il=cells.length; i<il; ++i) {
    var c = cells[i]
    for(var j=0,cl=c.length; j<cl; ++j) {
      var b = new Array(c.length-1)
      for(var k=0, l=0; k<cl; ++k) {
        if(k !== j) {
          b[l++] = c[k]
        }
      }
      res.push(b)
    }
  }
  return normalize(res)
}
function boundary ( cells ) { var res = [ ] for ( var i = 0 , il = cells . length ; i < il ; ++ i ) { var c = cells [ i ] for ( var j = 0 , cl = c . length ; j < cl ; ++ j ) { var b = new Array ( c . length - 1 ) for ( var k = 0 , l = 0 ; k < cl ; ++ k ) { if ( k !== j ) { b [ l ++ ] = c [ k ] } } res . push ( b ) } } return normalize ( res ) }
Computes the boundary of all cells, does not remove duplicates
Computes the boundary of all cells does not remove duplicates