|
|||
author | remove search highlighting | ||
---|---|---|---|
posted: 30 Aug 2020 17:27 from: Martin Wynne
click the date to link to this post click member name to view archived images |
A few days ago Roger asked about a diamond-crossing on a transition curve. So I watched again the video from 2015: http://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: 2_301120_060000000.png 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: 2_301120_060000001.png Clicking that menu item shows this dialog: 2_301120_060000002.png 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: 2_301120_060000003.png And zooming in you can see that despite the transitions and slews Templot has found the exact intersection point: 2_301120_060000004.png 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. |
||
posted: 30 Aug 2020 17:37 from: Paul Boyd
click the date to link to this post click member name to view archived images |
Now that looks like a useful function! | ||
posted: 31 Aug 2020 14:47 from: Judi R
click the date to link to this post click member name to view archived images |
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 |
||
posted: 31 Aug 2020 15:23 from: Martin Wynne
click the date to link to this post click member name to view archived images |
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: 2_311014_440000000.png Although I don't remember ever posting about it before. It is explained on this old page: http://templot.com/vis_box/turnout_on_intersect/ Also available as a PDF: http://templot.com/companion/fit_turnout_to_existing_curves.pdf The existing notch on intersection functions are: 2_301120_060000000.png cheers, Martin. |
||
posted: 5 Sep 2020 17:05 from: DerekStuart
click the date to link to this post click member name to view archived images |
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 |
||
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. |