<commit_before>
#include <chrono>
#include <ctime>

#include <core/map/cmap2.h>

CGOGN_PRAGMA_EIGEN_REMOVE_WARNINGS_ON
#include <Eigen/Dense>
CGOGN_PRAGMA_EIGEN_REMOVE_WARNINGS_OFF

#include <io/map_import.h>

struct MyDataTraits : public cgogn::CMap2DataTraits
{
	using Vec3 = Eigen::Vector3d;
};
using Map2 = cgogn::CMap2_T<MyDataTraits, cgogn::CMap2TopoTraits<MyDataTraits>> ;

using Vec3 = Map2::DataTraits::Vec3;
using SurfaceImport = cgogn::SurfaceImport<Map2::DataTraits, Map2::TopoTraits>;
template<typename T>
using VertexAttributeHandler = Map2::VertexAttributeHandler<T>;
template<typename T>
using FaceAttributeHandler = Map2::FaceAttributeHandler<T>;

int main(int argc, char** argv)
{
	if (argc < 2)
	{
		std::cout << "USAGE: " << argv[0] << " [filename]" << std::endl;
		return 0;
	}

	cgogn::thread_start();
	Map2 map;
	for (int k = 0 ; k < 2 ; ++k)
	{

		cgogn::import::import_surface(map,argv[1]);

		std::chrono::time_point<std::chrono::system_clock> start, end;
		start = std::chrono::system_clock::now();

		VertexAttributeHandler<Vec3> vertex_position = map.get_attribute<Vec3, Map2::VERTEX>("position");
		VertexAttributeHandler<Vec3> vertex_normal = map.add_attribute<Vec3, Map2::VERTEX>("normal");
		FaceAttributeHandler<Vec3> face_normal = map.add_attribute<Vec3, Map2::FACE>("normal");

		map.enable_topo_cache<Map2::FACE>();<commit_msg>test_import opens the default aneurysm3D_1.off mesh if nothing specified.<commit_after>
#include <chrono>
#include <ctime>

#include <core/map/cmap2.h>

CGOGN_PRAGMA_EIGEN_REMOVE_WARNINGS_ON
#include <Eigen/Dense>
CGOGN_PRAGMA_EIGEN_REMOVE_WARNINGS_OFF

#include <io/map_import.h>


#define DEFAULT_MESH_PATH CGOGN_STR(CGOGN_TEST_MESHES_PATH)

struct MyDataTraits : public cgogn::CMap2DataTraits
{
	using Vec3 = Eigen::Vector3d;
};
using Map2 = cgogn::CMap2_T<MyDataTraits, cgogn::CMap2TopoTraits<MyDataTraits>> ;

using Vec3 = Map2::DataTraits::Vec3;
using SurfaceImport = cgogn::SurfaceImport<Map2::DataTraits, Map2::TopoTraits>;
template<typename T>
using VertexAttributeHandler = Map2::VertexAttributeHandler<T>;
template<typename T>
using FaceAttributeHandler = Map2::FaceAttributeHandler<T>;

int main(int argc, char** argv)
{
	std::string surfaceMesh;
	if (argc < 2)
	{
		std::cout << "USAGE: " << argv[0] << " [filename]" << std::endl;
		surfaceMesh = std::string(DEFAULT_MESH_PATH) + std::string("aneurysm3D_1.off");
		std::cout << "Using default mesh : " << surfaceMesh << std::endl;
	} else {
		surfaceMesh = std::string(argv[1]);
	}

	cgogn::thread_start();
	Map2 map;
	for (int k = 0 ; k < 2 ; ++k)
	{

		cgogn::import::import_surface(map,surfaceMesh);

		std::chrono::time_point<std::chrono::system_clock> start, end;
		start = std::chrono::system_clock::now();

		VertexAttributeHandler<Vec3> vertex_position = map.get_attribute<Vec3, Map2::VERTEX>("position");
		VertexAttributeHandler<Vec3> vertex_normal = map.add_attribute<Vec3, Map2::VERTEX>("normal");
		FaceAttributeHandler<Vec3> face_normal = map.add_attribute<Vec3, Map2::FACE>("normal");

		map.enable_topo_cache<Map2::FACE>();
{'fraction_non_alphanumeric': 0.15035877364644487, 'fraction_numerical': 0.021200260926288322, 'mean_word_length': 7.402739726027397, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3710261', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1148, 'n_words': 192}