Makes the shape invisible within the given layer.
The function assumes that the shape is part of the diagram and that the diagram includes a layer with the given id. If the layer does not exist, an exception is thrown. If the shape is not in the diagram, the result is unspecified. If the shape is currently not in the given layer, nothing happens.