diff --git a/fightstick/main.go b/fightstick/main.go index 52e9706..6202bcb 100644 --- a/fightstick/main.go +++ b/fightstick/main.go @@ -13,10 +13,11 @@ func main() { bottoms := split2DPlane(bottomPlane()) render.RenderDXF(topPlane(), 600, "top.dxf") render.RenderDXF(wallsPlane(), 600, "walls.dxf") + //render.ToSTL(holeTest(), 400, "neutrikTest.stl", dc.NewDualContouringDefault()) + render.ToSTL(wallFrontRight(), 400, "wallfrontright.stl", dc.NewDualContouringDefault()) render.ToSTL(wallBackLeft(), 400, "wallbackleft.stl", dc.NewDualContouringDefault()) render.ToSTL(wallBackRight(), 400, "wallbackright.stl", dc.NewDualContouringDefault()) render.ToSTL(wallFrontLeft(), 400, "wallfrontleft.stl", dc.NewDualContouringDefault()) - render.ToSTL(wallFrontRight(), 400, "wallfrontright.stl", dc.NewDualContouringDefault()) render.ToSTL(innerWall(), 400, "innerwall.stl", dc.NewDualContouringDefault()) for i, ele := range tops { render.ToSTL(sdf.Extrude3D(ele, 3), 400, "top-"+strconv.Itoa(i)+".stl", dc.NewDualContouringDefault()) diff --git a/fightstick/test.go b/fightstick/test.go new file mode 100644 index 0000000..b1738ce --- /dev/null +++ b/fightstick/test.go @@ -0,0 +1,16 @@ +package main + +import ( + "github.com/deadsy/sdfx/sdf" + v2 "github.com/deadsy/sdfx/vec/v2" +) + +// test button diameter and neutrik holes +func holeTest() sdf.SDF3 { + body := sdf.Box2D(v2.Vec{X: 60, Y: 40}, 0) + body = sdf.Difference2D(body, sdf.Transform2D(neutrik(), sdf.Translate2d(v2.Vec{X: -16, Y: 0}))) + button, _ := sdf.Circle2D(BUTTON30_DIAMETER / 2) + body = sdf.Difference2D(body, sdf.Transform2D(button, sdf.Translate2d(v2.Vec{X: 13, Y: 0}))) + + return sdf.Extrude3D(body, 2) +}