Recent Changes - Search:

G3 Wiki Read First

* HomePage

* What is Gauge 3?

How To Contribute Content

Contact Administrator


* Pop Rivets and Underframes

* Modify your Sieg C2A Lathe

* Assembling a low cost CNC Router / Laser Etcher

* OpenSCAD and Sample 3D Print Files

* Extended Guide to 3D Printing


This is script based CAD design "language". It is about as hard to master as "BBC Basic" although it borrows from "Pascal" in its methodology. This is a good thing as both are "teaching languages". The former teaches how to write simple programs, the latter teaches how to make simple repeatable modules. It is freely available under GPL in Win, MACOS and Linux versions. OpenSCAD is used to design the object to be printed and to generate the .STL file from the script. This then is used by the production software.


In the centre of a world that is 512mm high (+/- 256), 512mm wide (+/- 256) , and 512mm long (+/- 256), exists the point (0,0,0) from which all things are measured. The script allows for a few "primitives" from which everything can be made.

CUBE This means a rectangular shape.

CYLINDER This means a cylindrical object -can be a cone, frustrum, or cylinder.

SPHERE This means a shape made only of curves -can be smartie, zeppelin or sphere.

POLYHEDRON This means shape with hard edges- can be prism, pyramid, duodecagon etc.


cube(10,10,10); creates a cube that is 10mm x 10mm x 10mm.

The command TRANSLATE moves the origin point of the object.






produces an identical cube that is 100mm to the right of the initial cube.

The following script produces a "Stop Lamp" made from a cube, a cylinder, and a sphere.

//base of lamp


//top of lamp





//lamp bulls eye





The command UNION sticks all the commands together under one name that can be referenced by other scripts. Thus having written the commands for a Stop Lamp. union(stoplamp) will enable you to stick a stop lamp on any future script by simply telling it to stick a stoplamp THERE. In this case at the top of the five barred gate for my level crossings. The command MIRROR produces the mirror image of the union(5bargate) thus rhs and lhs...

3D Modelling using Open SCAD.

Get the software.

The software is available free under GNU 2.0 from the following URL

The software runs under Windows, MacOSX and Linux. The download system will detect which OS you use and push the correct version to you to download. I use version of Linux called Debian and all the screen shots will show a typical Debian screen front end known as Gnome.

After the loader has unpacked and installed the software you will end up with a screen that looks like this:

The programming list is in the white column on the left and the visual display screen is on the right. This shows the centre of the “universe” 0,0,0 which is a cube of (+/-256mm) by (+/-256mm) by (+/-256mm). Holding down the Left mouse key allows you to move the universe through any rotation. Holding down the Right mouse key allows you to move the universe through any axis.

All the objects are initially begun at 0,0,0 and new objects are added at a reference point in “Three Space” with the command TRANSLATE. So, if I translate the start position to 10,10,10 the object is positioned at: 0+10mm in the X axis, 0+10mm in the Y axis, and 0+10mm in the Z axis. All the commands have a series of brackets and braces around them which is used to define parameters such as; three space position (X,Y, Z), rotational position (Xdeg) yaw (Ydeg) pitch and (Zdeg) roll. The DIFFERENCE command turns the second object on its list { … } into antimatter and removes that object from the first -in effect turning it into a cut out shape. To cut a cylindrical hole through a cube use the DIFFERENCE command between { CUBE and CYLINDER }. The ROTATE command can produce an inclined cylinder cut. Altering the initial and final radii of the cylinder produces a cone or frustrum to cut into the cube with. Unless specified -all objects merge with each other.

This is the “Cheat Sheet” which can be found in the HELP section

Yes, it looks initially frightening -but if you study it there is actually very little to learn as most of the commands repeat themselves in various forms.

First steps.

This is a simple program to produce a stop lamp. It consists of three objects. The first is a rectangular object formed by the command CUBE with the X,Y,Z lengths in mm. The next is a cylindrical object produced by the command CYLINDER with the radius at top and bottom and height. The last object is a spherical one produced by the command SPHERE using only the radius.

The top of the lamp has been formed by merging the cylinder 50% into the cube. The bullseye by moving the centre of the sphere to merge at 50% on the top of the cube.

Second steps.

This is an iron roof truss. It has been made by merging rectangles and rotating rectangles to form a unified object. Everything thing between the leading { and trailing } is treated as one object -regardless!

F5 and translation key F6 to STL file.

As you progress building your design in Three Space it is useful to press the F5 key that will give a quick viewpoint on the progress so far. The compiler will often point out errors in logic and syntax but these are normally down to “spelling”...

Once you have finished your design it now needs to be translated into an STL (Stereo Lithography) File. In Open SCAD you do this by pressing the F6 key. You should now have a file with the suffix .STL and this is the one that you use for the production of your design on a 3D printer.

