Computing CSG-tree boundaries as algebraic expressions