[Plugin] Eneroth Railroad System (v 0.1.21)

[Plugin] Eneroth Railroad System (v 0.1.21)

Postby eneroth3 » Wed May 21, 2014 9:14 pm



This is a plugin I've been working since summer 2013. From the start I wanted a tool to draw railway tracks more easily since I've used it in a few models. I also wanted to try making something object oriented since I'd just understood what that actually was and why it's good. Then it all escalated into moving trains and stuff...

When I've shown people the plugin they often ask 'why trains?'. There are several reasons. Besides the need for tracks in my models my dad's a model railway collector and I've grown up with model trains around me. This also explains why most of the trains are German since Sweden's model railway community is very influenced by mostly German Märklin.

So far I've only tested the plugin on windows (7) but it's supposed to work on mac too. However there can be problems, e.g. with web dialogs, so feedback is greatly appreciated.

Download

Example Model

Version: 0.1.21

Date: 2015-07-16

Requirements

SU 2013+
IE 9+ (Only applies to Windows)

Change Log

0.1.10
First published at Sketchucation.

0.1.11
Should (hopefully) work better on Mac
Minor fixes and streets added as track type.

0.1.12
Better interface for saving rolling stocks to library.
Spanish translation by Oxer.

0.1.13
Easier to save rolling stocks to library.
Improved documentation for tracks and rolling stocks.
Advanced animation settings, including running custom code between frames, e.g. to render.
German translation by Dean.

0.1.14
Structures (bridges, tunnels etc) separated from tracks.
Custom signals.
track properties supporting multiple tracks at once.

0.1.15
New track drawing mode. Select points that will be automatically connected by tracks.

0.1.16
Fixed bug with balise on wrong track being triggered.
Showing warning in tooltip when nodes are to close to fit curve in Add Track tool's continuous mode.

0.1.17
Random and guided switching modes in drive train tool.

0.1.18
Library mode for add track tool.
New directory for custom content and new format for track types and structure types.
Optimization, bug fixes and code cleaning.

0.1.19
Bug fixes.

0.1.20
Bu fix.

0.1.21 2015-07-16
Added back translate support.
Added security warning for balises.
Added feature for listing position for certain parts of structures and the option to move them.
Fixed bugs with models using templates not locally installed.

Usage

All tools can be found both from the toolbar and Plugins > Railroad. Additional documentation can be found in Plugins > Railroad > Documentation.

Add Track
Add tracks to the model, either add continuous line defined by points, calculate new based on parallel distance and angle or copy, offset or connect existing tracks.

Track Position
Move the control points of a selected track. Right click to change curve algorithm. Hold down shift when moving track end to force it to be straight. Press alt when adjusting the vectors to change their direction.

Set Switch State
Change what direction a train will travel in a switch. Press enter to save.

Track properties (only available when a track is selected)
Change curve algorithm, track type, signal type etc of selected track.

Add Rolling Stock
Add cars and locomotives either from a library or initialize from a group in the model (cannot be a component). Click existing train to connect to it.

Couplings
Connect and disconnect rolling stocks to form trains.

Drive Train
Drive train by controlling its speed. The Switch tool is used to turn switches.

Play/Pause
Start and stop the train from moving. Pausing the animation speeds up Sketchup and is good when drawing.

Balise
Add custom code that executes when a train passes a certain point on the track.

The tracks and rolling stocks should be possible to move around using the native move and rotate tool and are deleted just as all Sketchup geometry by selecting and pressing delete or by eraser tool.
24
Last edited by eneroth3 on Thu Jul 16, 2015 7:45 pm, edited 16 times in total.
User avatar
eneroth3 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Eneroth Railroad System

Postby Krisidious » Wed May 21, 2014 9:21 pm

Very impressive Julia... Very.
1
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: [Plugin] Eneroth Railroad System

Postby Rich O Brien » Wed May 21, 2014 9:25 pm

@Julia

