click here for a list of all existing Templot documentation
  Important Privacy Information cookie information pre-print options:    

 click image to open Templot Club in a new tab             Search           remove page highlighting
Templot club top logo
  looking for help ? -- -- --
looking for Templot? - (free)


enjoy using Templot? - 

 you are not logged in  - Login | Join

receive all messages by email: info


Recent Topics
Front Page  Search  Image Gallery  Gallery Upload  My Account  Members  SourceForge  TemplotMEC  Help  
make a donation  
this web site is now  READ-ONLY

to post new messages, please go to

NEW WEB SITE - CLICK HERE       more info - click here
Templot Companion - User Guide
            Templot Chat Room
page trail:  Templot Club > Forums > Templot talk > finding intersections
Templot web site

                 finding intersections
     
 Start new topic   Reply blank   Printer friendly 
  Rate this topic  
AuthorMessage
 Clicked a link? Wrong message? Wait until the page has finished loading, click in the address bar and then press the Enter key. This is a timing bug in some browsers.
1st message | this message only posted: 30 Aug 2020 17:27
 PM  Reply with quote  Reply blank 
from:
Martin Wynne
West Of The Severn, United Kingdom



view images in gallery
view images as slides

Please do not send requests for help direct to me via email or PM.

Post your questions on the forum where everyone can see them and add helpful replies.
A few days ago Roger asked about a diamond-crossing on a transition curve. So I watched again the video from 2015:

https://flashbackconnect.com/Movie.aspx?id=ib65pLfUkgNxFBDqAZSNyA2

It uses the method of finding the intersection by moving the mouse manually along the rails and judging the intersection position on the screen by eye. It struck me as a bit agricultural to be still using such methods after all these years, relying on close hand-eye co-ordination and limited by the screen resolution and rounding effects in the drawn lines on the screen.

For a long time we have had the notch on intersection functions:



which are fine as far as they go. But they are limited to fixed-radius curves, and apply only to plain track and/or the main road of a turnout.

They are based on conventional circular geometry, which means they always find two intersections. Resulting in a clunky interface in which Templot asks you which one you want -- even when one of them is nowhere near the templates.

But they do have the advantage of being guaranteed to produce a result.

For years I have had some bits of experimental code for finding intersections directly. Watching that video, I decided it is high time I did something about it, so for the next program update I have implemented an alternative find intersection function:




Clicking that menu item shows this dialog: 



which will find an intersection between any rail (gauge-face) or centre-line with any other rail or centre-line, on any template, straight, curved, transitioned or slewed. And on the main road or turnout road of a turnout or half-diamond. There will be only one intersection, or none if it would be outside one or both of the templates.

Notice that both these turnouts contain a transition curve combined with a slew. The likelihood of anyone wanting to superimpose two such turnouts is almost nil, it's just to demonstrate the function. :)

(Note that despite appearances the background template is a right-hand template.)

Here I set it to find the intersection between the turnout-road stock rail on the background template, and the turnout-road crossing rail on the control template, with this result after a few seconds:




And zooming in you can see that despite the transitions and slews Templot has found the exact intersection point:



The notch could now be moved under it. The intersection angle is known and there will also be an option to insert a V-crossing or K-crossing of that angle at the intersection location if required.

This will save quite a lot of faffing about, for example when creating custom type 2 tandem turnouts, or custom tandems on a transition curve -- the auto make tandem function isn't available for transitions or slews. And when working with partial templates generally.

Just one thing holding me back -- if I leave the existing notch on intersection functions, it will be hard work explaining to beginners the difference between the two. And a whole lot of videos and screenshots will need re-doing. That's two things. I was quite pleased to get the function working, but now feeling weary at the amount of work involved in getting it implemented and released. There is a lot of new stuff in 227a already. :(

cheers,

Martin.

__________
message ref: 30638

 
 Clicked a link? Wrong message? Wait until the page has finished loading, click in the address bar and then press the Enter key. This is a timing bug in some browsers.
2nd message | this message only posted: 30 Aug 2020 17:37
 PM  Reply with quote  Reply blank 
from:
Paul Boyd
Loughborough, United Kingdom

 

