Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Same code - different compilation results
  • Date: Thu, 10 Sep 2020 09:37:04 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:loFc0hNFHlGSGoZ+e6cl6mtUPXoX/o7sNwtQ0KIMzox0K/3/rsbcNUDSrc9gkEXOFd2Cra4d1ayP6fyrCTVIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfLJ/IA+roQnPucQajohvJrsswRbVv3VEfPhby3l1LlyJhRb84cmw/J9n8ytOvv8q6tBNX6bncakmVLJUFDspPXw7683trhnDUBCA5mAAXWUMkxpHGBbK4RfnVZrsqCT6t+592C6HPc3qSL0/RDqv47t3RBLulSwKMSMy/mPKhcxqlK9VvQyvpxJ/zYDXbo+aOvVxcaHBct4BX2VNQtxcWjZdDo6ybYYCCfcKM+ZCr4n6olsDtQezBQ+xC+P11DBHnGT21rA63es7Cg7Gxg0gFM8JvXvOqtX6Kb0SXv6vw6nT1znDYelZ1izn6IjJaR0hru+DXbV1ccXP1UkvDQPEjluKpoP5IzOV0f4NsmiB4+V8UuKvjncqpgdsqTeg2skikJPGhp4Jyl/a7yV5xp44KcGlRUN4btOqEJVeuj+VOYdoTM4vXX1ktSYkx7AYpZO2fysHxZQjyhDfZfGKcoaG7w/+WeuMPzp1hXxodK6jixu07EOuxOr8Vsyu31ZLqCpIit/MuWoW2BPI7siIVOFx8Vum2TaK0Q3Y9+JKIVgsmKfUKpMt2KM8moYTvEjZHiL7ml/6gLGKekk44uSl7/jrbq/7qpOBNIJ4kBzyP6oql8ClHOg1MBACU3SB9eigzrHv4Vf1TKlMg/YrjKTZtI3aJd8HpqGnGQ9bz4cj6hehADq+zNgVm2QMIkhfdxKdlYfpPknDIPDmAve7hFShiDVmy+rDPr3mDJjBNH3Dn63gfbZ58kJczxczzcxF65JTFLEBIOj/Wknvu9zEFhM5Mgq0zPj7CNhl2Y4TWHiDDrKFPK7Sq1OF5uAiL/OSaIMJpDrxM/0l6OTvjX89l18dZ66p3Z4PZX+iGPRpPl+ZbmT2jdcaC2sKsBAxQ/fwiF2DSjNTaGi9X6U55j4lFIKmF4fCRo63j7OdwCe7GYdWZ2BcBl+QFnfocp2IW+0QZyKKPs9hjjsEWKC9RI8uzx6usBb2xKdmLurP5iIYqInj1MNu6u3IlRAy8CR0AN6H32GMSWF0hGIISCUs0KBxu0xx0lKD0a9ljPNGDdFT/PZJUhsiNZLFyOx6FszyVhrBftiXTFamRc2rASk1Tt0rw94BfVx9Ftehgx3AxSaqA6Uam6aMBJwq8qLQxX7xKNhhy3re1akhiUcpQtdXOGG6nKJz6xLfC5LTn0mFj6qqb7gT3DbR9GefymqDpF1XUAFqXqXBRHwQe0rWrc/l6UPfVL+uEq8qMgpHyc6YK6tFcMfljVtcRKSrBNOLaG24nyK8BA2D26iXRIvsYWQUmivHW2YelAVG1HCKLwU3HW+PqmjEDXQ6HFTjeU7l6q9woXmhT2c7wgaPYlF7xrS88QISn+3aQPQWiOFX8Bw9oil5SQ7ul+ndDMCN8lI4IPdsJOgl6VIC7lr38hRnN8b5fa9vgVsTbx5msUrlyxJtG8NLls149Cp3njo3ErqR1RZ6Tx3d3Z30PeeLeDa0+Rf0Lavf21Wb18uKvKAR6LI+pkmx5Fj4RHpnyG1u1pxu61XZ45zLCAQIVperCxQ4+h9/qq3Acyc07J/Tz2wqOq6x4GfP

And  did you have a look at the CMakeLists.txt  ?

Maybe in yours you forgot to find Eigen ?

andreas

On 9/10/2020 9:35 AM, calvin_cw ( via cgal-discuss Mailing List) wrote:
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/

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

phone: +33.492.954.912    skype: andreas.fabri



Archive powered by MHonArc 2.6.19+.

Top of Page