copy
Returns this entity rebuilt around polygon — the hook every shape-preserving operation returns through, re-abstracted so each entity class must implement it.
The implementation rebuilds an instance of the entity's own class around polygon and carries its facts across; style and tags ride along through the node it wraps. The result's runtime class must equal the receiver's — the operations check it and fail with a named error otherwise.
Return
The rebuilt entity — the receiver's own class, facts carried.
Parameters
polygon
The replacement geometry.