LR-splines  0.5
reduceContinuity.cpp
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <iostream>
00003 #include <string.h>
00004 #include <fstream>
00005 #include "LRSpline/LRSplineSurface.h"
00006 #include "LRSpline/Profiler.h"
00007 #include "LRSpline/Element.h"
00008 #include "LRSpline/Meshline.h"
00009 
00010 using namespace LR;
00011 using namespace std;
00012 
00013 int main(int argc, char **argv) {
00014         if(argc < 2) {
00015                 cout << "Usage: " << argv[0] << " <inputfile>\n";
00016                 exit(1);
00017         }
00018         
00019         ifstream inputfile;
00020         inputfile.open(argv[1]);
00021         if(!inputfile.is_open()) {
00022                 cerr << "Error: could not open file " << argv[1] << endl;
00023                 exit(2);
00024         }
00025         LRSplineSurface lr;
00026         inputfile >> lr;
00027         int p1 = lr.order(0);
00028         int p2 = lr.order(1);
00029 
00030         for(Meshline *m : lr.getAllMeshlines()) {
00031                 if(m->span_u_line_)
00032                         lr.insert_const_v_edge(m->const_par_, m->start_, m->stop_, p2-1);
00033                 else 
00034                         lr.insert_const_u_edge(m->const_par_, m->start_, m->stop_, p1-1);
00035         }
00036 
00037         cout << lr;
00038 
00039 }