# | Line 67 | Line 67 | char *nm; | |
---|---|---|
67 | if (distarr == NULL) | |
68 | error(SYSTEM, "out of memory in o_face"); | |
69 | /* take first edge longer than sqrt(area) */ | |
70 | < | for (i = 1; i < fa->nv; i++) { |
71 | < | for (j = 0; j < 3; j++) |
72 | < | u[j] = VERTEX(fa,i)[j] - VERTEX(fa,i-1)[j]; |
70 | > | for (j = fa->nv-1, i = 0; i < fa->nv; j = i++) { |
71 | > | u[0] = VERTEX(fa,i)[0] - VERTEX(fa,j)[0]; |
72 | > | u[1] = VERTEX(fa,i)[1] - VERTEX(fa,j)[1]; |
73 | > | u[2] = VERTEX(fa,i)[2] - VERTEX(fa,j)[2]; |
74 | if (DOT(u,u) >= fa->area-FTINY) | |
75 | break; | |
76 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |