X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=moebius2.git;a=blobdiff_plain;f=output.c;h=262991a41d978e0b02200a22ca6de92a3ed16830;hp=f8fdd3b595a5250f345146b2d6c38e18c1267bff;hb=cf1b738d035a22d539a44ca50925fb23cdb7588c;hpb=62eac09041f09319ed3abf08ea78c1695003f5a5 diff --git a/output.c b/output.c index f8fdd3b..262991a 100644 --- a/output.c +++ b/output.c @@ -12,6 +12,7 @@ */ /* * ./output-64 t.stl + * ./output-125 t.stl 0.1 50 * meshlab t.stl */ /* @@ -148,7 +149,7 @@ static void outfacet(int rev, const OutVertex *a, const OutVertex *b, const OutVertex *c); typedef int int_map(int); -static int defs_aroundmap_swap(int around) { return NDEF-around; } +static int defs_aroundmap_swap(int around) { return NDEF-1-around; } static int int_identity_function(int i) { return i; } static void normalise_thick(double a[D3]) { @@ -277,11 +278,13 @@ static void compute_outvertices(void) { FOR_RIM_VERTEX(y,x,v0) { int vfwd= EDGE_END2(v0,0); assert(vfwd >= 0); - int around; - for (around=0; around=0); gs= ovG [v0 & XMASK][rimy]; defs= ovDEF[v0 & XMASK][rimy]; - defs1= ovDEF[v1 & XMASK][rimy]; + defs1= ovDEF[v1 & XMASK][!!(v1 & ~XMASK)]; defs1aroundmap= vertices_span_join_p(v0,v1) ? defs_aroundmap_swap : int_identity_function; @@ -371,8 +374,11 @@ static void blank_outvertices(void) { static void transform_outvertex_array(int n, OutVertex ovX[n]) { int i, k; - for (i=0; i