Claude
Skills
Sign in
Back

underware-openscad

Included with Lifetime
$97 forever

Reference guide for generating Underware cable management channel OpenSCAD code. Provides channel type selection, parameter quick reference, and QuackWorks integration. Use when generating OpenSCAD files for Underware cable routing systems.

General

What this skill does


# Underware OpenSCAD Code Generation

Generates OpenSCAD code for parametric cable management channels compatible with OpenGrid/Multiboard wall-mounted systems.

## Required Reading Before Generating Code

**Authoritative source (fetch every time):**

- **QuackWorks Underware Repository**: https://github.com/AndyLevesque/QuackWorks/tree/main/Underware
  - Reference implementation for all channel types
  - Licensed CC BY-NC-SA 4.0
  - Active development with bug fixes and enhancements

**Related documentation:**

- Hands on Katie guide: https://handsonkatie.com/underware-2-0-the-made-to-measure-collection/
- For system compatibility, see the home-organization skill

## Core Understanding (Critical Architecture)

### What Makes Underware Different From Generic Cable Channels

**Two-part snap system**: Every channel consists of separate Base + Top pieces:

- **Base**: Mounts to wall/surface with various mounting methods
- **Top**: Clips onto base, removable for cable access
- **Snap profile**: Precision-engineered interlock (~3mm overlap)
- **Why this matters**: User can route cables, snap on tops, remove tops later without unmounting

**Path-sweep construction**: All channels use BOSL2 `path_sweep()` for complex geometries:

```openscad
// Profile defines cross-section shape
// Turtle commands define path through space
path_sweep(baseProfile(widthMM = 25), turtle(["move", lengthMM]))
```

**Profile scaling for width**: Multi-unit channels expand by stretching center rectangle:

```openscad
// 1-unit channel: 25mm wide (standard profile)
// 2-unit channel: 50mm wide (profile halves moved apart, rectangle fills gap)
function baseProfile(widthMM = 25) =
    union(
        left((widthMM-25)/2, selectBaseProfile),  // Left half
        right((widthMM-25)/2, mirror([1,0], selectBaseProfile)),  // Right half mirrored
        back(3.5/2, rect([widthMM-25+0.02, 3.5]))  // Center fill rectangle
    );
```

**Grid-based dimensioning**: All dimensions in 25mm grid units (OpenGrid/Multiboard standard):

- `Grid_Size = 25` (constant, do not modify)
- `Channel_Width_in_Units = 1` → 25mm wide channel
- `Channel_Length_Units = 5` → 125mm long straight channel

### BOSL2 Dependencies (Required)

All channel files require:

```openscad
include <BOSL2/std.scad>
include <BOSL2/rounding.scad>
include <BOSL2/threading.scad>
```

**Why these specific libraries:**

- `std.scad`: Core geometry operations (path_sweep, turtle, attachable)
- `rounding.scad`: Smooth corners on profiles
- `threading.scad`: Threaded snap connector generation

## Channel Type Selection Framework (Decision Layer)

### By Cable Routing Need

| Routing Need                        | Channel Type             | Key File                               | Read Subpage            |
| ----------------------------------- | ------------------------ | -------------------------------------- | ----------------------- |
| Straight run with cord exits        | I Channel                | `Underware_I_Channel.scad`             | ./straight-runs.md      |
| 90° corner, independent arm lengths | L Channel                | `Underware_L_Channel.scad`             | ./corners-junctions.md  |
| 3-way intersection                  | T Channel                | `Underware_T_Channel.scad`             | ./corners-junctions.md  |
| 4-way cross                         | X Channel                | `Underware_X_Channel.scad`             | ./corners-junctions.md  |
| Split one path to two               | Y Channel (Branch Split) | `Underware_Branch_Split_Channel.scad`  | ./corners-junctions.md  |
| Smooth diagonal transition          | S Channel                | `Underware_S_Channel.scad`             | ./curves-transitions.md |
| Quarter/half/full circle            | C Channel                | `Underware_C_Channel.scad`             | ./curves-transitions.md |
| 45° angled corner                   | Mitre Channel            | `Underware_Mitre_Channel.scad`         | ./curves-transitions.md |
| Vertical level change               | Height Change Channel    | `Underware_Height_Change_Channel.scad` | ./curves-transitions.md |

