GlobFit:ConsistentlyFittingPrimitivesbyDiscoveringGlobalRelations