Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Same code - different compilation results

Subject: CGAL users discussion list

List archive

[cgal-discuss] Same code - different compilation results


Chronological Thread 
  • From: calvin_cw <>
  • To:
  • Subject: [cgal-discuss] Same code - different compilation results
  • Date: Thu, 10 Sep 2020 02:35:08 -0500 (CDT)
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=SoftFail ; spf=Pass
  • Ironport-phdr: 9a23:JXXbCBO3WU17ad3HD/kl6mtUPXoX/o7sNwtQ0KIMzox0Iv34rarrMEGX3/hxlliBBdydt6sazbOM7+uwACQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagYL5+Ngi6oRveu8UZgoZuN7s6xwfUrHdPZ+lY335jK0iJnxb76Mew/Zpj/DpVtvk86cNOUrj0crohQ7BAAzsoL2465MvwtRneVgSP/WcTUn8XkhVTHQfI6gzxU4rrvSv7sup93zSaPdHzQLspVzmu87tnRRn1gyoBKjU38nzYitZogaxVoByvuR9xzZPbb46JO/RzZb/dcNEGSWZdQspdSzJND4WhZIUPFeoBOuNYopHhqFQUqRu+GwisBOX3xTBUiH79wKo33Pg7HgHCwgwgHtQOv2zIo9T7L6oSUee1zLXNzTrZbvNW3S3x55TPchAkuPyBW697fsXNx0c1DQzFkkmQppL/PzOTzukDs2iV4/ZuWO+simMrtg98rzqgyMojloXEhYwYx1PK+yh43Io5OMG1RFJ1bNCrDJZcqS+XOpdoTs4jQGxkpjg2x7sbspC1eygKzY4oxx/Za/GfdYiH+AnsW/2VIThmnn5qZLW/hxO0/EO9yeP8TtG53EtOoydBiNXBuHMA2wbQ58WGUPdw/0as1DCS3A7J8O5EO1o7la/DJp4h3LEwkp0TvFzFHiL5gkn2irWZeV4/9eis9evreKnpppiZN4NsiwH+NLohmtCnDOglNgUDW3KX9Oq/2bH5/kD0Qa9Gg/w3n6XBtZDVP8Ubpqq3Aw9P1YYj7g6yACu839Qcg3kHLVRFdwqbgInnIFzOIPf4Deu6g1u2kTdrw+rKMaHmApXINnTDiqvufa5h605Azwo+1cxQ551OBbEFOf78R07xtMfEAR8kKAy02P3qCM5914MbQWKAGLWVMKLUsV+S5+IgOfOAZIEPuGW1F/9w7PHniTo1mEQWYLKy9ZoRcnGxWPp8cGuDZn+5id4FD2YMiQEhBLjhgVmcUDhkbGmaX6Ug4zg6DMStCoKVFdPlu6CIwCruRs4eXWtBEF3ZSS65JbXBYO8FbWepGuEklzUFUba7TIp4jkOusxP/wrtjaOHT/39D7M+x5J1O/+TW0CoK23l0AsCaijzfST0ymGoCTTs7mqt4pB4kkwvR4e1Dm/VdUOdrybZRSA5jbszcyPB/AtH2HAnGe4XRRQ==

I encountered a weird phenomenon which I am unable to explain. I tried to
compile a simple code on hole filling. I have reduced the code to the
simplest form, to just using Polyhedron<Kernel>.

If the code was run in the example
CGAL-5.1\examples\Polygon_mesh_processing\hole_filling_example, it executes
and ran fine.

If i were to create a new Visual studio project, with the same exact
properties, it will give me an error.
I've tried to ensures all properties are identical, but the same error
persist.

Previously, i was using an inherited polyhedron class, with the same exact
error, but now I have reduced it to the generic polyhedron<Kernel> class.
The curious thing is that the code runs when its in the example folder of
CGAL 5.1

>>> code

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Polygon_mesh_processing/triangulate_hole.h>
#include <CGAL/IO/OFF_reader.h>
#include <iostream>
#include <fstream>
#include <vector>

typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;


typedef CGAL::Polyhedron_3<Kernel> Polyhedron;

typedef Polyhedron::Halfedge_handle Halfedge_handle;
typedef Polyhedron::Facet_handle Facet_handle;
typedef Polyhedron::Vertex_handle Vertex_handle;


int main()
{
const char* filename = "data/mech-holes-shark.off";
std::ifstream input(filename);

Polyhedron poly;
if ( !input || !(input >> poly) || poly.empty() ) {
std::cerr << "Not a valid off file." << std::endl;
return 1;
}

// Incrementally fill the holes
unsigned int nb_holes = 0;
for (Halfedge_handle h : halfedges(poly))
{
if (h->is_border())
{
std::vector<Facet_handle> patch_facets;
std::vector<Vertex_handle> patch_vertices;
bool success = std::get<0>(

CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(
poly,
h,
std::back_inserter(patch_facets),
std::back_inserter(patch_vertices),

CGAL::Polygon_mesh_processing::parameters::vertex_point_map(get(CGAL::vertex_point,
poly)).geom_traits(Kernel())));

std::cout << " Number of facets in constructed patch:
" <<
patch_facets.size() << std::endl;
std::cout << " Number of vertices in constructed
patch: " <<
patch_vertices.size() << std::endl;
std::cout << " Fairing : " << (success ? "succeeded"
: "failed") <<
std::endl;
++nb_holes;
}
}

std::cout << std::endl;
std::cout << nb_holes << " holes have been filled" << std::endl;

std::ofstream out("filled.off");
out.precision(17);
out << poly << std::endl;
return 0;

}


>>>> error message

Severity Code Description Project File Line Suppression
State
Error C2825
'CGAL::Polygon_mesh_processing::internal::Fair_Polyhedron_3<TriangleMesh,SparseLinearSolver,WeightCalculator,VertexPointMap>::Sparse_linear_solver':
must be a class or namespace when followed by '::' CGAL_Testing
D:\installedLibraries\CGAL-5.1\include\CGAL\Polygon_mesh_processing\internal\fair_impl.h
46






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



Archive powered by MHonArc 2.6.19+.

Top of Page