Skip to Content.
Sympa Menu

cgal-discuss - 3d lines intersection point

Subject: CGAL users discussion list

List archive

3d lines intersection point


Chronological Thread 
  • From: Cédric LE MAITRE <>
  • To:
  • Subject: 3d lines intersection point
  • Date: Wed, 03 Jan 2007 12:05:02 +0100

Hi,
And happy new year to every CGAL users.

i want to compute the intersection point of 2 3D lines.
i try this code:

Point_3 ptC1(-4, 0, 0);
Point_3 ptP1(-3, 0.25, 0.25);
Point_3 ptC2(0, -4, 0);
Point_3 ptP2(0.25, -3, 0.25);

Line_3 line1(ptC1, ptP1);
Line_3 line2(ptC2, ptP2);

CGAL::Object result;
result = Kernel::Intersect_3(line1, line2);

Point_3 ptR;
if (CGAL::assign(ptR, result)) {

// handle the point intersection case.
//...
}

But it don't compile. i didn't found example which use this function.
Please how could i do that ?
Thanks,

Cedric LE MAITRE



Archive powered by MHonArc 2.6.16.

Top of Page