Skip to content

slicing.scad

pinkfish edited this page Oct 23, 2024 · 1 revision

LibFile: slicing.scad

This file has all the shared pieces for slicing a model into sections.

To use, add the following lines to the beginning of your file:

include <boardgame_toolkit.scad>

File Contents

  1. Section: Slicing

Section: Slicing

Module: SplitBox()

Topics: Slicing

Usage: LeftRight() MakeBox() MakePuzzleJoin()

Description:

Slices up the box making a left and right part of the object. First child is the object to slice up second child is the piece to use for making the join (this should be in 2d).

Arguments:

By Position What it does
width width of the box
length lenght of the box
height height of the box
orient orientation of the box (default UP)
spin spin of the join point (default 0)
apart how far apart to move the pieces on the split (default = 10)
minX the minX to cut at (default = -200)
maxX the maxX to cut at (default = 200)
minY the minY to cut at (default = -200)
maxY the maxY to cut at (default = 200)
minZ the minZ to cut at (default = -200)
maxZ the maxZ to cut at (default = 200)
play the offset on the piece to add as play (default 0.1)
y specific places to do the join points at (default [ minY : ( maxY - minY ) / 10 : maxY ])

Example 1:

SplitBox() Example 1
include <boardgame_toolkit.scad>
SplitBox(100, 50, 20, spin = 90) {
     MakeBoxWithSlipoverLid(width = 100, length = 50, height = 20,
         foot = 2, floor_thickness = 1.5, lid_thickness = 1.5, wall_thickness = 1.5)
     {
         cube(97, 47, 20);
     }
     MakePuzzleJoin();
}

Example 2:

SplitBox() Example 2
include <boardgame_toolkit.scad>
SplitBox(100, 50, 20, orient = LEFT, spin = 90) {
     MakeBoxWithSlipoverLid(width = 100, length = 50, height = 20,
         foot = 2, floor_thickness = 1.5, lid_thickness = 1.5, wall_thickness = 1.5)
     {
         cube(97, 47, 20);
     }
     MakePuzzleJoin();
}

Example 3:

SplitBox() Example 3
include <boardgame_toolkit.scad>
SplitBox(100, 50, 20, orient = FRONT) {
     MakeBoxWithSlipoverLid(width = 100, length = 50, height = 20,
     foot = 2, floor_thickness = 1.5, lid_thickness = 1.5, wall_thickness = 1.5)
     {
         cube(97, 47, 20);
     }
     MakePuzzleJoin();
}

Module: MakePuzzleJoin()

Topics: Slicing

Usage: MakePuzzleJoin()

Description:

Makes a join like a puzzle piece. This is the a way to join together two pieces of the system along the middle line using the puzzle piece shape.

Arguments:

By Position What it does
height height of the piece (defaulg 10)
width width of the piece (default 10)
base base of the peice (default 5)
stem stem of the piece (default 6)

Example 1:

MakePuzzleJoin() Example 1
include <boardgame_toolkit.scad>
MakePuzzleJoin();



Example 2:

MakePuzzleJoin() Example 2
include <boardgame_toolkit.scad>
MakePuzzleJoin(height = 20, width = 5, base = 10, stem = 5);




Clone this wiki locally