commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <>
Subject Re: [math] Union Produces In-Line Vertex
Date Sat, 03 Aug 2013 13:52:03 GMT
Hi Curtis,

Le 29/07/2013 23:37, Curtis Jensen a écrit :
> The 2D Euclidean union function sometimes produces an extra, in-line, vertex.
> For example, in the "testUnion" function in the
> org.apache.commons.math3.geometry.euclidean.twod.PolygonsSetTest, the
> "set" produced by the union of "set1" and "set2" has 9 vertices. I
> believe that there should only be 8.  The extra vertex is 3,2; which
> is in-line between the vertices 3,1 and 3,3.
> The overall shape of the union is correct; however, there is a vertex
> that really is not a vertex (an intersection of two distinct line
> segments).
> Is this the intended behavior or perhaps a bug?

It is an artefact of the way the outline is built. The inner
representation is not an outline (it's a BSP tree) so there is a
transformation to recover the boundary. Extra points may occur here.

For now, we don't renormalize the boundary representation after building it.

best regards,

> Thanks,
> Curtis
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message