Recent Changes - Search:

G3 Wiki Read First

* HomePage

* What is Gauge 3?

How To Contribute Content

Contact Administrator


MOST RECENT UPDATES:

* 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

Open SCAD

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.

Theory...

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.

thus;

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

The command TRANSLATE moves the origin point of the object.

thus;

translate(100,0,0)

{

cube(10,10,10);

}

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

cube([10,10,10]);

//top of lamp

translate([10,5,0])

{

        cylinder(10,5,5);

}

//lamp bulls eye

translate([5,5,10])

{

    sphere(4);

}

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

https://www.openscad.org/

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
Capstoneview
Chuff camview
Coving stonesview
Cylinderblockview
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
Railingsview
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
Windowview
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 1view
OHL 2view
OHL 3 baseview
OHL 4 gantryview

This section contains "street scene" items.

3 flagstone pavementview
3 flagstones cornerview

This section contains parts to help complete a Gresly 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.

Gresly 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

Edit - History - Print - Recent Changes - Search
Page last modified on May 16, 2021, at 06:16 PM