Eroormessage of CSG cut

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Eroormessage of CSG cut

J. Scheurich
Hi,

When i try to use CGALS's CSG cut, i get the following exception:


CGAL exception: tm_to_output_edges.count(h, tm, tm)) != 0

What does this mean ?

so long
MUFTI

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


Reply | Threaded
Open this post in threaded view
|

Re: Eroormessage of CSG cut

andreas.fabri

Honestly, how do you expect to get a helpful reply to this kind of message.

Please provide a self contained example on gist.git.com together with
a small data set where you get the exception, so that we can try to
reproduce/analyze/fix

Best,

Andreas

On 3/12/2020 7:15 AM, J. Scheurich wrote:
Hi,

When i try to use CGALS's CSG cut, i get the following exception:


CGAL exception: tm_to_output_edges.count(h, tm, tm)) != 0

What does this mean ?

so long
MUFTI

-- 
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912    skype: andreas.fabri
Reply | Threaded
Open this post in threaded view
|

Re: Eroormessage of CSG cut

J. Scheurich


On 12.03.20 10:03, Andreas Fabri wrote:
>
> Honestly, how do you expect to get a helpful reply to this kind of
> message.
>
> Please provide a self contained example on gist.git.com together with
> a small data set where you get the exception, so that we can try to
> reproduce/analyze/fix
>

The test program is at

http://wdune.ourproject.org/examples/reduced.cpp

but the mesh .off data of

http://wdune.ourproject.org/examples/reduced1.off

can not be read by cgal (another bug ?), while meshlab can read it.

To view the execption, you can use white_dune (open source, but needs a lot
of libraries), there is a binary for MSWindows 10, MacOSX, Ubuntu LINUX,
Arch Linux,
OpenSuse Linux  and Debian Linux. It is also part of fedora 33.

Run

$ dune http://wdune.ourproject.org/examples/cgal_test.x3dv

and click to Group and then use Indexed(Face)Set -> boolean operations
-> cut

so long
MUFTI
 

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


Reply | Threaded
Open this post in threaded view
|

Re: Eroormessage of CSG cut

Maxime Gimeno
Meshlab is able to read the off because it ignores  the N blahblah lines, which your CGAL version does not. Where did you find that off ? 

Le jeu. 12 mars 2020 à 16:01, J. Scheurich <[hidden email]> a écrit :


On 12.03.20 10:03, Andreas Fabri wrote:
>
> Honestly, how do you expect to get a helpful reply to this kind of
> message.
>
> Please provide a self contained example on gist.git.com together with
> a small data set where you get the exception, so that we can try to
> reproduce/analyze/fix
>

The test program is at

http://wdune.ourproject.org/examples/reduced.cpp

but the mesh .off data of

http://wdune.ourproject.org/examples/reduced1.off

can not be read by cgal (another bug ?), while meshlab can read it.

To view the execption, you can use white_dune (open source, but needs a lot
of libraries), there is a binary for MSWindows 10, MacOSX, Ubuntu LINUX,
Arch Linux,
OpenSuse Linux  and Debian Linux. It is also part of fedora 33.

Run

$ dune http://wdune.ourproject.org/examples/cgal_test.x3dv

and click to Group and then use Indexed(Face)Set -> boolean operations
-> cut

so long
MUFTI
 

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


Reply | Threaded
Open this post in threaded view
|

Re: Eroormessage of CSG cut

Maxime Gimeno
Also, this input is not a valid surface mesh, as it dreams to have orientation problems. This is probably the origin of the exception.

Le jeu. 12 mars 2020 à 16:06, Maxime Gimeno <[hidden email]> a écrit :
Meshlab is able to read the off because it ignores  the N blahblah lines, which your CGAL version does not. Where did you find that off ? 

Le jeu. 12 mars 2020 à 16:01, J. Scheurich <[hidden email]> a écrit :


