- Notifications
You must be signed in to change notification settings - Fork3
NURBS library based on libigl.
License
aijm/NURBS
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A really simple NURBS library based on libigl.libigl is a simple C++ geometry processing library, and I use it mainly for displaying the NURBS curve and surface.
Existing functions:
- compute points on curve or surface with parameters
- display NURBS curve and surface by libigl
to be continued:
- readIO and writeIO
- knot insertion and knot removal
- degree elevation and degree reduction
- NURBS curve and surface fitting
- T-Spline (it's hard ...)
This project's cmake structure is fromlibigl/libigl-example-project, which is a blank project example showing how to use libigl and cmake.
Then build, run and understand thelibigltutorial.
After downloading and installing libigl, you need to add the Path of libigl to this project by modifyingFindLIBIGL.cmake
find_path(LIBIGL_INCLUDE_DIR igl/readOBJ.h HINTS ENV LIBIGL ENV LIBIGLROOT ENV LIBIGL_ROOT ENV LIBIGL_DIR PATHS ${CMAKE_SOURCE_DIR}/../.. ${CMAKE_SOURCE_DIR}/.. ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/libigl ${CMAKE_SOURCE_DIR}/../libigl ${CMAKE_SOURCE_DIR}/../../libigl D:/Program\ Files/libigl # you can add the path like this /usr /usr/local /usr/local/igl/libigl PATH_SUFFIXES include)
Compile this project using the standard cmake routine:
mkdir buildcd buildcmake ..make
This should find and build the dependencies and create aNURBS_bin
binary.
From within thebuild
directory just issue:
./NURBS_bin
A glfw app should launch displaying a Torus surface.