tudelft3d/3d-building-metrics

Computation of intersection between more than 2 faces

Opened this issue · 2 comments

Is this correct?

https://github.com/liberostelios/urban-morphology-3d/blob/fba6e83a773ca6948438d85c6277226bc83406c5/geometry.py#L184-L185

In most cases len(polys)==2, but if len(polys)>2 wouldn't these lines give the wrong intersection result?

In theory not, because this calculation is done in a per plane base, so there can be more than two polygons that are on the same plane and need to be intersected. Think of two buildings, one having a long polygon on one side and the other one touching it at two different polygons on the other side.

I think that's the case, here. Unless I am missing something.

Just realised you are right, actually. At the first intersection, we already lost the rest of the polygon. This needs to be implemented in a way that all possible intersections are taken into account.