From 7f08ca01a276b3c1e7711c4c323be9183df05d84 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 15 Apr 2020 16:21:30 +0200 Subject: [PATCH] fat edges are now printable --- 3d-models.cpp | 11 ++++++++++- graph.cpp | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/3d-models.cpp b/3d-models.cpp index d57c5f3c..87a74758 100644 --- a/3d-models.cpp +++ b/3d-models.cpp @@ -1254,7 +1254,16 @@ hpcshape& geometry_information::generate_pipe(ld length, ld width) { } } - last->flags |= POLY_TRIANGLES; + for(int a=0; aflags |= POLY_TRIANGLES | POLY_PRINTABLE; add_texture(*last); finishshape(); extra_vertices(); diff --git a/graph.cpp b/graph.cpp index 1547a860..2c2af40a 100644 --- a/graph.cpp +++ b/graph.cpp @@ -3697,7 +3697,8 @@ EX void gridline(const transmatrix& V1, const hyperpoint h1, const transmatrix& if(WDIM == 3 && fat_edges) { transmatrix T = V1 * rgpushxto0(h1); transmatrix S = rspintox(inverse(T) * V2 * h2); - queuepoly(T * S, cgi.generate_pipe(d, vid.linewidth), col); + auto& p = queuepoly(T * S, cgi.generate_pipe(d, vid.linewidth), col); + p.intester = xpush0(d/2); return; } #endif