Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Fwd: Triangle_3_Segment_3_intersection question

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Fwd: Triangle_3_Segment_3_intersection question


Chronological Thread 
  • From: Matthew Denno <>
  • To:
  • Subject: Re: [cgal-discuss] Fwd: Triangle_3_Segment_3_intersection question
  • Date: Thu, 13 Aug 2009 10:40:19 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=IR1hkyyQO+K4pd5B3DSC8/l5lnf2amVlVxugxE3RWe8sBRuvQjzujVeIvGb5LP6QCk w6Dlvv/+zmZG7Ioh8mI+UxhsZbCQjbh3Cp4f5kVWRbG/0GxdbXZJ6U2/zxvRKjBX3WEe /LJCMhTH1gL5sQzvFS2E01DvJKH0cVRZq8JpI=

Hi Pierre,

Thank you for your input.  I thought maybe there was a situation, that I couldn't think of, where one might want a degenerate segment instead of a point.  Sounds like no.

I would be happy to provide my current function.  I am not at my computer right now (not the right one anyway), but I will send it later.

The function that I wrote is a Triangle_3_Triangle_3_intersection function that utilizes the Triangle_3_Segment_3_intersection function to calculate the intersection of two triangles in 3D space.  As it is currently, my function checks for degenerate segments after the the object (segment in this case) is returned from the Triangle_3_Segment_3_intersection function.  Maybe it would be better to make a change to the Triangle_3_Segment_3_intersection function or even make_segment(), so that a degenerate segment is not returned.   I can look into how to do this based on what I have already.

I should mention that I am new to C++ programming.  The program that I am currently working on is the first C++ program that I have ever written.  I am very much still learning.  My T3_T3_intesection function is not yet based on the concept of a template, as it seems most CGAL functions are; this is my next task/step.

Sorry for the long response.

Matt


On Thu, Aug 13, 2009 at 3:55 AM, Pierre Alliez <> wrote:
dear Matthew,

the behavior was not intentional and yours is better: can you provide us with your current function?

thank you,
Pierre Alliez
INRIA Sophia Antipolis - Mediterranee 
Project-team GEOMETRICA 
http://www-sop.inria.fr/members/Pierre.Alliez/
Tel: +33 4 92 38 76 77
Fax: +33 4 97 15 53 95


Matthew Denno a écrit :
Hi All,

So I have implemented a solution for my question below.  If the object returned is a segment I check to see if it is degenerate.  If it is I convert its source end to a point.  This seems to work ok.  However, I am still interested to know if this is the intended behavior or not?  Anyone have any thoughts?

Regards,

Matt

---------- Forwarded message ----------
From: Matthew Denno <>
Date: Mon, Aug 10, 2009 at 10:17 PM
Subject: Triangle_3_Segment_3_intersection question
To:


Hello,

I have a question regarding the Triangle_3_Segment_3_intersection function that is in CGAL3.5b1.  Should it ever return a degenerate Segment_3?  Seems like it should return a Point_3 instead.  Not sure if this is a bug, is the intended behavior, or I am doing something wrong. 

The situation that is giving me the degenerate segment is the intersection of a coplaner triangle and segment where the end of the segment is touching the edge of the triangle.

I can send a simple example if anyone is interested.

Thanks,

Matt





Archive powered by MHonArc 2.6.16.

Top of Page