test-cube-with-hole-2.cc

consturct a cube with hole using rotational sweep of face (lamina)

test-make-cube-with-hole-2.gif
test-cube-with-hole-2.gif

Author:
Xianming Chen
Computer Science Department
University of Utah
Date:
20 Aug 2006
Copyright (c) 2006, University of Utah
00001 /**
00002  *\file         test-cube-with-hole-2.cc
00003  *
00004  *\brief        consturct a cube with hole using rotational sweep of face (lamina)
00005  *
00006  *\example      test-cube-with-hole-2.cc
00007  *              consturct a cube with hole using rotational sweep of face (lamina)
00008  *
00009  *\image        html test-make-cube-with-hole-2.gif
00010  *\image        html test-cube-with-hole-2.gif
00011  *
00012  *\author       Xianming Chen\n
00013  *              Computer Science Department\n
00014  *              University of Utah
00015  *
00016  *\date         20 Aug 2006\n
00017  *              Copyright (c) 2006, University of Utah
00018  */
00019 
00020 
00021 #include "euler.h"
00022 #include "print.h"
00023 #include <fstream>
00024 
00025 using namespace euler;
00026 
00027 int main()
00028 {
00029   solid_t* s = solid_t :: mvfs( point_t() );
00030   face_t* f0 = s->f;
00031   loop_t *l = s->f->l;
00032   edge_t *e = l->e;
00033   e = l->mev( l->mev( l->mev( e, point_t(1.0, 0.0, 0.0) ), point_t(1.0, 0.5, 0.0) ), point_t(0, 0.5, 0.0) ); 
00034   l->del_single_vertex_edge_pair(); 
00035   s->mef(e, l->e);
00036 
00037   *s += vector_t(0.f, .5f, 0.0);
00038 
00039   cout << s << endl;
00040 
00041   s->rsweep_face( s->f, 0.0, pi * 2, 4);
00042   cout << s << endl;
00043   cout << "f0 = " << f0 << endl;
00044   face_t* f1 = f0->pre;
00045   cout << "f1 = " << f1 << endl;
00046 
00047   s->kffmh(f0, f1);
00048 
00049   cout << s << endl;
00050 
00051   ofstream os("test-cube-with-hole-2.off", ios::out);
00052   s->print_off_file(os);
00053 
00054   return 0;
00055 }
00056 
00057 

Generated on Wed Aug 30 16:27:58 2006 for euler by  doxygen 1.4.6