- triangulate the faces of the two shapes - intersect the edges of one with the triangles of the other - and vice versa - remember per triangle the point(s) introduced by the piercing edges of the other surface - combine these points with the original points of the triangle to create a (not nessecarily convex) polygon - retriangulate these polygons - you'll now have the two shapes merged. - determine which part of the intersection you want to keep.
Should be better and more info on the web but this gives you an idea of what is needed. Unfortunately can't help you with any code.
Regards,
Mattijs
Robert Gomez-Reino wrote:
Hi all, I have been reading about Jun and I did have a look to the source and it's very heavy for my purposes. I just have some quite simple shape classes created by me and I would like to be able to create one of them and substract from it another one at their intersection points. Maybe somebody has done this before and can give me some guideline to do this. Probably I would have to check the intersection of all the geometries one shape with the geometries of the other....or something like this. (?) Boby =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
-- /*---------------------------------------------------------*\ | =========== Mattijs Janssens | | \\ / Development Engineer | | \\ / | | \\ / Nabla Ltd. | | \\ / The Mews, Picketts Lodge | | \\/ Picketts Lane, Salfords, | | F ield Surrey RH1 5RG. | | O peration Tel: +44 (0)1293 821272 | | A nd Email: [EMAIL PROTECTED] | | M anipulation URL: http://www.Nabla.co.uk | \*---------------------------------------------------------*/
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".