The 3D model repository serves as the primary source for all 3D-printable components of the Interactive Signalling Laboratory. The components are created in OpenSCAD. OpenSCAD is a script-based 3D CAD modeler used to create precise 3D models for manufacturing and prototyping.
The repository is organized into several key components:
InteractiveSignallingLaboratory-scad/
├── README.md # Overview and printing instructions
├── scad/
│ ├── config/ # Configuration files
│ │ ├── global_variables.scad # Global variables
│ │ └── colors.scad # Color definitions for views
│ │
│ ├── components/ # Reusable components
│ │
│ ├── parts/ # Main models
│ │
│ └── views/ # Various views
│
├── stl-files/ # Generated STL files
│
├── images/ # Rendered images and photos
│ ├── renders/ # OpenSCAD renders
│ └── photos/ # Photos of printed parts
│
├── documentation/ # Technical documentation
│ ├── assembly_guide.md # Assembly instructions
│ ├── print_settings.md # Print settings
│ └── materials.md # Material recommendations
│
└── scripts/ # Build automation
├── build_stl.sh # Generate all STL files
├── render_images.sh # Render all images
└── install_dependencies.sh # Model validation
-
Core Components
config/- Configuration files containing global parameters and settingscomponents/- Reusable component libraryparts/- Main model components
-
Track Components
track_straight.scad- Straight track segment designtrack_curve.scad- Curved track segment designswitch_body.scad- Switch mechanism bodyswitch_blade.scad- Switch blade componentsdirection_management.scad- Direction control mechanismsoverlap_measure.scad- Overlap measurement components
-
Signalling Components
signal_distant.scad- Distant signal designssignal_block.scad- Block signal componentssignal_route.scad- Route signal componentsbalise.scad- Balise (track-side beacon) componentsclearing_point.scad- Clearing point indicatorstrain_integrity.scad- Train integrity components
-
Supporting Components
number_plate.scad- Number plate generationmagnet_rod.scad- Magnetic componentslocking_pin.scad- Locking mechanism components
-
Templates and Tools
drill_template_straight.scad- Drilling templates for straight tracksdrill_template_curve.scad- Drilling templates for curved tracksdrill_template_switch.scad- Drilling templates for switches
-
Testing and Development
test_code.scad- General testing filetest_magnets.scad- Magnet component testingtest_pins.scad- Pin component testing
The config/global_variables.scad file serves as the central configuration file for the entire project. It contains all the essential parameters and measurements needed for the various components of the Interactive Signalling Laboratory.
-
Global Parameters
- Resolution settings for 3D printing (
$fn,$fa,$fs) - General move tolerance for component fitting (
move_tolerance) - Copyright and licensing information
- Resolution settings for 3D printing (
-
Track Specifications
- Rail dimensions (height, width, thickness)
- Track well specifications
- Straight track length
- Curve parameters (radius, angles)
-
Component Specifications
- Magnet specifications (thickness, diameter, positioning)
- Engraving parameters (height, thickness, line weights)
- Basis component dimensions
- Overlap measure specifications
- Switch blade and body parameters
- Signal and clearing point dimensions
- Drill template measurements
- Number plate and balise specifications
- All measurements are in millimeters
- Parameters are organized by component type
- The file includes detailed comments for each section
- Some parameters are calculated based on other values to maintain consistency
This project requires several OpenSCAD libraries to render the models correctly. The dependencies can be installed automatically using the provided scripts/install_dependencies.sh script or manually following the instructions below.
For general information about installing OpenSCAD libraries, please refer to the official documentation:
The official OpenSCAD library path can be found by running:
openscad --info-
BOSL2 (Belfry OpenSCAD Library)
- Repository: https://github.com/BelfrySCAD/BOSL2
- Required for: Connector/joiner functionality
- Documentation:
-
dotscad/trains
- Repository: https://github.com/dotscad/trains
- Required for: Track library functionality
- Dependencies: Requires the dotscad base library
-
dotscad (Base Library)
- Repository: https://github.com/dotscad/dotscad
- Required for: Supporting the trains library
The scripts/install_dependencies.sh script provides an automated way to install all required dependencies. It will:
- Check for required tools (OpenSCAD and git)
- Determine the OpenSCAD library path
- Install/update all required repositories
To use the script:
# Basic usage (installs to OpenSCAD library path)
./scripts/install_dependencies.sh
# Install to a specific directory
./scripts/install_dependencies.sh -d /path/to/directory
# Install from a custom repository list
./scripts/install_dependencies.sh -f repositories.txt
# Show help
./scripts/install_dependencies.sh --helpIf you prefer to install manually:
-
Clone BOSL2:
git clone https://github.com/BelfrySCAD/BOSL2.git
-
Clone dotscad base library:
git clone https://github.com/dotscad/dotscad.git
-
Clone dotscad/trains:
git clone https://github.com/dotscad/trains.git
Place all cloned repositories in your OpenSCAD library path or in the same directory as your SCAD files.
- OpenSCAD installed and available in PATH
- Git installed and available in PATH
- Unix-like operating system (OS X, BSD, Linux) for the installation script