CGAL_assertion: identifier not found

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

CGAL_assertion: identifier not found

sergio
Adding to my code this line:

bool solved =
CGAL::Polygon_mesh_processing::remove_self_intersections(mesh);

I get the error:

"CGAL_Assertion: identifier not found"

And after check it i found the line 489 of property_map.h

CGAL_assertion(pm.set_ptr!=NULL);

Some definition is missing. What wrong?



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
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: CGAL_assertion: identifier not found

Sebastien Loriot (GeometryFactory)
mesh=?
You are probably missing a default property map. With Surface_mesh it
should be working out of the box.

Sebastien.

On 06/15/2018 12:30 PM, sergio wrote:

> Adding to my code this line:
>
> bool solved =
> CGAL::Polygon_mesh_processing::remove_self_intersections(mesh);
>
> I get the error:
>
> "CGAL_Assertion: identifier not found"
>
> And after check it i found the line 489 of property_map.h
>
> CGAL_assertion(pm.set_ptr!=NULL);
>
> Some definition is missing. What wrong?
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

--
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: CGAL_assertion: identifier not found

sergio
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;

Polyhedron mesh I will change it forĀ  Surface_mesh

On Fri, Jun 15, 2018 at 1:22 PM, Sebastien Loriot (GeometryFactory) <[hidden email]> wrote:
mesh=?
You are probably missing a default property map. With Surface_mesh it should be working out of the box.

Sebastien.


On 06/15/2018 12:30 PM, sergio wrote:
Adding to my code this line:

bool solved =
CGAL::Polygon_mesh_processing::remove_self_intersections(mesh);

I get the error:

"CGAL_Assertion: identifier not found"

And after check it i found the line 489 of property_map.h

CGAL_assertion(pm.set_ptr!=NULL);

Some definition is missing. What wrong?



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/


--
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: CGAL_assertion: identifier not found

sergio
Thank you!

On Fri, Jun 15, 2018 at 1:27 PM, sergio campo <[hidden email]> wrote:
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;

Polyhedron mesh I will change it forĀ  Surface_mesh

On Fri, Jun 15, 2018 at 1:22 PM, Sebastien Loriot (GeometryFactory) <[hidden email]> wrote:
mesh=?
You are probably missing a default property map. With Surface_mesh it should be working out of the box.

Sebastien.


On 06/15/2018 12:30 PM, sergio wrote:
Adding to my code this line:

bool solved =
CGAL::Polygon_mesh_processing::remove_self_intersections(mesh);

I get the error:

"CGAL_Assertion: identifier not found"

And after check it i found the line 489 of property_map.h

CGAL_assertion(pm.set_ptr!=NULL);

Some definition is missing. What wrong?



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/


--
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: CGAL_assertion: identifier not found

sergio
In reply to this post by Sebastien Loriot (GeometryFactory)
It doesn't work with

typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef CGAL::Surface_mesh<Kernel::Point_3>             Mesh;
        Mesh mesh;
        bool solved = true;
        solved = CGAL::Polygon_mesh_processing::remove_self_intersections(mesh);




--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
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: CGAL_assertion: identifier not found

Sebastien Loriot (GeometryFactory)
I have no crystal ball, I cannot guess what version of CGAL you are
using. If you want some help please be precise. It is compiling with my
setting with master and CGAL 4.12

Sebastien.

On 06/15/2018 01:51 PM, sergio wrote:

> It doesn't work with
>
> typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
> typedef CGAL::Surface_mesh<Kernel::Point_3>             Mesh;
>          Mesh mesh;
> bool solved = true;
> solved = CGAL::Polygon_mesh_processing::remove_self_intersections(mesh);
>
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

--
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: CGAL_assertion: identifier not found

sergio
Sorry in this way it works if I add to property_map.h ->  #include
<CGAL/assertions.h>
is it right?

bool repairOBJFile(const char* filename)
{
        std::cerr << "repairOBJFile " << std::endl;
        std::ifstream input(filename);
        if (!input)
        {
                std::cerr << "Cannot open file " << std::endl;
                return false;
        }

        std::vector<Kernel::Point_3> points;
        std::vector< std::vector<std::size_t> > polygons;
        if (!CGAL::read_OBJ(input, points, polygons))
        {
                std::cerr << "Error parsing the OFF file " << std::endl;
                return false;
        }
        //Mesh mesh;
        Polyhedron mesh;
        CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(points,
polygons, mesh);

        bool solved = solved =
CGAL::Polygon_mesh_processing::remove_self_intersections(mesh);
        if (!solved)
        {
                std::cout << "Some self-intersection could not be fixed" << std::endl;
                //return false;
        }

        std::ofstream ofs("reparedFile.obj");
        CGAL::print_polyhedron_wavefront(ofs, mesh);

        return true;
}



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
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: CGAL_assertion: identifier not found

Laurent Rineau (CGAL/GeometryFactory)
In reply to this post by sergio
Le Friday, June 15, 2018 12:30:22 PM CEST sergio a ?crit :

> Adding to my code this line:
>
> bool solved =
> CGAL::Polygon_mesh_processing::remove_self_intersections(mesh);
>
> I get the error:
>
> "CGAL_Assertion: identifier not found"
>
> And after check it i found the line 489 of property_map.h
>
> CGAL_assertion(pm.set_ptr!=NULL);
>
> Some definition is missing. What wrong?

Try add

    #include <CGAL/assertions.h>

in the list of includes at the beginning of <CGAL/property_map.h>. It seems
to be missing.

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



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