Subversion Repositories gelsvn

Rev

Rev 630 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 630 Rev 631
Line 89... Line 89...
89
        for(v = m.vertices_begin(); v != m.vertices_end(); ++v)
89
        for(v = m.vertices_begin(); v != m.vertices_end(); ++v)
90
            if(!boundary(m, *v))
90
            if(!boundary(m, *v))
91
                m.pos(*v) = Vec3d(0.0);
91
                m.pos(*v) = Vec3d(0.0);
92
		
92
		
93
        VertexAttributeVector<Vec3d> new_pos(m.no_vertices());
93
        VertexAttributeVector<Vec3d> new_pos(m.no_vertices());
94
        for(int i = 0; i < 10000; ++i){
94
        for(int i = 0; i < 15000; ++i){
95
            for(v = m.vertices_begin(); v != m.vertices_end(); ++v){
95
            for(v = m.vertices_begin(); v != m.vertices_end(); ++v){
96
				if(boundary(m, *v))
96
				if(boundary(m, *v))
97
				{
97
				{
98
					if(ws == LSCM_W && touched[*v] != 1)
98
					if(i>5000 && ws == LSCM_W && touched[*v] != 1)
99
					{
99
					{
100
						Vec3d p_new(0);
100
						Vec3d p_new(0);
101
						double w_sum = 0;
101
						double w_sum = 1e-6;
102
						Vec3d grad_sum(0.0);
102
						Vec3d grad_sum(0.0);
103
						Walker wv = m.walker(*v);
103
						Walker wv = m.walker(*v);
104
						for(;!wv.full_circle(); wv = wv.circulate_vertex_ccw())
104
						for(;!wv.full_circle(); wv = wv.circulate_vertex_ccw())
105
                        {
105
                        {
106
							if(wv.face() != InvalidFaceID)
106
							if(wv.face() != InvalidFaceID)
Line 121... Line 121...
121
                        new_pos[*v] = m.pos(*v);
121
                        new_pos[*v] = m.pos(*v);
122
				}
122
				}
123
				else
123
				else
124
				{
124
				{
125
					Vec3d p_new(0);
125
					Vec3d p_new(0);
126
					double w_sum = 0;
126
					double w_sum = 1e-6;
127
					for(Walker wv = m.walker(*v); !wv.full_circle(); wv = wv.circulate_vertex_ccw()) 
127
					for(Walker wv = m.walker(*v); !wv.full_circle(); wv = wv.circulate_vertex_ccw()) 
128
					{
128
					{
129
						double w = edge_weights[wv.halfedge()];
129
						double w = edge_weights[wv.halfedge()];
130
						p_new += Vec3d(m.pos(wv.vertex()) * w);
130
						p_new += Vec3d(m.pos(wv.vertex()) * w);
131
						w_sum += w;
131
						w_sum += w;