protected void add(Iterator shapeIterator){
  while (shapeIterator.hasNext()) {
    try {
      Shape3D shape=(Shape3D)shapeIterator.next();
      if (shape != null) {
        add(shape);
      }
    }
 catch (    ClassCastException cce) {
      continue;
    }
  }
}

protected void add ( Iterator shapeIterator ) { while ( shapeIterator . hasNext ( ) ) { try { Shape3D shape = ( Shape3D ) shapeIterator . next ( ) ; if ( shape != null ) { add ( shape ) ; } } catch ( ClassCastException cce ) { continue ; } } }
add the shape3d objects from an iterator .
