Subversion Repositories gelsvn

Rev

Rev 219 | Rev 222 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 219 Rev 220
Line 138... Line 138...
138
							 not fixed by the check above. */
138
							 not fixed by the check above. */
139
							 
139
							 
140
						if(valency(he->next->vert)<5)
140
						if(valency(he->next->vert)<5)
141
								return false;
141
								return false;
142
 
142
 
143
						if((valency(he->vert) + valency(he->opp->vert) ) > 12)
143
						if((valency(he->vert) + valency(he->opp->vert) ) > 13)
144
								return false;
144
								return false;
145
 
145
 
146
						return true;
146
						return true;
147
				}
147
				}
148
 
148
 
Line 157... Line 157...
157
						q += Q2;
157
						q += Q2;
158
 
158
 
159
						float err;
159
						float err;
160
						Vec3d opt_pos(0);
160
						Vec3d opt_pos(0);
161
 
161
 
162
						//cout << q.determinant() << endl;
-
 
163
						if (q.determinant()>= 1e-5)
162
						if (q.determinant()>= 1e-15)
164
						{
163
						{
165
								opt_pos = q.opt_pos(1e-5);
164
								opt_pos = q.opt_pos(0.001);
166
								err = q.error(opt_pos);
165
								err = q.error(opt_pos);
167
						}
166
						}
168
						else
167
						else
169
						{
168
						{
170
								// To see the effectivenes of the scheme, we can create 
169
								// To see the effectivenes of the scheme, we can create 
Line 228... Line 227...
228
								VertexIter n = he->vert;
227
								VertexIter n = he->vert;
229
 
228
 
230
								// If the edge is, in fact, collapsible
229
								// If the edge is, in fact, collapsible
231
								if(m.collapse_precond(he))
230
								if(m.collapse_precond(he))
232
								{
231
								{
233
										// If our consistency checks pass, we are relatively
232
 										// If our consistency checks pass, we are relatively
234
										// sure that the contraction does not lead to a face flip.
233
 										// sure that the contraction does not lead to a face flip.
235
										if(check_consistency(he, simplify_rec.opt_pos) && 
234
										if(check_consistency(he, simplify_rec.opt_pos) && 
236
											 check_consistency(he->opp, simplify_rec.opt_pos))
235
											 check_consistency(he->opp, simplify_rec.opt_pos))
237
										{
236
										{
238
 
237
 
239
												//cout << simplify_rec.err << " " << &(*he->vert) << endl;
238
												//cout << simplify_rec.err << " " << &(*he->vert) << endl;