Skip to content
forked from r03ert0/skeleton

Mean curvature flow mesh skeleton

Notifications You must be signed in to change notification settings

smcolby/skeleton

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

skeleton

Roberto Toro, May 2017.

Computes the mean curvature flow skeleton of a mesh. The command takes 3 arguments:

  • argv[1]: Input mesh in .off format (by default, it will read data/elephant.off)
  • argv[2]: Output skeleton in .cgal format (by default, it will write to skel.cgal)
  • argv[3]: Output point correspondances in .cgal format (by default, it will write to correspondance.cgal)

There are additionally two python scripts, cgal2curves.py and cgal2graph.py, which take a skeleton in .cgal format and output either the curves converted into EditMesh's .txt format, or just a graph.

Compilation instructions

The code comes from the Skeleton example in CGAL, simple_mcfskel_example.cpp. Copy/paste it from CGAL's web page, move to an empty directory, and used the script cgal_create_cmake_script to create a CMakeLists.txt file. Skeleton uses the Eigen3 library. Add it manually to the CMakeLists.txt file like this:

# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.


project( skeleton_ )

cmake_minimum_required(VERSION 2.8.10)

find_package(CGAL QUIET COMPONENTS Core )

if ( CGAL_FOUND )

  include( ${CGAL_USE_FILE} )

#-------------------------------------------------------
# Include Eigen3
find_package(Eigen3 3.0.91) 
if(EIGEN3_FOUND) 
   include( ${EIGEN3_USE_FILE} ) 
else() 
   message(STATUS "NOTICE: Eigen library is not found.") 
endif() 
#-------------------------------------------------------

  include( CGAL_CreateSingleSourceCGALProgram )

  create_single_source_cgal_program( "skeleton.cpp" )

else()
  
    message(STATUS "This program requires the CGAL library, and will not be compiled.")
  
endif()

Finally, cmake . then make, and the code is compiled.

About

Mean curvature flow mesh skeleton

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 47.5%
  • C++ 41.0%
  • CMake 11.5%