From: Ian Jackson Date: Sun, 17 Feb 2008 19:43:37 +0000 (+0000) Subject: now right except for at join X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=moebius2.git;a=commitdiff_plain;h=b80ac2586e60a67554af86a8345ccff79af8a570 now right except for at join --- diff --git a/output.c b/output.c index e37aa7c..95a26c3 100644 --- a/output.c +++ b/output.c @@ -10,6 +10,10 @@ * - scale the coordinates * - translate the coordinates so they're all positive */ +/* + * ./output-64 t.stl + * meshlab t.stl + */ /* * Re STL, see: * http://www.ennex.com/~fabbers/StL.asp @@ -149,6 +153,10 @@ static double scale; 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 int_identity_function(int i) { return i; } + static void normalise_thick(double a[D3]) { /* multiplies a by a scalar so that its magnitude is thick */ int k; @@ -262,8 +270,10 @@ static void compute_outvertices(void) { normalise_thick(radius_cos); normalise_thick(radius_sin); + int_map *around_map= y ? int_identity_function : defs_aroundmap_swap; + for (around=0; around