view images in gallery
view images as slides
Now that looks like a useful function!
__________
message ref: 30640

 
 Clicked a link? Wrong message? Wait until the page has finished loading, click in the address bar and then press the Enter key. This is a timing bug in some browsers.
3rd message | this message only posted: 31 Aug 2020 14:47
 PM  Reply with quote  Reply blank 
from:
Judi R
Sutton-on-Sea, United Kingdom



view images in gallery
view images as slides
Martin, that's an excellent function to have. The ability to automatically place a crossing at the intersection would save a huge amount of faffing about.

Judi R
__________
message ref: 30644

 
 Clicked a link? Wrong message? Wait until the page has finished loading, click in the address bar and then press the Enter key. This is a timing bug in some browsers.
4th message | this message only posted: 31 Aug 2020 15:23
 PM  Reply with quote  Reply blank 
from:
Martin Wynne
West Of The Severn, United Kingdom



view images in gallery
view images as slides

Please do not send requests for help direct to me via email or PM.

Post your questions on the forum where everyone can see them and add helpful replies.
Judi R wrote: Martin, that's an excellent function to have. The ability to automatically place a crossing at the intersection would save a huge amount of faffing about.
Thanks Judi, Paul.

The existing notch on intersection functions do already support that, if there is a turnout in the starting control template. But only for intersects in the main roads, and not for transition curves:




Although I don't remember ever posting about it before. :? It is explained on this old page:

 https://templot.com/vis_box/turnout_on_intersect/

Also available as a PDF:

 https://templot.com/companion/fit_turnout_to_existing_curves.pdf


The existing notch on intersection functions are:



cheers,

Martin.

__________
message ref: 30645

 
 Clicked a link? Wrong message? Wait until the page has finished loading, click in the address bar and then press the Enter key. This is a timing bug in some browsers.
5th message | this message only posted: 5 Sep 2020 17:05
 PM  Reply with quote  Reply blank 
from:
DerekStuart
United Kingdom

 

view images in gallery
view images as slides
Martin,

this is a really powerful feature. As a recent returnee I admit to struggling with partial templates despite using them regularly in the past.

I can understand your reticence in respect of the inevitable questions this will generate. I have some automotive diagnostic software at work which requires that before I engage in any advanced feature, I sign in with a password to confirm that I know what I'm doing. Perhaps something similar here "WARNING: You are attempting to use an advanced feature. Please confirm you understand the basics first."

I've asked you a number of questions over the years as have we all, but most has been learned by the realisation that experimenting with Templot, pressing a few buttons etc, isn't going to bring about the collapse of civilisation.

Just my observation if it's any help.

Derek
__________
message ref: 30696

 
This is topic ID = 3752     Page created at 15:51 (local time)  
You can type a quick reply to this topic here.

Click in the box to begin.


But to reply to an individual message, or to include images, attachments and formatted text, use the reply buttons on each message above.

To start a new topic in this forum, click the Start new topic button below.
To start a new topic in a different forum, click the Forum Jump drop-down list below.

             Start new topic 

 click to jump to a different forum:     Back to top of page

Templot Club > Forums > Templot talk > finding intersections
about Templot Club

list recently active topics Templot Companion - User Guide - A-Z Index Templot Explained for beginners Please click: important information for new members and first-time visitors.
indexing link for search engines

back to top of page


Please read this important note about copyright: Unless stated otherwise, all the files submitted to this web site are copyright and the property of the respective contributor. You are welcome to use them for your own personal non-commercial purposes, and in your messages on this web site. If you want to publish any of this material elsewhere or use it commercially, you must first obtain the owner's permission to do so.

The small print: All material submitted to this web site is the responsibility of the respective contributor. By submitting material to this web site you acknowledge that you accept full responsibility for the material submitted. The owner of this web site is not responsible for any content displayed here other than his own contributions. The owner of this web site may edit, modify or remove any content at any time without giving notice or reason.
Problems with this web site? Contact webmaster@templot.com.   This web site uses cookies: click for information.  
© 2020  

Powered by UltraBB - © 2009 Data 1 Systems