Skip to Content.
Sympa Menu

cgal-discuss - Re: Re: [cgal-discuss] 3D Mesh+intersections+Eigen

Subject: CGAL users discussion list

List archive

Re: Re: [cgal-discuss] 3D Mesh+intersections+Eigen


Chronological Thread 
  • From: "Laurent Rineau (CGAL/GeometryFactory)" <>
  • To:
  • Subject: Re: Re: [cgal-discuss] 3D Mesh+intersections+Eigen
  • Date: Fri, 03 Aug 2012 15:39:06 +0200
  • Organization: GeometryFactory

Le vendredi 03 août 2012 14:03:24

a écrit :
> Hi,
> thank you for your reply!
>
> > So, I'm wondering whether:
> > 1) The allocation error is connected with a size-limit for Eigen
>
> matrixes.
>
> > std::bad_alloc is the exception that is thrown when a 'new' operator
> > cannot
> > allocate the requested memory. It means that, with the number you gave
>
> us,
>
> > the
> > Eigen matrix is probably too big to fit in your memory. If you compile
> > your
> > program in 32 bits, it can also mean that you may have enough memory,
>
> but
>
> > the
> > requested memory does not fit in the memory space that a process can use
> > in
> > 32 bits (that is less than 4Go).
>
> A memory problem was also my guess. Anyway I was surprised as I run the
> huge case (Number of verticesDT 2971971 Number of cellsC3T3 18586265) on a
> machine with 20Go of memory.
> Do you have any suggestions?

Do you compile your program using a 64 bits compiler? What is the expected
size of matrix for 2971971 vertices ?

> > 2) It is possible to accelerate intersection procedure.
> > What is the set of lines that you use?
>
> I build a vector of directions corresponding to the direction of the
> segments connecting the center of a sphere with points uniformly
> distributed on its surface. Then I build a set of lines with these
> directions and crossing each vertex using an exact kernel to build
> intersections (the Exact_predicates_inexact_constructions_kernel used to
> generate the mesh gave me inexact results for intersections).

If the lines rarely intersect the triangles, you should try to detect if
there
is an intersection, using CGAL::do_intersect or Kernel::Do_intersect_3 with
the Exact_predicates_inexact_constructions_kernel, and only use the "exact-
exact" kernel where the intersection exists. That should speed up your
intersection computations.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/




Archive powered by MHonArc 2.6.18.

Top of Page