With a little Practice…

This is something that I have been working with on and off for a few months now, although when it is going to be complete is anyone’s guess. This is the nose of an NK50000 shuttle EMU of the Japanese Railways. I plan to use my RepRap to produce the raw shape from with a lot of smoothing and filling to get the correct curves. Like the US GG1 locomotive all of the panels were hand made on “english wheels”. Each of the panels is thus unique and they were rolled into the correct joined form, the rivet things are ornamental!

Using the basic blocks of Cube, Cylinder and Sphere with the Difference command to cut and shape with I am beginning to get a form that I can start with.

The green areas show the “cutting scars” for the use of the DIFFERENCE command. The front peaked nose is a cube hacked into with a cylinder, similarly the glass viewport is a sphere cut with a cube.

Despite the seeming complexity of the total shape, the script consists of one command per line with the parameter numbers to the command. In the script the commands between each set of semi colons (;) is a shape. This is for programming neatness, as I beautify my scripts for ease of reading.

The Pre-Written Program Scripts for you to play with, AKA “The LMS Lego Files”

All of these are OpenSCAD files .SCAD. I have written them all and they are given to you to edit and experiment with under GNU 2.0. Being an M.I.A.A.P. they are written with a distinct commercial style with short lines and plenty of comments. I have sorted them into alphabetical order for you to work from. The browser will open up a text file for you to copy and use. If you have a good script then please send it to be included here for others to use!

Level Crossing Five Bar Gateview
10 Gallon Milk Churnview
135 deg canopy bracketview
Arched Coving Stonesview
Arch support ringview
Arch seat stoneview
Axle box pt1view
Axle box pt2view
Boiler Ringview
90 deg Bracket 3view
90 deg Bracket 4view
Brake Blockview
Brake Holderview
Brake leverview
Bridge gantryview
Buffer plateview
Canopy Bracketview
Chuff camview
Coving stonesview
Cylinder rearview
Flemish brick wallview
Foot bridge bracketview
Foot bridge bracket 2view
Hook Plateview
Johnson motor mountview
Lattice bridge baseview
Lattice bridge sideview
BR Oleoview
Park benchview
Q sensor bracketview
Quoin wallview
Quoin wall 2view
Quoin wall LHSview
Quoin wall RHSview
Roof trussview
Brake shuttleview
Wheel Splasherview
Stairs LHSview
Stairs RHSview
Trestle Bracketview
Trestle seatview
U axis connectorview
Brake Vee hangerview
Window 2 blocksview
Wall pillerview
Wall piller cornerview
Wall piller endview
Window blocksview
Window north lightview
Window Piller endview
Window grillview

The following files are for the window frames, door frames and others for the 2-NOL design by Chris Barron. I would print them at 50% frame rate and 215C nozzle temp

3rd rail pickupview
Bogie plate lhsview
Bogie plate rhsview
Compartment Windowview
Door Windowview
Window grillview
Door Window panelview
Double Window panelview
Driver Windowview
Driving Window frameview
End Window panelview
Front Window panelview
Luggage Windowview
Motor mountview

In the early 1960's the New York Central Railroad wanted to do some high speed tests. The vehicle that they built for this has gone down in history as "The Black Beetle"... This was built using a "spare" Budd Railcar DMU and strapping to the top of it, an inverted war surplus J type turbo jet pod from a B36 Stategic Intercontinental Bomber which they bought for $5,000.

As the saying goes, "Would I lie to you?"

The Black Beetle

Jet Blockview
Jet Shroudview
Jet Shroud rearview
Jet Shroud rear 2view
Jet Shroud topview

These files will produce the hood and stand parts for a four aspect signal light and two types of "feathers". An 8mm LED is nearly the correct size for a G3 lamp and a 3mm LED for the feathers. You will probably have to ream out the feather holes to fit the LED holders.

4 Aspect baseview
4 Aspect featherview
4 Aspect feather rearview
4 aspect hoodview

The following files are for use in building typical "Pierson" 1500V OHL systems. There will be other "electrical items" added to it.

OHL 1 End supportview
OHL 2 Zig Zag trussview
OHL 3 Base Upright supportview
OHL 4 Square spacer frame gantryview

This section contains "street scene" items.

3 flagstone pavementview
3 flagstones cornerview

This section contains parts to help complete a Gresley LNER "Teak" Carriage.

Pullman Gangway Connectorview
Gresley Gangway Bellowsview

The following five files need to be uploaded and in the same directory as they "call" each other.

Gresley Battery Boxview
File 1aview
File 2aview
File 3aview
File 4aview
LNER Dynamoview
LNER Vacuum Tankview
Vacuum Brake Cylinderview
V Hangersview
Vacuum Brake Linkageview
LNER Stones ventview
LNER Sliding ventview
LNER Lavatory ventview
Roof Endview

