How to modify the nodes of an object defined as a shape