yapp_box Documentation

repository·main·Indexed 19 days ago

https://github.com/mrwheel/yapp_box

A parametric OpenSCAD project for generating customizable project boxes and enclosures. It allows users to define PCB dimensions, wall thickness, and padding, and includes features for configuring PCB standoffs, plane cutouts, and various connection methods such as snap joins, hooks, and inserts.

Tokens
901
Snippets
2
Records
6
Agent score
18%

What's inside yapp_box

  1. Add cutouts to Project Box planes

    main

    You can add cutouts for connectors or other components by defining arrays for each plane of the box. Each plane has its own array for managing cutouts:

    • Right Plane
    • Left Plane
    • Back Plane
    • Front Plane
    • Base Plane
    • Lid Plane
  2. Use the angle parameter for rotation

    main
    When defining shapes (like rectangles) for cutouts, you can use the angle parameter to rotate them around the x/y corner. If yappCenter is used, the shape will rotate around its center point instead.
  3. Configure Base and Lid connectors

    main

    YAPP_Box provides several ways to join the Base and Lid or secure the PCB:

    • Connectors between Base and Lid: Used to join the two main parts of the enclosure.
    • ConnectorsPCB: Specific connectors between the Base and Lid designed to fixate the PCB in place.
    • Inserts: Ideal for creating screw connections (e.g., for Ruthex inserts).
    • Snap Joins: Mechanical snap-fit connections, including symmetrical options.
    • Hooks: Mechanical interlocking using either baseHookOutside() (on the outside of the base) or lidHookInside() (on the inside of the lid).
  4. Configure basic Project Box dimensions

    main

    To program a Project Box, you must first define the dimensions of your PCB and the box walls. The total height of the box is calculated as: basePlaneThickness + lidPlaneThickness + baseWallHeight + lidWallHeight.

    Key parameters include:

    • wallThickness: Thickness of the vertical walls.
    • basePlaneThickness / lidPlaneThickness: Thickness of the bottom and top planes.
    • baseWallHeight / lidWallHeight: Height of the vertical walls for the base and lid.
    • pcbLength / pcbWidth / pcbThickness: Dimensions of the PCB being enclosed.
    • paddingFront / paddingBack / paddingRight / paddingLeft: Clearance between the PCB and the inside walls.
    printBaseShell      = true;
    printLidShell       = true;
    
    // Edit these parameters for your own board dimensions
    wallThickness       = 1.0;
    basePlaneThickness  = 1.0;
    lidPlaneThickness   = 1.0;
    
    baseWallHeight      = 7;
    lidWallHeight       = 4;
    
    pcbLength           = 88;
    pcbWidth            = 49;
    pcbThickness        = 1.5;
                                
    // padding between pcb and inside wall
    paddingFront        = 4;
    paddingBack         = 1;
    paddingRight        = 1;
    paddingLeft         = 1;
  5. Configure PCB standoffs

    main

    Standoffs are used to raise the PCB from the base to provide clearance for soldering and components.

    Parameters:

    • standoffHeight: How much the PCB is raised from the base.
    • pinDiameter: Diameter of the standoff pin.
    • pinHoleSlack: Clearance for the pin hole.
    • standoffDiameter: Diameter of the standoff base.
    //-- How much the PCB needs to be raised from the base
    //-- to leave room for solderings and whatnot
    standoffHeight      = 5.0;
    pinDiameter         = 1.0;
    pinHoleSlack        = 0.5;
    standoffDiameter    = 4;