include a (commented out) test for hole sizes/neutrik
This commit is contained in:
parent
4010033d93
commit
5a7fd9766b
|
@ -13,10 +13,11 @@ func main() {
|
||||||
bottoms := split2DPlane(bottomPlane())
|
bottoms := split2DPlane(bottomPlane())
|
||||||
render.RenderDXF(topPlane(), 600, "top.dxf")
|
render.RenderDXF(topPlane(), 600, "top.dxf")
|
||||||
render.RenderDXF(wallsPlane(), 600, "walls.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(wallBackLeft(), 400, "wallbackleft.stl", dc.NewDualContouringDefault())
|
||||||
render.ToSTL(wallBackRight(), 400, "wallbackright.stl", dc.NewDualContouringDefault())
|
render.ToSTL(wallBackRight(), 400, "wallbackright.stl", dc.NewDualContouringDefault())
|
||||||
render.ToSTL(wallFrontLeft(), 400, "wallfrontleft.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())
|
render.ToSTL(innerWall(), 400, "innerwall.stl", dc.NewDualContouringDefault())
|
||||||
for i, ele := range tops {
|
for i, ele := range tops {
|
||||||
render.ToSTL(sdf.Extrude3D(ele, 3), 400, "top-"+strconv.Itoa(i)+".stl", dc.NewDualContouringDefault())
|
render.ToSTL(sdf.Extrude3D(ele, 3), 400, "top-"+strconv.Itoa(i)+".stl", dc.NewDualContouringDefault())
|
||||||
|
|
|
@ -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)
|
||||||
|
}
|
Loading…
Reference in New Issue