← Back to team overview

yade-users team mailing list archive

Re: [Question #669206]: malloc() : memory corruption error from ymport.textPolyhedra on yadedaily

 

Question #669206 on Yade changed:
https://answers.launchpad.net/yade/+question/669206

Bruno Chareyre proposed the following answer:
I can give indications if you want to touch some CGAL code. I think the
convex hull section you mention is indeed the right place to start
checking what happens. Since it is a rather robust library I doubt it
fails on standard point sets, most probably the problem is due to some
special cases which were not anticipated when manipulating the returned
values of CGAL (point duplicates? concavity?). It would help to compile
in debug mode to know the crashing line precisely, or even to execute
line by line and inspect the variables at runtime.

However there may be a much tougher problem than CGAL crashing on
concave or complex point sets. The Polyhedra model as a whole is
assuming convex shapes. Having a function letting you impose facets to
CGAL instead of using convex hull should not be too difficult. However
it would let you define concave shapes while the contact algorithms are
just not ready for that. That's where most of the work would be.

I think the PFacet module is more flexible on this regard and should
enable concave shapes (plus it will not give spurious changes of
stiffness when crossing edges or vertices of the polyhedral surfaces).

I hope it helps

Bruno

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.