On 12.03.20 10:03, Andreas Fabri wrote:
>
> Honestly, how do you expect to get a helpful reply to this kind of
> message.
>
> Please provide a self contained example on gist.git.com together with
> a small data set where you get the exception, so that we can try to
> reproduce/analyze/fix
>

The test program is at

http://wdune.ourproject.org/examples/reduced.cpp

but the mesh .off data of

http://wdune.ourproject.org/examples/reduced1.off

can not be read by cgal (another bug ?), while meshlab can read it.

To view the execption, you can use white_dune (open source, but needs a lot
of libraries), there is a binary for MSWindows 10, MacOSX, Ubuntu LINUX,
Arch Linux,
OpenSuse Linux  and Debian Linux. It is also part of fedora 33.

Run

$ dune http://wdune.ourproject.org/examples/cgal_test.x3dv

and click to Group and then use Indexed(Face)Set -> boolean operations
-> cut

so long
MUFTI
 

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


Reply | Threaded
Open this post in threaded view
|

Re: Eroormessage of CSG cut

Maxime Gimeno
Actually reduced1.off is not a valid OFF, it represents a mesh that is not manifold and not trianglated. Refinement functions require all those things.

Le jeu. 12 mars 2020 à 16:27, Maxime Gimeno <[hidden email]> a écrit :
Also, this input is not a valid surface mesh, as it dreams to have orientation problems. This is probably the origin of the exception.

Le jeu. 12 mars 2020 à 16:06, Maxime Gimeno <[hidden email]> a écrit :
Meshlab is able to read the off because it ignores  the N blahblah lines, which your CGAL version does not. Where did you find that off ? 

Le jeu. 12 mars 2020 à 16:01, J. Scheurich <[hidden email]> a écrit :


On 12.03.20 10:03, Andreas Fabri wrote:
>
> Honestly, how do you expect to get a helpful reply to this kind of
> message.
>
> Please provide a self contained example on gist.git.com together with
> a small data set where you get the exception, so that we can try to
> reproduce/analyze/fix
>

The test program is at

http://wdune.ourproject.org/examples/reduced.cpp

but the mesh .off data of

http://wdune.ourproject.org/examples/reduced1.off

can not be read by cgal (another bug ?), while meshlab can read it.

To view the execption, you can use white_dune (open source, but needs a lot
of libraries), there is a binary for MSWindows 10, MacOSX, Ubuntu LINUX,
Arch Linux,
OpenSuse Linux  and Debian Linux. It is also part of fedora 33.

Run

$ dune http://wdune.ourproject.org/examples/cgal_test.x3dv

and click to Group and then use Indexed(Face)Set -> boolean operations
-> cut

so long
MUFTI
 

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


Reply | Threaded
Open this post in threaded view
|

Re: Eroormessage of CSG cut

J. Scheurich
In reply to this post by Maxime Gimeno

> Meshlab is able to read the off because it ignores the N blahblah
> lines, which your CGAL version does not. Where did you find that off ?

The .off files has been writen by white_dune. white:dune can triangulate
meshes and the normal lines
can be deleted in a editor.

I will change the test data.

thanks
so long
MUFTI

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


Reply | Threaded
Open this post in threaded view
|

Re: Eroormessage of CSG cut

J. Scheurich


On 12.03.20 16:56, J. Scheurich wrote:
>
>> Meshlab is able to read the off because it ignores the N blahblah
>> lines, which your CGAL version does not. Where did you find that off ?
>
> The .off files has been writen by white_dune. white:dune can triangulate
> meshes and the normal lines
> can be deleted in a editor.
>
> I will change the test data.

Updated:

 https://wdune.ourproject.org/examples/reduced.cpp

 https://wdune.ourproject.org/examples/reduced1.off
 https://wdune.ourproject.org/examples/reduced2.off


Now the errormessage is much more usefull:

