CGAL 6.2 - 3D Skin Surface Meshing: Skin_surface_3/skin_surface_subdiv.cpp

CGAL 6.2 - 3D Skin Surface Meshing

Loading...
Searching...
No Matches
Skin_surface_3/skin_surface_subdiv.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Skin_surface_3.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/mesh_skin_surface_3.h>
#include <CGAL/subdivide_skin_surface_mesh_3.h>
#include "skin_surface_writer.h"
#include <list>
#include <fstream>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Skin_surface_traits_3<K> Traits;
typedef CGAL::Skin_surface_3<Traits> Skin_surface_3;
typedef Skin_surface_3::FT FT;
typedef Skin_surface_3::Bare_point Bare_point;
typedef Skin_surface_3::Weighted_point Weighted_point;
typedef CGAL::Polyhedron_3<K,
CGAL::Skin_surface_polyhedral_items_3<Skin_surface_3> > Polyhedron;
int main()
{
std::list<Weighted_point> l;
FT shrinkfactor = 0.5;
l.push_front(Weighted_point(Bare_point( 1,-1,-1), 1.25));
l.push_front(Weighted_point(Bare_point( 1, 1, 1), 1.25));
l.push_front(Weighted_point(Bare_point(-1, 1,-1), 1.25));
l.push_front(Weighted_point(Bare_point(-1,-1, 1), 1.25));
Polyhedron p;
Skin_surface_3 skin_surface(l.begin(), l.end(), shrinkfactor);
CGAL::mesh_skin_surface_3(skin_surface, p);
CGAL::subdivide_skin_surface_mesh_3(skin_surface, p);
std::ofstream out("mesh.off");
out << p;
return 0;
}
CGAL::Exact_predicates_inexact_constructions_kernel
CGAL::Polyhedron_3
CGAL::Skin_surface_3
The Skin_surface_3 is the main class in this package.
Definition: Skin_surface_3.h:19
CGAL::Skin_surface_traits_3
The class Skin_surface_traits_3 is designed as a default traits class for the class Skin_surface_3<Sk...
Definition: Skin_surface_traits_3.h:17
CGAL::subdivide_skin_surface_mesh_3
void subdivide_skin_surface_mesh_3(const SkinSurface_3 &skin_surface, Polyhedron &p, int nSubdiv=1)
subdivides a skin surface mesh constructed by the function mesh_skin_surface_3() using nSubdiv 1-4 sp...
CGAL::mesh_skin_surface_3
void mesh_skin_surface_3(const SkinSurface_3 &skin_surface, Polyhedron &p)
constructs a mesh of the skin_surface in p.
CGAL::Skin_surface_polyhedral_items_3
An items class for the Polyhedron_3 that stores information in faces instead of an auxiliary data str...
Definition: Skin_surface_polyhedral_items_3.h:12