In 1934/5 the LNER decided to "get trendy" and built open coaches (intended largely for excursion work) with the style of seats found in motor coaches and cars and of that period. But they began to receive complaints that for longer journeys, there was a lack of neck support as provided by more traditional railway seating.

LNER Tourist seatsview
LNER Pedestal for seatsview
LNER Main seat structureview
LNER Legs for seatsview
LNER Single seat structureview
LNER Double seat structureview
LNER Third class tableview
LNER First class tableview

The following are GWR Bogie parts. These take a long time to render...

GWR "American" 9 ftview
GWR "American" 8 ftview
GWR OK axleboxview
GWR "Collett" 7 ftview
GWR "Collett" axleboxview

This is a "generic" part. The text file includes details on how to customise the finished item to you requirements.

Elliptical springview

The following are GWR "Siphon" parts

"C" 4ft 6ins springview
diag 04 05 06 6ft springview

Station signage boards

Station name boardview
Station boardview
Station boardview
Station boardview
Station boardview

Signal box equipment

Signal box leversview
Lever frameview
Signal ladderview

LNWR Water Column

These take a long time to print.

Part 1view
Part 2view
Part 3view
Part 4view

GPO K1 telephone box

In the early 1920's, the GPO introduced the first of a long line of designs for public telephone kiosks . The earliest examples were designated "K1" and of cast concrete, with wooden doors. The design was not popular and was, in 1927, superseded by the cast iron K2 design. The K2 set the basic visual style for the next 40 years, spanning K2 through to K6.

The K1 came with detail variations (mainly to the window layout) and the files here produce the final "236" version, introduced in 1925.

The design incorporated some metal "frippery" on the top, in the style of a spear head and scrolls (sprouting from the top ball), plus metal plates announcing, "Telephone" . These will need to be added in brass, since they are too fragile to be printed. It is recommended that the file K1_236_Top_square_base.scad be inverted for printing (so the widest section forms the base and removes the need for temporary supports).

Part 1 Top Square baseview
Part 2 Top Pyramidview
Part 3 Sidesview (2 x prints required)
Part 4 Frontview
Part 5 Backview
Part 6 Baseview

When you have printed and assembled your phone box, all those windows make it easy to see inside, so you won't want it to be void of equipment!

I offer you two types of pay phone, suitable for non-automatic (i.e. not Strowger equipped) exchanges, where all calls went via the operator.

If you are old enough to remember the type of pre-payment box with "A" and "B" buttons, the first design appeared in 1924 and is the basis of the file. "Press button A to make the call and press Button B to get your money back." Prior to the introduction of the pre-payment (A / B) type, the post-payment system worked via the operator asking you to insert coins to be connected (she knew how much you had paid via audible tones sent to the exchange by the coin box sensors).

Press A/Bview

The mouth piece and ear piece are printed individually and need fixing to the wall panel component. Here is a useful guide to these early pay phones

These are the files for the earlier 234/235 designs (main obvious difference from 236 being window arrangement) but it may suit some to model the 234, since it was devoid of the iron work on the roof, which was fitted to the 235 and 236.

The only specific parts for 234/5 are the sides and front (door).


The Wonder Loco.

This is a series of SCAD files that will form the bodywork for a B0-B0 locomotive. This is based on the LMS 10,800 which was a Diesel Electric. It has the hood and rear of an American EMD switcher -this being easier to print. The two are almost identical body wise only the external frippery really telling a US loco from a UK loco... With little effort the body can be converted into the experimental Brush Traction loco called "Hawk". Or evolved into a Class 15. There is no requirement to use any or all of the panels, you may mix and match panel sides and roof parts to produce anything you desire...

Body Endview
Cab Frontview
Cab roofview
Cab Sideview
Centre Body Roofview
Fan Roofview
Front Body Roofview
Port Motor Panelview
Port Radiator Panelview
Port Rear Panelview
Port Motor Panelview
Rear Body Roofview
Side Panelsview
Starboard Motor Panelview
Starboard Radiator Panelview
Starboard Rear Panelview

There will be a selection of "frippery" parts for the loco. The original used oil lamps but an LED lights plate, brake cylinders and Westinghouse tanks will soon be forth coming.

W.H. Smiths Kiosk

The W.H. Smith (or John Menzies in Scotland) bookstalls were, at one time, to be found on any station which served a town of reasonable size (small country stations included, not just city stations). They came in all shapes and sizes and this offering is based upon a 1937 drawing, (stamped Southern Railway, Eastleigh), for a W.H. Smith "sub-bookstall" at Bournemouth Central Station, to be situated by the booking office.

There are five files for each of the four sides plus roof:

End 1view
End 2view
Edit - History - Print - Recent Changes - Search
Page last modified on January 16, 2022, at 02:41 PM