00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "euler.h"
00017 #include "print.h"
00018 #include <cmath>
00019
00020
00021 namespace euler
00022 {
00023
00024
00025
00026
00027 edge_t* face_t :: arc(edge_t* e, point_t const& cntr, float r, float theta1, float theta2, int segs)
00028 {
00029 loop_t *l = e->l;
00030 float step = (theta2-theta1)/segs, theta = step;
00031 for(int i=0; i<segs; i++, theta += step)
00032 {
00033 e = l->mev(e, point_t (cntr[0] + r * cos( theta ),
00034 cntr[1] + r * sin( theta ),
00035 cntr[2]));
00036 }
00037 l->del_single_vertex_edge_pair();
00038 return e;
00039 }
00040
00041
00042
00043 }