### By Use Case Examples

| User wants to                        | Recommended approach        | Notes                                                              |
| ------------------------------------ | --------------------------- | ------------------------------------------------------------------ |
| Route desk power cables horizontally | I Channel with cord cutouts | Use `Both Sides` cutouts for multiple exit points                  |
| Turn corner around desk edge         | L Channel                   | Set `L_Channel_Length_in_Units_Y/X_Axis` independently             |
| Create cable junction box            | T or X Channel              | T for 3-way, X for 4-way crossroads                                |
| Branch to two monitor cables         | Y Channel                   | `Y_Output_Direction = "Forward"` keeps both outputs same direction |
| Gradually shift cable run diagonally | S Channel                   | Bezier curve, specify `Units_Over` and `Units_Up`                  |
| Route around circular desk leg       | C Channel                   | Set `Arc_Angle` for quarter (90°) or half (180°) circle            |
| Transition cables up/down wall       | Height Change Channel       | Smooth vertical transitions                                        |

### When Pattern Is Unclear

**Ask these questions:**

1. **Path shape**: Straight, corner, curve, or multi-junction?
2. **Exit points**: Where do cables enter/exit the channel?
3. **Direction changes**: 90°, 45°, or smooth curve?
4. **Mounting surface**: Flat wall, under desk, around obstacles?

**Default**: When unclear, use I Channel (straight) - user can connect multiple segments later.

## Universal Parameters (All Channels)

### Required Parameters (Always Define)

```openscad
/*[Choose Part]*/
Base_Top_or_Both = "Both"; // [Base, Top, Both] - Export control

/*[Channel Size]*/
Channel_Width_in_Units = 1;          // Width in grid units (25mm each)
Channel_Internal_Height = 12;        // Interior height 12-72mm (6mm increments)

/*[Mounting Options]*/
Mounting_Method = "Threaded Snap Connector";
// Options: Threaded Snap Connector, Direct Multiboard Screw,
//          Direct Multipoint Screw, Magnet, Wood Screw, Flat
```

### Mounting Method Selection

| Method                  | Use When                            | Parameters Needed                     | Print Orientation                |
| ----------------------- | ----------------------------------- | ------------------------------------- | -------------------------------- |
| Threaded Snap Connector | OpenGrid/Multiboard with connectors | None (default)                        | Base flat, Top upside-down       |
| Direct Multiboard Screw | Screw directly into board holes     | None                                  | Base flat (pre-drilled holes)    |
| Direct Multipoint Screw | Honeycomb Storage Wall              | None                                  | Base flat (larger holes)         |
| Magnet                  | Curved surfaces, repositionable     | `Magnet_Diameter`, `Magnet_Thickness` | Base flat (magnet recesses)      |
| Wood Screw              | Direct wall/desk mounting           | `Wood_Screw_Thread_Diameter`          | Base flat (countersink holes)    |
| Flat                    | Adhesive mounting, testing          | None                                  | Base flat (no mounting features) |

**Common mistake**: Using `Flat` for production installs. This removes all mounting features - only use for adhesive mounting or prototyping.

### Advanced Options (Modify Rarely)

```openscad
/*[Advanced Options]*/
Grid_Size = 25;                      // ALWAYS 25 for OpenGrid compatibility
Profile_Type = "Original";           // [Original, v2.5] - BETA: v2.5 inverse clip
Flex_Compensation_Scaling = 0.99;    // For wide/tall channels, reduce flex
Additional_Holding_Strength = 0.0;   // [0:0.1:

Related in General