00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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