Skip to content

Instantly share code, notes, and snippets.

View afabri's full-sized avatar

Andreas Fabri afabri

View GitHub Profile
@afabri
afabri / unbalanced_kd_tree.cpp
Created June 29, 2021 11:48
Unbalanced kd tree
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Timer.h>
#include <CGAL/Orthogonal_k_neighbor_search.h>
#include <CGAL/Search_traits_3.h>
#include <list>
#include <vector>
#include <cmath>
#include <fstream>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_3 Point_3;
typedef K::Segment_3 Segment_3;
typedef K::Triangle_3 Triangle_3;
#include <iostream>
int main()
{
@afabri
afabri / soup.cpp
Created May 11, 2021 07:33
Need for orientation
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/IO/polygon_soup_io.h>
#include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h>
#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Projection_traits_xy_3.h>
#include <CGAL/Triangulation_face_base_with_info_2.h>
#include <CGAL/Polygon_2.h>
#include <CGAL/Surface_mesh.h>
// needed for copy_face_graph
#include <CGAL/boost/graph/Face_filtered_graph.h>
#include <CGAL/boost/graph/graph_traits_Constrained_delaunay_triangulation_2.h>
@afabri
afabri / CMakeLists.txt
Created February 8, 2021 14:56
Poisson for Petras
# This is the CMake script for compiling this folder.
cmake_minimum_required(VERSION 3.1...3.15)
project( Poisson )
# Find CGAL
find_package(CGAL QUIET)
if ( CGAL_FOUND )
#include <CGAL/Constrained_triangulation_plus_2.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Projection_traits_xy_3.h>
#include <CGAL/Triangulation_face_base_with_info_2.h>
#include <CGAL/Triangulation_vertex_base_with_id_2.h>
typedef CGAL::Epick Kernel;
typedef Kernel::FT FieldNumberType;
typedef Kernel::Point_2 Point2;
typedef Kernel::Point_3 Point3;
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/boost/graph/split_graph_into_polylines.h>
#include <boost/graph/adjacency_list.hpp>
#include <map>
#include <vector>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/convexity_check_3.h>
#include <CGAL/Surface_mesh.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_3 Point_3;
typedef CGAL::Surface_mesh<Point_3> Surface_mesh;
void fct(const Surface_mesh& sm)
{
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/boost/graph/Dual.h>
#include <CGAL/boost/graph/helpers.h>
#include <iostream>
#include <fstream>
#include <boost/graph/filtered_graph.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
// Simplification function
#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
// Visitor base
#include <CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h>
// Stop-condition policy