Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Memory fills up very fast (and the program crashes)
- Date: Mon, 08 Apr 2013 07:37:37 +0200
- Organization: GeometryFactory
Exact_predicates_exact_constructions_kernel_with_sqrt.h is a number
type really on Core_expr which requires large amount of memory
depending on the operations done.
Except if you really need the sqrt to be exact, I would suggest to use another kernel.
Sebastien.
On 04/06/2013 09:44 AM, Renato wrote:
I'm using the kernel #include
<CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h> because I
intend to use CSG operations.
The normals are computed by:
---------------------------------------------------------------------
void compute_normals_per_facet()
{
std::for_each(facets_begin(),facets_end(), Facet_normal());
}
...
struct Facet_normal
{
template<class Facet>
void operator()(Facet& f)
{
typename Facet::Halfedge_handle h = f.halfedge();
typename Facet::Normal_3 normal = CGAL::cross_product(
h->next()->vertex()->point() -
h->vertex()->point(),
h->next()->next()->vertex()->point() -
h->next()->vertex()->point());
f.normal() = normal / CGAL::sqrt((normal * normal));
}
};
---------------------------------------------------------------------
The f.normal() has correct values and everything works ok, but the computer
memory is filled very quickly (~2GB) and the program crashes.
I think it is expected.I have searched the cgal-discuss for answer but I've
got no solution.
Is there a way to have it working?
Thanks in advance!
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Memory-fills-up-very-fast-and-the-program-crashes-tp4657129.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Memory fills up very fast (and the program crashes), Renato, 04/06/2013
- Re: [cgal-discuss] Memory fills up very fast (and the program crashes), Sebastien Loriot (GeometryFactory), 04/08/2013
- [cgal-discuss] Re: Memory fills up very fast (and the program crashes), Renato, 04/08/2013
- Re: [cgal-discuss] Memory fills up very fast (and the program crashes), Sebastien Loriot (GeometryFactory), 04/08/2013
Archive powered by MHonArc 2.6.18.