Skip to content

Commit e26904a

Browse files
committed
restructure clapboard to be parallel install to shingles
1 parent 7c84438 commit e26904a

6 files changed

Lines changed: 1185 additions & 0 deletions

File tree

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Clapboard Generator v4.3.0 Restructuring
2+
3+
Reorganization of clapboard generator to match the production-ready structure used by shingle_generator v4.0.0.
4+
5+
## What Changed
6+
7+
**v4.3.0 Restructuring:**
8+
- ✅ Extracted geometry library: `clapboard_geometry.py` (pure Python, testable)
9+
- ✅ Created comprehensive test suite: `test_clapboard_geometry.py` (15+ test classes)
10+
- ✅ Reorganized into standard structure: `automation/generators/clapboard/`
11+
- ✅ Generated deployment scripts: `freecad_installer.py`, `git_populate.py`
12+
- ✅ Maintained backward compatibility: existing macro `clapboard_generator.FCMacro` unchanged
13+
14+
## Directory Structure
15+
16+
```
17+
automation/generators/clapboard/
18+
├── clapboard_generator.FCMacro (v4.3.0 - unchanged)
19+
├── clapboard_geometry.py (pure Python library)
20+
├── README.md (this file)
21+
└── tests/
22+
└── test_clapboard_geometry.py (15+ test classes, 50+ tests)
23+
```
24+
25+
## Files in This Wad
26+
27+
- `clapboard_generator.FCMacro` — FreeCAD macro (v4.3.0)
28+
- `clapboard_geometry.py` — Pure Python geometry functions
29+
- `test_clapboard_geometry.py` — Comprehensive test suite
30+
- `clapboard_freecad_installer.py` — Installs to FreeCAD Macro directory
31+
- `clapboard_git_populate.py` — Organizes files in git tree + stages
32+
- `CLAPBOARD_README.md` — This documentation
33+
34+
## Installation
35+
36+
### Quick Start
37+
38+
```bash
39+
# 1. Unpack wad
40+
cd ~/Downloads
41+
tar -xzf clapboard-generator-v4.3.0.tar.gz
42+
cd clapboard-generator-v4.3.0
43+
44+
# 2. Install to FreeCAD
45+
python3 clapboard_freecad_installer.py
46+
47+
# 3. Organize in git
48+
cd ~/Documents/FreeCAD-github
49+
python3 ~/Downloads/clapboard-generator-v4.3.0/clapboard_git_populate.py
50+
51+
# 4. Review and commit
52+
git status
53+
git diff --cached
54+
git commit -m "Reorganize clapboard generator to v4.3.0 structure"
55+
```
56+
57+
## Usage in FreeCAD
58+
59+
1. Open your model
60+
2. Create wall sketches (vertical planes: XZ or YZ)
61+
3. Select one or more sketches (Ctrl+click)
62+
4. Macro menu → Recent macros → `clapboard_generator.FCMacro`
63+
5. Clapboards will generate with trim
64+
65+
## Parameters
66+
67+
Parameters are read from spreadsheet (default: "params" or "Spreadsheet"):
68+
69+
- `clapboard_height`: Reveal height (mm) — default 0.8mm (HO scale)
70+
- `clapboard_thickness`: Thickness at bottom edge (mm) — default 0.2mm
71+
- `trim_width`: Width of corner trim (mm) — default 1.5mm
72+
- `trim_thickness`: Trim projection (mm) — default 0.2mm
73+
- `wall_thickness`: Structural wall thickness (mm) — default 2.0mm
74+
75+
## Testing
76+
77+
### Run Test Suite
78+
79+
```bash
80+
# From the wad directory
81+
pytest test_clapboard_geometry.py -v
82+
83+
# Or run directly
84+
python3 test_clapboard_geometry.py
85+
```
86+
87+
### Test Coverage
88+
89+
- Edge validation (degenerate, duplicates)
90+
- Wire geometry validation
91+
- Face orientation detection (XY, XZ, YZ planes)
92+
- Building corner detection
93+
- Course calculations
94+
- Parameter validation
95+
- HO scale defaults
96+
97+
## Comparing with Shingle Generator
98+
99+
Both generators now follow the same patterns:
100+
101+
| Aspect | Shingle v4.0.0 | Clapboard v4.3.0 |
102+
|--------|---|---|
103+
| Geometry library | ✅ shingle_geometry.py | ✅ clapboard_geometry.py |
104+
| Tests | ✅ 55 tests | ✅ 50+ tests |
105+
| Pure Python | ✅ Fully testable | ✅ Fully testable |
106+
| Deployment | ✅ Automated scripts | ✅ Automated scripts |
107+
| Directory | ✅ automation/generators/shingle/ | ✅ automation/generators/clapboard/ |
108+
| _lib structure | ✅ Macro files in root | ✅ Macro files in root |
109+
110+
---
111+
112+
**Generator v4.3.0 — Parametric clapboard siding for HO scale model railroads**

automation/clapboard_generator.FCMacro renamed to automation/generators/clapboard/clapboard_generator.FCMacro

File renamed without changes.

automation/clapboard_geometry.py renamed to automation/generators/clapboard/clapboard_geometry.py

File renamed without changes.

0 commit comments

Comments
 (0)