diff --git a/fightstick/body2D.go b/fightstick/body2D.go index 8ff325a..0e11049 100644 --- a/fightstick/body2D.go +++ b/fightstick/body2D.go @@ -70,6 +70,14 @@ func bottomPlane() sdf.SDF2 { return bottom } +func innerWallPlane() sdf.SDF2 { + wall := sdf.Box2D(v2.Vec{X: 6, Y: BODY_SIZE_Y}, 0) + + wall = sdf.Difference2D(wall, screwHoles()) + + return wall +} + // screwHoles produces m4 screwHoles along the sides of the piece. func screwHoles() sdf.SDF2 { hole, _ := sdf.Circle2D(M4_SCREW_DIAMETER / 2) diff --git a/fightstick/main.go b/fightstick/main.go index 341b79d..61daca0 100644 --- a/fightstick/main.go +++ b/fightstick/main.go @@ -15,10 +15,11 @@ func main() { render.RenderDXF(topPlane(), 600, "top.dxf") render.RenderDXF(wallsPlane(), 600, "walls.dxf") render.RenderDXF(wallCorner(), 600, "wallcorner.dxf") - render.ToSTL(wallFrontLeft(), 100, "wallfrontleft.stl", dc.NewDualContouringDefault()) - render.ToSTL(wallFrontRight(), 100, "wallfrontright.stl", dc.NewDualContouringDefault()) - render.ToSTL(wallBackLeft(), 100, "wallbackleft.stl", dc.NewDualContouringDefault()) - render.ToSTL(wallBackRight(), 100, "wallbackright.stl", dc.NewDualContouringDefault()) + render.RenderDXF(innerWallPlane(), 600, "innerwall.dxf") + render.ToSTL(wallFrontLeft(), 400, "wallfrontleft.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()) for i, ele := range tops { render.ToSTL(sdf.Extrude3D(ele, 3), 400, "top-"+strconv.Itoa(i)+".stl", dc.NewDualContouringDefault()) }