$  g++ -g -O0 reduced.cpp -lCGAL -lgmp -lmpfr
$ ./a.out
terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: it_poly_hedge!=edge_to_hedge.end()
File:
/usr/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h
Line: 1008
Aborted (core dumped)


thanks
so long
MUFTI


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


Reply | Threaded
Open this post in threaded view
|

Re: Eroormessage of CSG cut

Maxime Gimeno
Your inputs are now triangle surface meshes, good, but they are strongly self-intersected. It is a documented pre-condition for refinement that both input are not self-intersecting and are bounding a volume. 
And They must be 2-manifold. It means for example that you cannot consider 2 cubes glued together into one mesh, you need to remove the internal face so that an edge only has 2 faces attached to it. Here, at several places in reduced1.off, there are sorts of internal panels separating the volume. This is probably the problem that triggers your current assertion.

Le jeu. 12 mars 2020 à 23:02, J. Scheurich <[hidden email]> a écrit :


On 12.03.20 16:56, J. Scheurich wrote:
>
>> Meshlab is able to read the off because it ignores the N blahblah
>> lines, which your CGAL version does not. Where did you find that off ?
>
> The .off files has been writen by white_dune. white:dune can triangulate
> meshes and the normal lines
> can be deleted in a editor.
>
> I will change the test data.

Updated:

 https://wdune.ourproject.org/examples/reduced.cpp

 https://wdune.ourproject.org/examples/reduced1.off
 https://wdune.ourproject.org/examples/reduced2.off


Now the errormessage is much more usefull:

$  g++ -g -O0 reduced.cpp -lCGAL -lgmp -lmpfr
$ ./a.out
terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: it_poly_hedge!=edge_to_hedge.end()
File:
/usr/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h
Line: 1008
Aborted (core dumped)


thanks
so long
MUFTI


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


Reply | Threaded
Open this post in threaded view
|

Re: Eroormessage of CSG cut

J. Scheurich

> Your inputs are now triangle surface meshes, good, but they are
> strongly self-intersected. It is a documented pre-condition for
> refinement that both input are not self-intersecting and are bounding
> a volume. 
> And They must be 2-manifold. It means for example that you cannot
> consider 2 cubes glued together into one mesh, you need to remove the
> internal face so that an edge only has 2 faces attached to it. Here,
> at several places in reduced1.off, there are sorts of internal panels
> separating the volume. This is probably the problem that triggers your
> current assertion.
>
Strange, a similar dataset was working in past in Ubuntu 18.04 LTS

https://www.pro-linux.de/artikel/2/image/1991/15549,bild-16-boolean-operationen.html
https://www.pro-linux.de/artikel/2/image/1991/15550,bild-17-boolean-operationen.html

so long
MUFTI

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


Reply | Threaded
Open this post in threaded view
|

Re: Eroormessage of CSG cut

Sebastien Loriot (GeometryFactory)
Self-intersections are an issue near the overlap region so
you probably did not have the problem because the operation
was far from the non-manifold edges. There is the named parameter
throw_on_self_intersection() that will let you know when there
is a problem.

Sebastien.

On 3/13/20 11:03 AM, J. Scheurich wrote:

>
>> Your inputs are now triangle surface meshes, good, but they are
>> strongly self-intersected. It is a documented pre-condition for
>> refinement that both input are not self-intersecting and are bounding
>> a volume.
>> And They must be 2-manifold. It means for example that you cannot
>> consider 2 cubes glued together into one mesh, you need to remove the
>> internal face so that an edge only has 2 faces attached to it. Here,
>> at several places in reduced1.off, there are sorts of internal panels
>> separating the volume. This is probably the problem that triggers your
>> current assertion.
>>
> Strange, a similar dataset was working in past in Ubuntu 18.04 LTS
>
> https://www.pro-linux.de/artikel/2/image/1991/15549,bild-16-boolean-operationen.html
> https://www.pro-linux.de/artikel/2/image/1991/15550,bild-17-boolean-operationen.html
>
> so long
> MUFTI
>

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