docs: @Pure
  	public static AbstractPathElement3D newInstance(PathElementType type, double lastX, double lastY, double lastZ, double[] coords) {
  		switch(type) {
  		case MOVE_TO:
  			return new MovePathElement3d(coords[0], coords[1], coords[2]);
  		case LINE_TO:
  			return new LinePathElement3d(lastX, lastY, lastZ, coords[0], coords[1], coords[2]);
  		case QUAD_TO:
  			return new QuadPathElement3d(lastX, lastY, lastZ, coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]);
  		case CURVE_TO:
  			return new CurvePathElement3d(lastX, lastY, lastZ, coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7], coords[8]);
  		case CLOSE:
  			return new ClosePathElement3d(lastX, lastY, lastZ, coords[0], coords[1], coords[2]);
  		default:
  		}
  		throw new IllegalArgumentException();
  	}