Skip to content

Instantly share code, notes, and snippets.

View afabri's full-sized avatar

Andreas Fabri afabri

View GitHub Profile
@afabri
afabri / CoreBug.cpp
Last active March 4, 2016 15:39
minimal example for SVD bug
#include <iostream>
#include <CGAL/leda_real.h>
#include <CGAL/CORE_Expr.h>
#include <CGAL/Lazy_exact_nt.h>
std::ostream& operator<<(std::ostream& os, std::pair<double,double> p)
{
os << p.first << ", " << p.second;
return os;
@afabri
afabri / vertices.cpp
Created January 27, 2016 12:00
Distinguish inner and boundary vertices of a Mesh_complex_3_in_triangulation_3
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Mesh_triangulation_3.h>
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
#include <CGAL/Mesh_criteria_3.h>
#include <CGAL/Labeled_image_mesh_domain_3.h>
#include <CGAL/make_mesh_3.h>
#include <CGAL/Image_3.h>
@afabri
afabri / sdg.cpp
Created October 13, 2015 13:51
Segment Delaunay Graph
#include <iostream>
#include <fstream>
#include <cassert>
// example that uses the filtered traits,
// the segment Delaunay graph and the spatial sorting
// choose the kernel
#include <CGAL/Simple_cartesian.h>
@afabri
afabri / point_iterator.cpp
Created June 8, 2015 14:07
An Ersatz for Surface_mesh<P>::Point_iterator
#include <vector>
#include <boost/foreach.hpp>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/centroid.h>
typedef CGAL::Simple_cartesian<double> K;
typedef CGAL::Surface_mesh<K::Point_3> Mesh;