Porting SVG path from objects into shape

objects is pointer chain, shape is a tree