From 24e22f20c3f0d7d7c0d0cb47a7a37dd7acde8837 Mon Sep 17 00:00:00 2001 From: soypat Date: Wed, 18 May 2022 01:39:21 -0300 Subject: [PATCH] test change ImportModel --- helpers/sdfexp/import_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/helpers/sdfexp/import_test.go b/helpers/sdfexp/import_test.go index 5339fbd..6ef1183 100644 --- a/helpers/sdfexp/import_test.go +++ b/helpers/sdfexp/import_test.go @@ -1,6 +1,7 @@ package sdfexp_test import ( + "os" "testing" "github.com/soypat/sdf/form3" @@ -10,7 +11,7 @@ import ( ) func TestImportModel(t *testing.T) { - const quality = 80 + const quality = 128 s, _ := form3.Sphere(5) s, _ = thread.Bolt(thread.BoltParms{ Thread: thread.ISO{D: 16, P: 2}, @@ -21,6 +22,12 @@ func TestImportModel(t *testing.T) { if err != nil { t.Fatal(err) } + fp, _ := os.Create("src.stl") + defer fp.Close() + err = render.WriteSTL(fp, model) + if err != nil { + t.Fatal(err) + } sdf, err := sdfexp.ImportModel(model, 0) if err != nil { t.Fatal(err)