Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Determining if a point is inside a polyhedron

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Determining if a point is inside a polyhedron


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Re: Determining if a point is inside a polyhedron
  • Date: Wed, 27 Mar 2013 09:15:24 +0100
  • Organization: GeometryFactory

Your code compiles in the setting I gave you, that is with using the
file include/CGAL/Triangle_3_Ray_3_do_intersect.h provided instead of
the one from CGAL.

Sebastien.

On 03/27/2013 08:53 AM, ChaoM wrote:
Hello Sebastien:
I meet a newly problem when I use the codes you give me ! I Make a
simple polyhedron,and I compile the code like this
"
{
Point p(1.0, 0.0, 0.0);
Point q(0.0, 1.0, 0.0);
Point r(0.0, 0.0, 1.0);
Point s(0.0, 0.0, 0.0);

Polyhedron polyhedron;
polyhedron.make_tetrahedron(p, q, r, s);

Point query(2,2,2);
CGAL::Point_inside_polyhedron_3<Polyhedron,K>
inside_with_ray(polyhedron);
bool ray_res;
ray_res = inside_with_ray(query);

}
"

and there is a error that" \point_inside_polyhedron_3.h(306): error C2383:
“_Other1”......"


I think the problem is into the "Point_inside_polyhedron_3.h"
---->"std::pair<boost::logic::tribool,std::size_t>
status(boost::logic::indeterminate,0);'

I don't know how to solve it ! And I guess it may cause not use the
"internal::r3t3_do_intersect_endpoint_position_visitor visitor;"???

Can you explain it to me? Thank you very much !



Sebastien Loriot (GeometryFactory) wrote
OK let's close this thread.

Here is a minimal and efficient example showing how you can test
if a point is inside a polyhedron.

However it is not yet in CGAL and required a file to be patched.
If you compile the example in the directory provided, it should works
without any problem.

Sebastien.

On 03/26/2013 08:54 AM, ChaoM wrote:
Hello Oleg:
I read your code that "Determining if a point is inside a
polyhedron?" I have the same problem! And I wanna to know "How to
construct a Polyhedron? and when I convert a common Polyhedron to a
Nef_Polyhedon, there is a error!! Finally, I exactly agree with you ,
because My goal is take two Polyhedrons (such as Cone,Clinder,Sphere,Cube
and so on!) intersections! I want to know how do you finish your goal?
Perhaps you can give me some more detail codes!
thank you!



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Determining-if-a-point-is-inside-a-polyhedron-tp4523460p4657029.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss




point_inside_polygon.tgz (9K)
&lt;http://cgal-discuss.949826.n4.nabble.com/attachment/4657034/0/point_inside_polygon.tgz&gt;





--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Determining-if-a-point-is-inside-a-polyhedron-tp4523460p4657045.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page