|
| 1 | +# CNC Layout Changes |
| 2 | + |
| 3 | +## Overview |
| 4 | +The `cnclayout.scad` file has been refactored to arrange parts in a left-to-right layout optimized for direct CNC machine use. |
| 5 | + |
| 6 | +## Changes Made |
| 7 | + |
| 8 | +### 1. Layout Arrangement: Left-to-Right |
| 9 | +**Previous**: Parts were arranged in multiple rows (top to bottom) |
| 10 | +**New**: All parts are arranged in a single horizontal line from left to right |
| 11 | + |
| 12 | +This makes it easier for CNC operators to: |
| 13 | +- Follow the cutting sequence |
| 14 | +- Understand the material flow |
| 15 | +- Optimize sheet placement |
| 16 | + |
| 17 | +### 2. Text Labels Removed |
| 18 | +**Previous**: Each part had text labels for identification |
| 19 | +**New**: All text elements have been removed |
| 20 | + |
| 21 | +Benefits: |
| 22 | +- Output is ready for direct import into CNC software |
| 23 | +- No manual cleanup needed |
| 24 | +- Prevents text from interfering with cutting paths |
| 25 | +- Cleaner DXF/SVG exports |
| 26 | + |
| 27 | +### 3. Parametric Spacing |
| 28 | +**Previous**: Some spacing was hard-coded |
| 29 | +**New**: All spacing is calculated parametrically based on part dimensions |
| 30 | + |
| 31 | +The layout now: |
| 32 | +- Defines dimensions for each part type |
| 33 | +- Calculates X positions based on actual part widths |
| 34 | +- Uses the `SPACING` parameter (20mm) consistently between all parts |
| 35 | +- Automatically adjusts if part dimensions change in the future |
| 36 | + |
| 37 | +### 4. No Overlapping Parts |
| 38 | +Each part's position is calculated by adding: |
| 39 | +- Previous part's X position |
| 40 | +- Previous part's width |
| 41 | +- Spacing constant (20mm) |
| 42 | + |
| 43 | +This ensures no parts overlap, even if dimensions are changed in the parameter file. |
| 44 | + |
| 45 | +## Part Order (Left to Right) |
| 46 | + |
| 47 | +1. Side Panels (4x) - Largest parts, rotated 90° |
| 48 | +2. Rear Crossmember |
| 49 | +3. Bucket Bottom |
| 50 | +4. Standing Deck |
| 51 | +5. Bucket Sides (2x) - Rotated 90° |
| 52 | +6. Wheel Mounts (4x) |
| 53 | +7. Cylinder Lugs (6x) |
| 54 | + |
| 55 | +Total: 19 parts in a single horizontal line |
| 56 | + |
| 57 | +## Layout Dimensions |
| 58 | + |
| 59 | +- **Total Width**: ~9.9 meters |
| 60 | +- **Total Height**: ~1.4 meters |
| 61 | +- **Spacing**: 20mm between all parts |
| 62 | +- **Start Position**: (10, 10) |
| 63 | + |
| 64 | +## Usage |
| 65 | + |
| 66 | +### Generate SVG for CNC |
| 67 | +```bash |
| 68 | +cd LifeTrac-v25/mechanical_design/openscad |
| 69 | +openscad --export-format=svg -o output/cnclayout.svg cnclayout.scad |
| 70 | +``` |
| 71 | + |
| 72 | +### Generate DXF for CNC |
| 73 | +```bash |
| 74 | +openscad --export-format=dxf -o output/cnclayout.dxf cnclayout.scad |
| 75 | +``` |
| 76 | + |
| 77 | +### Adjust Spacing |
| 78 | +To change the spacing between parts, edit the `SPACING` parameter in `cnclayout.scad`: |
| 79 | +```openscad |
| 80 | +SPACING = 20; // mm between parts - change this value as needed |
| 81 | +``` |
| 82 | + |
| 83 | +## Technical Details |
| 84 | + |
| 85 | +### Parametric Dimensions |
| 86 | +All part dimensions are derived from the main parameter file (`lifetrac_v25_params.scad`): |
| 87 | +- `MACHINE_HEIGHT` - Used for side panel dimensions |
| 88 | +- `WHEEL_BASE` - Used for side panel dimensions |
| 89 | +- `BUCKET_WIDTH`, `BUCKET_DEPTH` - Used for bucket parts |
| 90 | +- `DECK_WIDTH`, `DECK_DEPTH` - Used for standing deck |
| 91 | +- etc. |
| 92 | + |
| 93 | +### Position Calculation |
| 94 | +Positions are calculated sequentially: |
| 95 | +```openscad |
| 96 | +x_pos_0 = START_X; |
| 97 | +x_pos_1 = x_pos_0 + side_panel_width_rotated + SPACING; |
| 98 | +x_pos_2 = x_pos_1 + side_panel_width_rotated + SPACING; |
| 99 | +// ... and so on |
| 100 | +``` |
| 101 | + |
| 102 | +This approach ensures: |
| 103 | +- No variable reassignment (OpenSCAD compatible) |
| 104 | +- Clear dependency chain |
| 105 | +- Easy to understand and modify |
| 106 | +- Automatic adjustment when dimensions change |
| 107 | + |
| 108 | +## Compatibility |
| 109 | + |
| 110 | +The layout is compatible with: |
| 111 | +- OpenSCAD 2019.05 and later |
| 112 | +- CNC plasma cutters |
| 113 | +- Laser cutters |
| 114 | +- Waterjet cutters |
| 115 | +- Any CNC software that accepts SVG or DXF input |
| 116 | + |
| 117 | +## Future Enhancements |
| 118 | + |
| 119 | +Possible future improvements: |
| 120 | +- Add optional material optimization (nesting) |
| 121 | +- Support for multiple sheet layouts |
| 122 | +- Automatic part labeling layer (toggle-able) |
| 123 | +- Kerf compensation parameters |
0 commit comments