You know you have access to plugins.sketchucatio.com ?
1
User avatar
Rich O Brien 
Administrator
 

Re: [Plugin] Eneroth Railroad System

Postby eneroth3 » Wed May 21, 2014 9:26 pm

Videos showing how tracks and trains are added:

7
User avatar
eneroth3 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Eneroth Railroad System

Postby eneroth3 » Wed May 21, 2014 9:34 pm

Rich O Brien wrote:@Julia

You know you have access to plugins.sketchucatio.com ?


At the moment I'm busy fighting against phpBB but I might look into it later (for instance I just had to figure out myself that youtube videos must use the http protocol, not https as the link I copied from the address bar used).
0
User avatar
eneroth3 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Eneroth Railroad System

Postby Rich O Brien » Wed May 21, 2014 9:38 pm

Take your time...

I'll look after the upload to your PluginStore account.
0
User avatar
Rich O Brien 
Administrator
 

Re: [Plugin] Eneroth Railroad System

Postby pilou » Wed May 21, 2014 10:04 pm

Incredible! :shock: :fro:
I am fan of the rainbow one! ! :enlight:

fer.jpg
5
Frenchy Pilou
Is beautiful that please without concept!
My Little site :)
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Eneroth Railroad System

Postby Aerilius » Wed May 21, 2014 10:08 pm

Great to see it finished! I can't wait to build our railroad with it.
We have a Märklin H0. If we had a bigger one, we could lay rails from the kitchen outside to the terrace and transport dishes, drinks and food. So there's something to plan ;-)
0

Aerilius 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Eneroth Railroad System

Postby eneroth3 » Wed May 21, 2014 10:25 pm

Aerilius wrote:Great to see it finished!


I wouldn't exactly call it finished but at least it's finished enough for a thread:)

I hope I can see the model when it's done!
3
User avatar
eneroth3 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Eneroth Railroad System

Postby CadFather » Wed May 21, 2014 11:18 pm

Goodness...! :lol:
2
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Eneroth Railroad System

Postby olishea » Wed May 21, 2014 11:29 pm

I don't think I'll ever need this plugin, but all I can say is wow! Looks like fun! :thumb: :)

Eneroth: I believe I've seen your plugins before? Did you make a terrain eroder or something along those lines?
0
oli
User avatar
olishea 
Premium Member
Premium Member
 

Re: [Plugin] Eneroth Railroad System

Postby Anton_S » Wed May 21, 2014 11:32 pm

Professionally done!

Works like a charm :thumb:

And a suggestion, are you planning to add a reset button?
Some sounds would be awesome as well
1
Last edited by Anton_S on Wed May 21, 2014 11:41 pm, edited 2 times in total.

Anton_S 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Eneroth Railroad System

Postby pilou » Wed May 21, 2014 11:35 pm

Yep! :fro:
2
Frenchy Pilou
Is beautiful that please without concept!
My Little site :)
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Eneroth Railroad System

Postby alexandre sk » Thu May 22, 2014 6:39 am

Fantastic plugin AND model. I miss those ICE from Germany, 300km/h without a bump.

Ohh and thx for your Texture Positioning plug-in I use a lot.
0
User avatar
alexandre sk 
 

Re: [Plugin] Eneroth Railroad System

Postby pbacot » Thu May 22, 2014 6:41 am

Genious!
0
MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD
User avatar
pbacot 
Top SketchUcator
 

Re: [Plugin] Eneroth Railroad System

Postby Krisidious » Thu May 22, 2014 7:06 am

She's got a few Oli...

http://eneroth.port0.org
0
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: [Plugin] Eneroth Railroad System

Postby Pixero » Thu May 22, 2014 7:30 am

Fantastiskt! :thumb:

I'm not sure how often I will be able to use this for work but it's an amazing plugin.
Does it work on terrain as well?
Have you thought of doing a road and cars version?
0
User avatar
Pixero 
 

Re: [Plugin] Eneroth Railroad System

Postby eneroth3 » Thu May 22, 2014 8:44 am

Anton_S wrote:Professionally done!

Works like a charm :thumb:

And a suggestion, are you planning to add a reset button?
Some sounds would be awesome as well


i haven't really thought about a reset button. In Sketchyphysics I think the whole animation runs inside a tool and that Sketchup.abort_operation runs to move everything back when the user stops the animation. In my plugin the animation doesn't run inside an active tool since you need several tools so set switches, connect/disconnect couplings etc.

I've though about sounds but then I need to be able to play the same sound at different speeds to match the speed of the train. Also I would need lots and lots of sounds.

olishea wrote:I don't think I'll ever need this plugin, but all I can say is wow! Looks like fun! :thumb: :)

Eneroth: I believe I've seen your plugins before? Did you make a terrain eroder or something along those lines?


Yup ,that's mine. You can see all my plugins here:

http://extensions.sketchup.com/en/user/5736/store

http://sketchucation.com/pluginstore?pauthor=eneroth3

Pixero wrote:Fantastiskt! :thumb:

I'm not sure how often I will be able to use this for work but it's an amazing plugin.
Does it work on terrain as well?
Have you thought of doing a road and cars version?


It should work on terrain but you might need to alter the terrain after adding the tracks so there's no gap under them. you can also add a new track type that has more ballast under it to prevent this gap. The same thing can be done with roads, create a road as a track type and initialize a car as rolling stock.

Under Plugins > Railroad > Documentation it's written how you make custom track types and rolling stocks. saving a rolling stock to the library however isn't very stable at the moment (some observers seem to get upset when I've tried in SU 2013). After saving a rolling stock to the rolling stock library it's recommended to restart Sketchup. Otherwise you can just initialize one without adding to the library.
3
User avatar
eneroth3 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Eneroth Railroad System

Postby rv1974 » Thu May 22, 2014 8:59 am

Without spaghetti western style bandits in library the plugin is rather pointless.
How am I supposed to robber the train? :D
bang-bang
0

rv1974 
 

Re: [Plugin] Eneroth Railroad System

Postby Krisidious » Thu May 22, 2014 9:33 am

rv1974 wrote:Without spaghetti western style bandits in library the plugin is rather pointless.
How am I supposed to robber the train? :D
bang-bang


:roflmao:
0
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: [Plugin] Eneroth Railroad System

Postby eneroth3 » Thu May 22, 2014 9:35 am

rv1974 wrote:Without spaghetti western style bandits in library the plugin is rather pointless.
How am I supposed to robber the train? :D
bang-bang



Make a 2d face me component of a person pointing a gun and follow the train with the camera. Then you can be inside the train and have a person standing at the side of the track pointing the gun at you when driving by :D
2
User avatar
eneroth3 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Eneroth Railroad System

Postby rv1974 » Thu May 22, 2014 10:18 am

Surströmming western?
I see..:)
0

rv1974 
 

Re: [Plugin] Eneroth Railroad System

Postby pilou » Thu May 22, 2014 11:39 am

Reading the "Read me" ! :fro:
That is a complete universe! :shock:
mech.gif
1
Frenchy Pilou
Is beautiful that please without concept!
My Little site :)
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Eneroth Railroad System

Postby Rich O Brien » Thu May 22, 2014 11:41 am

Added to PluginStore
1
User avatar
Rich O Brien 
Administrator
 

Re: [Plugin] Eneroth Railroad System

Postby eneroth3 » Thu May 22, 2014 12:05 pm

Rich O Brien wrote:Added to PluginStore

:thumb:
2
User avatar
eneroth3 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Eneroth Railroad System

Postby Lz » Thu May 22, 2014 12:46 pm

