test-cube-with-hole-2.cc File Reference

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

#include "euler.h"
#include "print.h"
#include <fstream>

Go to the source code of this file.

Functions

int main ()


Detailed Description

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

Definition in file test-cube-with-hole-2.cc.


Function Documentation

int main  ) 
 

Definition at line 27 of file test-cube-with-hole-2.cc.

References euler::loop_t::del_single_vertex_edge_pair(), euler::loop_t::e, euler::solid_t::f, euler::solid_t::kffmh(), euler::face_t::l, euler::solid_t::mef(), euler::loop_t::mev(), euler::pi, euler::face_t::pre, euler::solid_t::print_off_file(), and euler::solid_t::rsweep_face().

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 }


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