Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] [AABB Tree] Custom triangle class
- Date: Wed, 18 Dec 2013 21:43:47 +0100
- Organization: GeometryFactory
As soon as you get out of the scope of buildAABBTree()
your vector of triangles is destructed so your iterators are invalid.
The tree is then using invalid iterators...
I think if you switch the caching on in the primitive it might be
working.
http://doc.cgal.org/latest/AABB_tree/classCGAL_1_1AABB__triangle__primitive.html
Sebastien.
On 12/14/2013 01:36 PM, Asher Kamiraze wrote:
Hi,
Philipp, did you had time to take à look at the problem? Do you think
it's a CGAL related issue, or a C++ coding one?
I can continue usine the solution where I build the AABB tree and query
it in the same method, but I'm also strongly interested in understanding
what causes the problem.
Best
Asher
Le jeudi 12 décembre 2013, Asher Kamiraze a écrit :
They are in my previous email from 11 december, 12:41. Can send them
again but do not want to overload the list. Let me know.
Asher
2013/12/12 Philipp Moeller
<>
Asher Kamiraze
<>
writes:
> Hi all,
>
> I finally managed to have a minimal test case which
reproduces the problem.
> It is attached as a new main cpp file. As you will see, the
problem arises
> when I build the AABB tree from triangles in a method, then
try to query it
> in another method. If I build the AABB tree and query it in
the same
> method, the problem does not appear, although the code is
strictly the same.
>
> Sorry for the ugly code, but please consider it as a one shot
test case to
> reproduce the problem. Just pass on the commad line the full
path to
> triangles.txt and queries.txt
It seems that there is a file missing. Could you please attach
"AABBTreeTestTypes.hpp" as well as triangles.txt and queries.txt?
>
>
> Hope you could help.
>
> Regards,
>
> Asher
>
>
> 2013/12/11 Asher Kamiraze
<>
>
>> Sorry,
>>
>> I reduced the files size to not exceed the ML limit.
>>
>> Regards,
>> Asher
>>
>>
>>
>> 2013/12/11 Asher Kamiraze
<>
>>
>>> Philipp,
>>>
>>> Here is a minimal sample which does NOT reproduces the
problem. This is
>>> nearly a copy / paste of some parts of my original code.
The only
>>> difference are:
>>>
>>> - in my code, AABBTree tree and std::map<...,...>
facetsToQuery are
>>> class members
>>> - in my code, std::map< Face_handle,
std::vector<Simple_Segment_3> >
>>> facetsToQuery; is defined as std::map< Face_handle,
>>> std::vector<Simple_Point_3> > facetsToPoints; and the
segment query in the
>>> attached sample is build from Simple_Point_3
>>>
>>> Attached archive contains triangles and queries from a real
case which
>>> causes a problem in my application.
>>>
>>> So, if you have any hint on why the attached code works and
my not, I am
>>> really interested :)
>>>
>>> Regards,
>>>
>>> Asher
>>>
>>>
>>> 2013/12/10 Philipp Moeller
<>
>>>
>>>> Asher Kamiraze
<>
writes:
>>>>
>>>> > Thank you Philipp for your answer. I agree with your
slicing idea, but
>>>> it
>>>> > appears that replacing my Custom_Triangle_3 with the
custom primitve as
>>>> > described in
>>>> >
>>>>
http://doc.cgal.org/latest/AABB_tree/AABB_tree_2AABB_custom_example_8cpp-example.htmldrops
>>>> > the same problem. Note that I use VS2010 64 + CGAL 4.2.
>>>>
>>>> By "the same problem" you mean that extra data in
My_triangle is not
>>>> properly preserved? That sounds very much like it
shouldn't happen. I
>>>> can have a look at it this week to see what is going on.
>>>>
>>>> >
>>>> > I am working on a minimal sample which reproduces the
problem, but
>>>> have to
>>>> > write it from scratch with IO from my applications. Once
done, I will
>>>> post
>>>> > it on the list with test data.
>>>> >
>>>> > You also suggest me to check how the object is
constructed. Should I
>>>> track
>>>> > in debug its insertion in the AABB tree to se
- [cgal-discuss] [AABB Tree] Custom triangle class, Asher Kamiraze, 12/06/2013
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Philipp Moeller, 12/09/2013
- Message not available
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Asher Kamiraze, 12/09/2013
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Philipp Moeller, 12/10/2013
- Message not available
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Asher Kamiraze, 12/11/2013
- Message not available
- Message not available
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Asher Kamiraze, 12/11/2013
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Asher Kamiraze, 12/12/2013
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Philipp Moeller, 12/12/2013
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Asher Kamiraze, 12/12/2013
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Asher Kamiraze, 12/14/2013
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Sebastien Loriot (GeometryFactory), 12/18/2013
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Asher Kamiraze, 12/11/2013
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Philipp Moeller, 12/10/2013
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Asher Kamiraze, 12/09/2013
- Message not available
- Re: [cgal-discuss] [AABB Tree] Custom triangle class, Philipp Moeller, 12/09/2013
Archive powered by MHonArc 2.6.18.