use plane for render splitting

This commit is contained in:
Octopus Octopus 2022-06-12 11:11:19 -05:00
parent 17dccb3f28
commit 3d9a8e9659
1 changed files with 10 additions and 5 deletions

View File

@ -8,12 +8,17 @@ import (
func main() { func main() {
top := topPlane() top := topPlane()
topPlanes := splitPlane() walls := wallsPlane()
planes := make(planes)
planes.add(splitPlane("top", top))
planes.add(splitPlane("walls", walls))
render.RenderDXF(top, 300, "top.dxf") render.RenderDXF(top, 400, "top.dxf")
render.RenderDXF(wallsPlane(), 300, "walls.dxf") render.RenderDXF(wallsPlane(), 400, "walls.dxf")
for k, v := range topPlanes { // render.ToSTL(sdf.Extrude3D(walls, 2), 400, "walls.stl", dc.NewDualContouringDefault())
render.RenderDXF(v, 300, k+".dxf")
for k, v := range planes {
render.RenderDXF(v, 400, k+".dxf")
render.ToSTL(sdf.Extrude3D(v, 2), 400, k+".stl", dc.NewDualContouringDefault()) render.ToSTL(sdf.Extrude3D(v, 2), 400, k+".stl", dc.NewDualContouringDefault())
} }