# boxes

# Functions

RabbetJoin(box, thickness, cutHeight)Object

Create a rabbet joint in a CSG solid. This was designed for cubes, but should work on other types of objects.

Splits a CSG object into a top and bottom objects. The two objects will fit together with a rabbet join.

topMiddleBottom(box, thickness)JsCadUtilsGroup

Cuts a CSG object into three parts, a top and bottom of thickness height, and the remaining middle.

Rabett(box, thickness, gap, height, face)JsCadUtilsGroup

This will bisect an object using a rabett join. Returns a group object with positive and negative parts.

  • parts example

# RabbetJoin(box, thickness, cutHeight) ⇒ Object

Deprecated

Create a rabbet joint(opens new window) in a CSG solid. This was designed for cubes, but should work on other types of objects.

Splits a CSG object into a top and bottom objects. The two objects will fit together with a rabbet join.

Kind: global function
Returns: Object - An object with top and bottom CSG objects.

Param Type Description
box CSG A CSG object to create the rabbet join in.
thickness Number [description]
cutHeight Number [description]

# topMiddleBottom(box, thickness) ⇒ JsCadUtilsGroup

Cuts a CSG object into three parts, a top and bottom of thickness height, and the remaining middle.

Kind: global function
Returns: JsCadUtilsGroup - A Group object with the top, middle and bottom parts.

Param Type Description
box CSG A CSG object.
thickness Number The thickness of the top and bottom parts.

# Rabett(box, thickness, gap, height, face) ⇒ JsCadUtilsGroup

This will bisect an object using a rabett join. Returns a group object with positive and negative parts.

  • parts example

Kind: global function
Returns: JsCadUtilsGroup - A group object with positive, negative parts.

Param Type Description
box CSG The object to bisect.
thickness Number Thickness of the objects walls.
gap Number Gap between the join cheeks.
height Number Offset from the bottom to bisect the object at. Negative numbers offset from the top.
face Number Size of the join face.

Example

include('dist/jscad-utils.jscad');

function mainx(params) {
    util.init(CSG);

    var cyl = Parts.Cylinder(20, 20)
    var cbox = Boxes.Hollow(cyl, 3, function (box) {
      return box
          .fillet(2, 'z+')
          .fillet(2, 'z-');
    });
    var box = Boxes.Rabett(cbox, 3, 0.5, 11, 2)
    return box.parts.top.translate([0, 0, 10]).union(box.parts.bottom);
}