GithubHelp home page GithubHelp logo

batmanabcdefg / lrsplines Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vikingscientist/lrsplines

1.0 1.0 0.0 728 KB

Locally Refined B-splines

License: Other

C++ 97.00% CMake 2.79% Shell 0.21%

lrsplines's Introduction

LR B-splines

Locally Refined B-splines

LR B-splines is a technology which enables users to perform local refinement on B-spline surfaces or volumes, which traditionally have been limited to tensor products. This has a wide variety of applications within computer-aided design (CAD) and computer-aided engineering (CAE). While this library was written with the latter in mind, it is also possible to take use of it in a design environment. For more information consult the website : http://lrbsplines.com

Getting the code

Simply press the green button on the top right of the github screen that states "Clone or download". On ubuntu (or with git bash on any OS) you can clone the library by typing in

git clone https://github.com/VikingScientist/LRsplines

Compiling the code

This is a c++ library and you will have to compile and link this to your applications accordingly. It uses CMake as the compilation tools. There are two optional dependencies which is boost and GoTools. These will expand the capabilities of the library, but are not required for compilation.Boost allows for more linear dependency testing and GoTools is a tensor product B-spline library.

Ubuntu

  1. Install all compilation tools that we are going to need

sudo apt-get install cmake g++

  1. [Optional]: Install boost

sudo apt-get install libboost-dev

  1. [Optional]: Install GoTools. This is compiled on launchpad. Add https://launchpad.net/~ifem/ (follow the instructions on site) followed by typing

    sudo apt-get install libgotools-core-dev libgotools-trivariate-dev

To compile the code, first navigate to the root catalogue of LR-splines, here denoted by <LRSpline root>

  1. cd <LRSpline root>
  2. mkdir Release
  3. cd Release
  4. cmake -DCMAKE_BUILD_TYPE=Release ..
  5. make
  6. [Optional]: make test
  7. [Optional]: sudo make install

Point 6 will run a series of test to verify that the library compiled correctly and is running as it should. Point 7 will install this on your system by placing the header-files, library-files and cmake-files in their right place (default: /usr/local/lib and /usr/local/include): this will in turn make it much easier to compile your own applications which uses this library. Changing any instance of Release with Debug makes the library compile with debug-flags on.

Windows

  1. Download and install cmake: https://cmake.org/download/
  2. Download and install visual studio: https://www.visualstudio.com/downloads/
  3. Compile a visual studio project by using cmake. See https://cmake.org/runningcmake/ for instructions
  4. Open the LRspline project in visual studio and build the project.

CMake will generate a big red warning that it cannot find GoTools. This is as expected and it will compile fine without it.

Using the Code

See the Examples/ folder for a sample c++ program that uses the LRSpline library. It assumes that CMake is able to find the config files LRSplineConfig.cmake as well as all header and library files. If these are not installed on default location (by sudo make install), then you will have to specify them manually. Hello_LRSpline.cpp is compiled and run by

  1. cd Examples
  2. cmake .
  3. make
  4. ./hello_lrspline

lrsplines's People

Contributors

vikingscientist avatar akva2 avatar fabienpean avatar

Stargazers

Batman avatar

Watchers

Batman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.