code: function ( inOutSegListArray ) {
  		// makes sure that the first N segments are one from each of the N polygon chains
  		var mainIdx = 0;
  		var helpIdx = this.polyData.nbPolyChains();
  		if ( helpIdx == 1 )		return;
  		var chainMarker = new Array(helpIdx);
  		var oldSegListArray = inOutSegListArray.concat();
  		for (var i=0; i<oldSegListArray.length; i++) {
  			var chainId = oldSegListArray[i].chainId;
  			if ( chainMarker[chainId] ) {
  				inOutSegListArray[helpIdx++] = oldSegListArray[i];
  			} else {
  				inOutSegListArray[mainIdx++] = oldSegListArray[i];
  				chainMarker[chainId] = true;
  			}
  		}
  	}
docs: /*
  Mathematics helper methods