Page 1 of 1

Intersection of two polyhedra

Posted: Fri 9. Aug 2013, 18:12
by Hamsterpower
Hi,

I need a method to get the intersection of two polyhedra (that works preferable also on two non-convex polyhedra, but not necessarily). Did I overlook such a method, or do I have to implement it myself? (Another method for the union would also be nice)
I think that more guys could need such a method =)

Maybe some more details to ensure everybody understands what I mean:
I have two polyhedra, e.g.
IndexedFaceSet ifs1, ifs2;

Then I would like to have a method:
IndexedFaceSet intersectIndexedFaceSets(IndexedFaceSet ifs1, IndexedFaceSet ifs2){}
which returns the intersection of these two polyhedra.

Yours,
Daniel

Re: Intersection of two polyhedra

Posted: Tue 20. Aug 2013, 21:53
by gunn
As a core developer that has a pretty good overview of the existing code base ... I am afraid I have disappointing news. I know of no such method for intersection and/or union of two indexed face sets w/o boundary.

I think you'd have a better chance of implementing something like this using the half-edge data structure. That can be found at the jtem website, in particular, look at the halfedge project and the halfedgetools project. There are converters to go back and forth to IndexedFaceSets in jReality.

Re: Intersection of two polyhedra

Posted: Mon 26. Aug 2013, 13:54
by Hamsterpower
Thank you for your reply.

I will look into this projects as soon as possible :-)