Hi,

Hmfkz wrote:

Sorry, 3D intersection is not yet properly supported. I think it works

properly only with segments containing points with z coordinate equal to 0.

But yes, in the case of Linear/Linear geometries combinations (e.g.

Segment/Segment, Linestring/Linestring, etc.) it should be possible to

calculate the intersection in pure 3D cartesian. Linear/Areal (e.g.

Linestring/Polygon) would probably be more complicated since for each

Polygon we'd need to calculate sides (that's an implementation detail)

WRT the Polygon's surface.

Could you please fill a ticket with the feature request here

https://svn.boost.org/trac/boost/newticket so we won't forget about it?

But do you really need to find an intersection of segments in 3D? Are

those segments arbitrary distributed in 3D or are they e.g. lying on

some plane? If the latter was true, you could first project those

segments into the plane and then find the intersection of 2d segments.

In the case of "true" 3d cartesian segment/segment you could try to

implement it by yourself.

E.g. see:

http://www.realtimerendering.com/intersections.html (ray/ray

case).

Here is a formula:

http://www.realtimerendering.com/intersections.html#I304where

o1 = segment1.p1

d1 = normalized(segment1.p2 - segment1.p1)

o2 = segment2.p1

d2 = normalized(segment2.p2 - segment2.p1)

(o states for ray's "origin", d for "direction")

And there are some special cases which must be handled like parallel

rays or closest points outside a segment (t < 0 || t > length(segment)).

Regards,

Adam

_______________________________________________

Geometry mailing list

[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry