add innerWallPlane
This commit is contained in:
parent
a3ad3ee761
commit
760ccbda5a
|
@ -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)
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue