See https://analysissitus.org/forum/index.php?threads/how-to-combine-a-set-of-shapes-into-one-shape-ocaf.451/