Skip to content

Repository files navigation

Large and Medium Format Camera Bellows Pattern Generator

License: CC BY-NC 4.0Python 3.7+

A Python tool to generate cutting patterns for conical camera bellows for large format cameras (4×5, 5×7, 8×10, etc.).

Bellows Pattern Example

Features

  • Accurate geometry: Trapezoidal top/bottom faces with pair-based progression
  • Fully parametric: All dimensions configurable via command line
  • Multiple formats: Export to SVG, PNG, JPEG, or PDF
  • Automatic page splitting: Split large patterns into A4 or A3 pages
  • Separate faces: Generate individual files for each bellows face
  • Print-ready: High-resolution output (300 DPI for raster formats)

Installation

# Clone the repository
git clone https://github.com/sylvainf/PyBellows
cd Pybellows
pip install cairosvg pillow
# Basic usage (SVG only, no dependencies)
python bellows_generator.py

Quick Start

# Generate a standard 4×5 bellows pattern
python bellows_generator.py
# Custom dimensions for 5×7
python bellows_generator.py --front-w 127 --front-h 178 --rear-w 176 --rear-h 227
# Export as PDF
python bellows_generator.py --format pdf
# Generate separate files for each face
python bellows_generator.py --separate-faces

Usage

Basic Pattern Generation

python bellows_generator.py [options]

Dimensions

Standard camera formats:

4×5 (default)

python bellows_generator.py --front-w 96 --front-h 96 --rear-w 145 --rear-h 145

5×7

python bellows_generator.py --front-w 127 --front-h 178 --rear-w 176 --rear-h 227

8×10

python bellows_generator.py --front-w 203 --front-h 254 --rear-w 254 --rear-h 305

Key Options

OptionDescriptionDefault
--front-wFront width (mm)96
--front-hFront height (mm)96
--rear-wRear width (mm)145
--rear-hRear height (mm)145
--max-drawMaximum extension (mm)300
--stiffener-heightStiffener strip height (mm)12
--gap-heightFolding gap height (mm)2.5
--stroke-widthLine thickness (mm)1.0
--stroke-colorLine colorblack
-o, --outputOutput filenamebellows_pattern.svg

Advanced Features

Separate Face Files

Generate 4 individual files (one per face):

python bellows_generator.py --separate-faces

Output:

  • bellows_pattern_face1_top.svg
  • bellows_pattern_face2_right.svg
  • bellows_pattern_face3_bottom.svg
  • bellows_pattern_face4_left.svg

Export Formats

# PNG (300 DPI)
python bellows_generator.py --format png
# JPEG
python bellows_generator.py --format jpeg
# PDF (vector)
python bellows_generator.py --format pdf

Automatic Page Splitting

For patterns larger than standard paper sizes:

# Split into A4 pages (210×297 mm)
python bellows_generator.py --split-a4
# Split into A3 pages (297×420 mm)
python bellows_generator.py --split-a3

Pages are numbered: pattern_page_1_1.svg, pattern_page_1_2.svg, etc.

Example Combinations

# 8×10 bellows with long extension, split to A3, exported as PDF
python bellows_generator.py --front-w 203 --rear-w 254 --max-draw 500 \
--split-a3 --format pdf
# Separate faces in PNG format
python bellows_generator.py --separate-faces --format png
# Red lines for visualization
python bellows_generator.py --stroke-width 0.5 --stroke-color red

Construction Tips

  1. Material: Use light-tight flexible material (thin leather, coated fabric)
  2. Reinforcements: The pattern shows stiffener positions for rigidity
  3. Folding: Mountain/valley folds alternate - mark carefully
  4. Assembly: Glue faces together with proper alignment
  5. Testing: Test fit on your camera before final assembly

Complete Options

Run python bellows_generator.py --help for all options:

Dimensions:
--front-w, --front-h Front dimensions (mm)
--rear-w, --rear-h Rear dimensions (mm)
Construction:
--stiffener-height Stiffener height (mm)
--gap-height Folding gap height (mm)
--chamfer Corner chamfer (mm)
--face-gap Gap between faces in pattern (mm)
--max-draw Maximum extension (mm)
Rendering:
--margin Margin around pattern (mm)
--stroke-width Line thickness (mm)
--stroke-color Line color
Generation:
--separate-faces Generate 4 separate files
Export:
--format svg, png, jpeg, or pdf
Page Splitting:
--split-a4 Split into A4 pages
--split-a3 Split into A3 pages

License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).

You are free to:

  • Share: Copy and redistribute the material
  • Adapt: Remix, transform, and build upon the material

Under the following terms:

  • Attribution: You must give appropriate credit
  • NonCommercial: You may not use the material for commercial purposes

About

Camera Bellows Pattern Generator

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages