Select to view content in your preferred language

Using the ESRI Fence rule to create a Monorail

1323
2
10-26-2020 06:53 AM
by Anonymous User
Not applicable

Just for fun, I tried using some models from  KitBash3D to see if I could procedurally connect my support structures and rail models to create a procedural monorail line.   

To start, I drew a street network across the terrain.  Then I started to write my own code, but in the end I thought it would be easier and better to try using the existing ESRI fence code as a base point.  And to this point I have not made any modifications to that code.   I used the post section to select the support structures.  It took some adjustments to get it to match the original model size.   The next thing I did was to copy and paste the same graph network, and use that for the rails.  The reason I copied it was because, I used the Fence Main "Middle" to insert the rails model and then set the "fence main middle" width to a smaller size to achieve a more rounded look of the rails; and if I used the same graph network as the support structures, then the support structures would be set too close to each other, as the "fence main middle" controls the spacing of the posts.   I am quite pleased with the results so far without having to make any modifications to the Fence code.

There are still some things I would like to fix.  When the rail requires height the code keeps model rotation flat.  I think that can fixed with a little tinkering.  Or maybe one of the other fence settings can control this.  I don't know yet.    

Rail Height Issue

Just thought I would share this!

2 Replies
DavidWasserman
Frequent Contributor

Very cool! Does insertAlongUV not correct for the height differentials? Is that an option here?

David Wasserman, AICP
0 Kudos
by Anonymous User
Not applicable

Hi David,  Thanks for the suggestion!  I am still using your Complete Street code to learn new tricks all the time.   You are correct that an insertAlongUV was needed.  I'm pretty sure that the fence code uses that for the "Base" and the "Horizontal Bar" but not the "Fence Main Middle".   I decided to use the base and and add a few attributes to modify the scope to my needs.

I used a tileUV  to adjust the model scope in one direction slightly so that it was more true to its original size. I added a translate to move up the height(y) axis.   And I noticed that on the street shape generator, that if I set precision higher I got better results with the rails matching up at the seems.    And then on the post section of the fence code, I added a translate for the support structures to move them on the x-axis, to cover the seems and hide them a little better. 

The other benefit of using two copied versions of the street, one for support structures and one for rails -  was that if I needed to make minor adjustments to the support structures to match the "uv warped rails"  that it was a lot easier that way.   I just simply adjusted the nodes with move tool.