Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
add KnurlHead to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
soypat committed May 15, 2022
1 parent 6b6be39 commit 65c01cd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions render/form3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ func TestForm3Gen(t *testing.T) {
view viewConfig
formFunc func(t testing.TB, stlpath string)
}{
{
name: "knurl ",
defacto: "testdata/defactoKnurl.png",
formFunc: knurlToSTL,
view: defaultView,
},
{
name: "bolt",
defacto: "testdata/defactoBolt.png",
Expand Down Expand Up @@ -125,6 +131,14 @@ func hexToSTL(t testing.TB, filename string) {
}
}

func knurlToSTL(t testing.TB, filename string) {
object, _ := thread.KnurledHead(.5, 1, .1)
err := render.CreateSTL(filename, render.NewOctreeRenderer(object, quality))
if err != nil {
t.Fatal(err)
}
}

func boltToSTL(t testing.TB, filename string) {
object, err := thread.Bolt(thread.BoltParms{
Thread: thread.ISO{D: 16, P: 2}, // M16x2
Expand Down
Binary file added render/testdata/defactoKnurl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 65c01cd

Please sign in to comment.