Very impressive. It's a shame that it doesn't seem to work on my SU 8 (i'm using WinXP btw). But i'm planning on upgrading anyway so i might take another look sometime in the future.

either way, if you need help adding new rolling stock/locomotives for future versions, please let me know and i'll gladly try to help out with some models. German locomotives are one of my favorites too.
2

Lz 
 

Re: [Plugin] Eneroth Railroad System

Postby Oxer » Thu May 22, 2014 7:18 pm

I tried to install on Mac 10.9.3 &SU2014 but it appears Load Error

Error al cargar archivo ene_railroad.rb
Error: #<TypeError: wrong argument type nil (expected Regexp)>
/Users/Oxer/Library/Application Support/SketchUp 2014/SketchUp/Plugins/ene_railroad.rb:202:in `gsub'
/Users/Oxer/Library/Application Support/SketchUp 2014/SketchUp/Plugins/ene_railroad.rb:202:in `<module:Ene_Railroad>'
/Users/Oxer/Library/Application Support/SketchUp 2014/SketchUp/Plugins/ene_railroad.rb:200:in `<top (required)>'
0
"The result is the end what is important is the process" by Oxer
http://www.oxervision.blogspot.com/
User avatar
Oxer 
 

Re: [Plugin] Eneroth Railroad System

Postby Elibjr » Thu May 22, 2014 8:12 pm

Wow! There is no word to describe how amazing this plugin is! There is a LOT of work here! Like someone said before,I would love to see this in conjunction with the "Enderoth Roadway System" with moving cars! :D This could then be the basis for a 'City Engine' like interface to generating a full city infrastructure system! Create a SketchUp parametric building modeler and you can develop set for model trains, virtual cities for the big screen and Real world studies for municipalities. Then export the whole thing component by component to a 3d printer and have a physical model to take to a municipal presentation for zoning! ;) This, my dear, is a real Sketchup game changer! Thank you for all the hours you spent on this! This should be voted as plugin on the month! Awesome! Sketchup: "The Next Big Thing". Can't wait to have fun with it! :thumb:
3
User avatar
Elibjr 
Premium Member
Premium Member
 

Re: [Plugin] Eneroth Railroad System

Postby eneroth3 » Thu May 22, 2014 8:30 pm

Lz wrote:Very impressive. It's a shame that it doesn't seem to work on my SU 8 (i'm using WinXP btw). But i'm planning on upgrading anyway so i might take another look sometime in the future.

either way, if you need help adding new rolling stock/locomotives for future versions, please let me know and i'll gladly try to help out with some models. German locomotives are one of my favorites too.


There seems to be some bug with the observers in older SU versions :( . However you can try it in Sketchup 2013. I've tried to make it as easy as possible to initialize own rolling stocks and it would be really fun if you and other people made your own and sharde :) . At the moment there's some strange bug when saving a rolling stock to the library so after doing so it's best to restart SU to avoid it from crashing later.

Oxer wrote:I tried to install on Mac 10.9.3 &SU2014 but it appears Load Error

Error al cargar archivo ene_railroad.rb
Error: #<TypeError: wrong argument type nil (expected Regexp)>
/Users/Oxer/Library/Application Support/SketchUp 2014/SketchUp/Plugins/ene_railroad.rb:202:in `gsub'
/Users/Oxer/Library/Application Support/SketchUp 2014/SketchUp/Plugins/ene_railroad.rb:202:in `<module:Ene_Railroad>'
/Users/Oxer/Library/Application Support/SketchUp 2014/SketchUp/Plugins/ene_railroad.rb:200:in `<top (required)>'


Oh :shock: , I thought it would break on web dialogs and possibly multiple document interface. I'll look into this error.
0
User avatar
eneroth3 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Eneroth Railroad System

Postby Oxer » Thu May 22, 2014 8:44 pm

Thansk for the reply!!
This is a incredible plugin :thumb: , I would like play with it on Mac, waiting your fix. :roll:
0
"The result is the end what is important is the process" by Oxer
http://www.oxervision.blogspot.com/
User avatar
Oxer 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: catmotinha, cindyseptianica, Guerem, Hierara, JBU, Majestic-12 Bot, nagihanderelii, rezha_yudiokta, rigotto and 21 guests