Templot Club forums powered for Martin Wynne by XenForo :

TEMPLOT 3D PLUG TRACK - To get up to speed with this experimental project click here.   To watch an introductory video click here.   See the User Guide at Bexhill West.

  • The Plug Track functions are experimental and still being developed. Some of the earlier pages of this topic are now out-of-date.

    For an updated overview of this project see this topic.   For some practical modelling aspects of using Plug Track see Building 3D Track.

    The assumption is that you have your own machines on which to experiment, or helpful friends with machines. Please do not send Templot files to commercial laser cutting or 3D printing firms while this project is still experimental, because the results are unpredictable and possibly wasteful.

    Some pages of this and other topics include contributions from members who are creating and posting their own CAD designs for 3D printing and laser-cutting. Do not confuse them with Templot's own exported CAD files. All files derived from Templot are © Martin Wynne.
  • The Plug Track functions are experimental and still being developed.

    For an updated overview of this project see this topic.   For some practical modelling aspects of using Plug Track see Building 3D Track.

    The assumption is that you have your own machines on which to experiment, or helpful friends with machines. Please do not send Templot files to commercial laser cutting or 3D printing firms while this project is still experimental, because the results are unpredictable and possibly wasteful.

    Some pages of this and other topics include contributions from members who are creating and posting their own CAD designs for 3D printing and laser-cutting. Do not confuse them with Templot's own exported CAD files. All files derived from Templot are © Martin Wynne.

Version control

Quick reply >
I've been reviewing messages in the old Templot Club, and there are several that I feel need to be continued/actioned.

The first one that I think is critical if Templot3 is to go ahead as an open-source project is establishing a version control repository and determining who will have rights to update code in it.

I see that SourceForge supports several flavours of version control: subversion, mercurial or git. At this stage I think it is a done deal in the IT world that git has won (sadly), so I would suggest that git be adopted as the version control system of choice. It's not a simple system to use, but it is very powerful and as a distributed system it is very easy to fork or move to another host if that is ever required.

I've not worked on open-source projects before, but my understanding of the normal workflow is that a small group of people (maintainers) are given read-write access to the repository. Everybody else in the world only has read-only access.

If someone who is not a maintainer wants to make a change to the code, they can submit a "pull request" containing their changes. A maintainer can then review the code, and if it is acceptable, they can then merge the code into the repository. This can potentially be quite a bit of work for the maintainers, but is essential to prevent random vandalism of the code :-(

So the action items from here are:
  • create a git repository in SourceForge and populate it with the current Templot3 code
  • nominate maintainers, and provide them with developer access to the repository.

From looking at the old messages, my immediate thoughts for possible maintainers (beyond Martin of course) would be Graeme in Bangkok and Andrew Hunt who appear to be people that have taken a serious interest in the code recently. I would also happily offer myself as well, but I am very new here so I wouldn't expect to be accepted immediately :)

Regards,
Alistair W.
 
_______________
message ref: 447
Hi Alistair,

Welcome to Templot Club. You've been a member for 4 years, but I think this is your first post. :)

We have had assorted Tortoises and Git repositories on Sourceforge at least 3 times, and I always ended up deleting them in sheer frustration.

Have you read this topic:

https://85a.uk/templot/archive/topics/topic_3652.php#p29499

That was 9 months ago now. It looked promising, but neither Graeme nor Andrew have posted since, and neither of them have registered on this new forum. Previously we also had Adrian, but he also disappeared. Do you detect a pattern here? :)

I suspect what happens is that coders who are not actually Templot users discover the T3 code on Sourceforge, and get all enthusiastic -- until they realise just how much work will be needed to convert a program developed piecemeal over 40 years, using a 25-year-old compiler, into anything resembling a modern open-source project. :(

I'm willing to have yet another go at setting up a version-control repository on Sourceforge, but I need to have it explained in terms of nuts and bolts, not pages of acronyms and terminology I don't understand. I need some convincing that the time and trouble will be worth it, and that anyone will be taking any interest in it in say 6 months time.

At every turn when looking in the Help, I was told that I must enter X, but never ever told WHERE I must enter it. Every likely-looking box was always greyed out and disabled. It was almost impossible to understand whether I was interacting with a program running on my computer, or code running on the server, and sometimes both at once. In the end it all got so frustrating that I threw it out of the window and deleted the lot. That has happened no less than 3 times now.

I suspect that a lot of the problem is that a program which has no overall design or structure is impossible to convert to a modern modular project. Templot developed over 40 years, originally for my own use only, by bolting bits on as and when I needed them, and then unbolting them, or bits of them, and bolting them on somewhere else, or something else in their place. Some bits were tied on with string. It's the original Meccano tea trolley which morphed into a combine harvester, with bits of hovercraft attached, and it's all still exactly the same. :(

Time for a boiled egg.

cheers,

Martin.
 
_______________
message ref: 456
Hi Martin,

Yes, I can see you've had a somewhat unfortunate history of setting up version-control repositories.

I suspect that a lot of the problem is that a program which has no overall design or structure is impossible to convert to a modern modular project. Templot developed over 40 years, originally for my own use only, by bolting bits on as and when I needed them, and then unbolting them, or bits of them, and bolting them on somewhere else, or something else in their place. Some bits were tied on with string. It's the original Meccano tea trolley which morphed into a combine harvester, with bits of hovercraft attached, and it's all still exactly the same. :(

It is clear from looking at Templot that there is a vast amount of knowledge embedded in the code (I found it interesting that the Wikipedia page for Railroad Switch refers to Templot!)

Converting it to a "modern modular project" is a simple process - just long and tedious. It is simply a process of picking one little piece at a time and "fixing" it so it fits into an overall idea of what the design should be... I've done this sort of thing before (for work) and it is certainly tedious, but it is quite possible.

One of the major problems with this approach that you need to be aware of (and ok with), is that once this process starts the code will rapidly diverge from where it currently is, which will make any form of code mobility between Templot2 and 3 very difficult.

I'm willing to have yet another go at setting up a version-control repository on Sourceforge, but I need to have it explained in terms of nuts and bolts, not pages of acronyms and terminology I don't understand. . I need some convincing that the time and trouble will be worth it, and that anyone will be taking any interest in it in say 6 months time.

I'm willing to have a go at helping set this up, but it will be learning experience for both of us :) I'm quite familiar with git (I was "volunteered" at work to be a "git evangelist" when we converted from Subversion to git), but SourceForge is new to me.

I have just gone through the process of registering on SourceForge (my username there is award65) and setting up an SSH key.

I don't have a project on SourceForge to play with, so I'll be guessing a bit, but the basic steps required will be:
  1. Create an SSH Key and enter it into SourceForge (if you haven't already done this in the past).
  2. Create a git repository on SourceForge.
  3. Optionally, change the default "master" branch name to something else (usually "main"). Not strictly necessary, but an important step for inclusivity - master has bad connotations for many people.
  4. Clone the empty repo to your PC.
  5. Copy all source code files to the repo directory.
  6. Create a .gitignore file. A sample .gitignore for FPC/Lazarus can be found at https://github.com/github/gitignore/blob/master/Global/Lazarus.gitignore. This file tells git what files should *not* be saved into the repository.
  7. Commit the project to your local repository
  8. Push from your local repo to SourceForge
While I would like to say that I absolutely will still be here in 6 months time, I can't guarantee that (I could beat you under that bus :) ), but what I think I can say is that without a proper repository the chances of any outside development happening are slim to zero.

Please let me know what additional help is needed if you want to try setting up the above. If you want me to do any of those steps for you, I can also do that. Steps 1 and 2 must be done by you. I could do the rest if given developer access to the project (and you're happy with using the source code from the zip file as the initial commit).

Regards,
Alistair Ward.
 
_______________
message ref: 463
Create an SSH Key

Hi Alistair,

Here we go again. What is an SSH key? If I ever knew, I have forgotten.

I think SourceForge was originally set up for Tortoise/Mercurial, and only later added Git.

Of the two, I found the Mercurial thingy marginally easier to grasp, and Git utterly unfathomable:

https://www.mercurial-scm.org/

In fact, I seemed to be making some headway with the 3rd install of Mercurial, although depressed by the sheer amount of time and work needed, which would contribute not one iota to the actual functionality of Templot. When there had been no activity on it for several months I decided it would be time wasted, deleted the whole thing and left a simple download zip for anyone who wanted it.

To be honest, I have latterly tended to regard T3 as a dead-end backwater of Templot, left purely as an insurance fallback against that dreaded bus. There have been so many developments in Templot2 over the last 3 years that simply getting T3 to catch up would be a massive effort in itself, not to mention all the still-missing components from the original. I have a further update of T2 in the works with several new functions which will further widen the gap.

But first I have the fallout of the move to a new forum and server to deal with, including creating a searchable archive of the old forum. There are straws in the wind which suggest the old web site may vanish into thin air sooner than I was expecting. This awful Covid thing is affecting everything.

Until it is all moved and running smoothly, with no dead links or lost info, everything else is on the back burner.

But if T3 could be resurrected as an active ongoing project, and fully up-to-date with T2, that would be great. But I fear it is something of an impossible dream after so many false starts.

cheers,

Martin.
 
_______________
message ref: 464
What is an SSH key? If I ever knew, I have forgotten

An SSH key is actually a pair of keys, one public and the other private. You keep the private key secure for yourself and put the public key onto SourceForge. Whenever you use SSH (Secure-SHell), these keys are used to establish that you really are you :) Because only you have the private key, this can be used in place of usernames and passwords.

Of the two, I found the Mercurial thingy marginally easier to grasp, and Git utterly unfathomable.
I completely agree - Mercurial would have been my personal choice a couple of years ago, but sadly the "war" has been won by git. Even bitbucket (set up by the creators of Mercurial) have dropped Mercurial support and switched to git.

But if T3 could be resurrected as an active ongoing project, and fully up-to-date with T2, that would be great. But I fear it is something of an impossible dream after so many false starts.

It is clear to me that you have been burnt too many times, and don't have the time or energy to put into T3, and this is quite understandable.

I have a proposal for you. I will create a "fork" of T3, and set it up as a new project, probably on github as it has a few more services available. I'll include appropriate links back to Templot.

Lets give it 6 to 12 months to see what progress happens, and if it looks like it is making progress that is of interest to you, then *at any time* you can pull it back to SourceForge and continue with it as an "official" Templot project.

No effort or time required on your part, except maybe keeping an eye on what activity there is (and occasionally being asked questions about the code).

Regards,
Alistair Ward.
 
_______________
message ref: 465
I have a proposal for you. I will create a "fork" of T3, and set it up as a new project, probably on github as it has a few more services available. I'll include appropriate links back to Templot.

Lets give it 6 to 12 months to see what progress happens, and if it looks like it is making progress that is of interest to you, then *at any time* you can pull it back to SourceForge and continue with it as an "official" Templot project.

No effort or time required on your part, except maybe keeping an eye on what activity there is (and occasionally being asked questions about the code).

Hi Alistair,

That's fine by me. :)

In fact it is what I expected to happen when I first made Templot open-source, that everyone would create their own "fork" of Templot and develop it in line with their own particular interests. Not necessarily on SourceForge, I know some members here are, or at least were, interested in learning to code and tinkering with Templot on their own computer just for their own use. This fun aspect all got rather lost when talk of SourceForge and version control systems started.

I do wish to make clear that regardless of what happens to T3 I intend to continue with Templot2 development and release non-open-source updates, at least until the obstacle of replacing the licensed components is overcome. Templot users do need the Sketchboard and PDF exports, for example. On top of that, the NLS map captures are an essential function for many, so we need an embeddable browser which returns the current URL. And Windows EMF metafiles are essential to the working in several places.

I will email you about the Sketchboard problem, which also affects the current XML engine.

cheers,

Martin.
 
_______________
message ref: 469
This fun aspect all got rather lost when talk of SourceForge and version control systems started.

Hi Martin, that's what happened with me, I think. I don't know if I'll ever be able to do any tweaks to my own version of T3, but I sort of lost interest when someone came along and seemed to want to take over control of everyone's projects and all the acronyms and unfamiliar names and processes started appearing. I hate TLAs! The idea of sharing bits of code that we could patch into our own copies does still appeal though.

The other factor was Templot no longer needing the internet lookup in order to run - I was previously worried that if the proverbial bus came along and a train crashed into the server room, that I'd no longer be able to get at my designs! Of course, that worry is no longer relevant.

I'll be keeping half an eye on this thread!

Cheers,
Paul
 
_______________
message ref: 470
Hi Alistair,

I've read back through these recent posts, and I think my tone might have seemed a bit less than enthusiastic.

I'm sorry about that. I do really welcome your new interest in T3 and the possibility of getting something going again.

The dream would be to have a thriving project of Templot3 which was a fully functional equivalent to Templot2. The latter could then be retired, while I sink slowly in the west after all these years, knowing that Templot is in capable hands for the future.

The snag is that it seems an impossible dream at present, with so many obstacles to progress, and so many loose ends.

In the previous attempts, I felt that a lot of the problem was that those involved weren't actual model track builders or Templot users, being more interested in coding for its own sake than actually using the program. I was a bit surprised when after posting several chunks of code, Graeme said he had never actually used Templot and intended to learn it.

At least I know that you have been reading about railway track on Wikipedia. :)

Welcome again to Templot Club, Alistair.

cheers,

Martin.
 
_______________
message ref: 488
Ahhhhh - so THIS is where you've all been hiding! I somehow missed the fact that I needed to re-register. :rolleyes:

I was keeping a gentle eye on things (i.e. reading the latest postings when I got an email) but when it all went quiet I just assumed everything ... well ... had just gone quiet! hahaha

OK - lots of things to answer ...
  1. Hi Alistair. It's great to see you are interested in carrying this forward.
  2. Absolutely happy to help out with the repository. I have just one request - I have a repo already that is based on an old version of Martin's source code. As I have based my PDF development on it (around 20-30 commits, as I recall) it would be great if we could use that as the base, so we are all working from the the same starting point. (Actually that should read "so it's easy for me to integrate the PDF work". :) ) I don't meant to say that I am particularly interested in owning the "original" Templot 3 repo. I do have a Templot3 repo in Github, but I will be happy to delete that and re-fork from yours if that is what you would prefer.
  3. I have contributed to a few open source projects (nothing major, I hasten to add) and the process you outline is spot on.
  4. "Converting it to a "modern modular project" is a simple process - just long and tedious" - absolutely agree, though your approach (not to mention your definitions of both "long" and "tedious") is likely to temper as you expose yourself more and more to the code. As Martin says, 40 years-worth of layers upon layers is a lot of unravelling. :) Anyway, you seem to have made a good start to plumbing the depths so here's to much happy tedium🍻.
  5. Martin : "Graeme said he had never actually used Templot and intended to learn it." This should not have been a surprise. In my intro message I did try to make it clear that I was a developer who had just 'found' Templot (rather than a railway guy who wanted to learn to code) and was interested to help. I seem to recall that at the time you were bemoaning the fact that, having bowed to requests from users you had open-sourced the code 6 months previously, and in that time not one single line of code had been contributed. In my enthusiasm to show you that you had made the right decision, I contributed code.
Anyhoooooooo ... great to be back in the land of the living (although as the UK climbs back out of lockdowns, we seem to be just starting to get covid here in Thailand 😕)

Alistair: with regard to point 2 above, I have given much thought to how we can keep T2 and T3 working side-by-side (in particular, the mechanics around the git/github perspective) but I would like to bounce my ideas off you, if you don't mind. As this is virtually certain to overstep the Geekiness Event Horizon I suggest we take it offline. I'm not sure if posts to your profile are 'private' messages, but I have posted my email address there.

Cheers,

graeme
 
_______________
message ref: 1298
I'm not sure if posts to your profile are 'private' messages, but I have posted my email address there.
@graeme

Hi Graeme,

Welcome back. :)

Everything on Templot Club is public to any registered member who is logged in.* I have removed any form of private messaging between members because I don't see it as my function to provide such a thing, and there are legal issues.

That's what email is for. If you wish to make your email address visible to other members, it's best to go to:

https://85a.uk/templot/club/index.php?account/account-details

Scroll to the bottom of the page and enter it in the About you section.

Any member will then be able to find it by going to:

member_about.png


It won't be visible to non-members or search engines.



* the exception to this is this section:

https://85a.uk/templot/club/index.php?forums/my-notes-and-files.30/

Anything posted there is visible only to you. But even there, any posted images will be visible to all via the Media gallery. It is primarily intended as an easy private backup of Templot data files.

cheers,

Martin.
 
_______________
message ref: 1299
_______________
message ref: 1302
After some discussion with Alistair, we believe have a basis for moving forward. The only item outstanding is the ongoing changes to T2. Clearly we need to occasionally fold these into T3 so that it can stay current.

Martin, I know that you are not interested in learning the intricacies of git, so Alistair and I need to take that task onboard.

I recall that you made a number of changes to T2 to create T3 in the first place. However, going forward, it would obviously be wasteful for you to either keep making those changes to T2, or applying your updates to T3. The easiest course, if you are able (and willing :) ) would be to provide the unadulterated T2 source, from which we can determine the changes and apply them to T3.

Obviously the whole of the above is on the understanding that certain units (PDF, sketchboard and maybe others) contain proprietary code, and would be specifically excluded.

Is this workable for you?
 
_______________
message ref: 1537
... but I sort of lost interest ...
That's a shame. The whole beauty of open source is that ... well ... the source is open! 😄 You can copy it and change it in any way you want. It's entirely up to you. Git is just one of the tools used to make it easier to merge others' bits of code into our own copies, but if you prefer to do it a different way, have at it! If you have some changes you would like to make, the source is there. Just grab a copy and tweak away.

Above all, have fun doing it!

Cheers,

Graeme
 
_______________
message ref: 1538
Martin, I know that you are not interested in learning the intricacies of git, so Alistair and I need to take that task onboard.
@graeme

Hi Graeme,

Good to hear from you.

I'm not necessarily uninterested. But I do need to have it explained and discussed in ordinary English, not a stream of acronyms and abbreviations -- I don't do IT-speak. :)

The easiest course, if you are able (and willing :) ) would be to provide the unadulterated T2 source, from which we can determine the changes and apply them to T3. Obviously the whole of the above is on the understanding that certain units (PDF, sketchboard and maybe others) contain proprietary code, and would be specifically excluded. Is this workable for you?

Well maybe. But first things first:

UNDER NO CIRCUMSTANCES WHATSOEVER AM I PREPARED TO WORK WITH SPACES AROUND OPERATORS.

I just can't do it and won't do it. I read and write abc:=123;.

My brain just can't assimilate abc := 123; without a constant and tiring struggle. I'm too old to change now.

Nor can I do any form of cAmeL casE. Fortunately Pascal is case-insensitive, so I can happily write all lower case with underscores.

Just doing a dump of the T2 source isn't feasible. The comments include swathes of my old notes and years of emails about railway track and other stuff. Not to mention great chunks of old code commented out. To create the original T3 files I spent a couple of weeks going through it and removing all that stuff. So I would need to do all that again. Many of the files have seen a lot of changes in the 3 years since I did it the first time.

If there had been an active T3 group during that time I might have posted each change as I made it, but seeing the lack of significant interest it just seemed extra work for no practical gain.

I've just had a torrid few weeks trying to get the latest 227b version of T2 finished and released, and I still have some release notes to write. After that the weather is at last improving after a washout May and I'm hoping to catch up on some community gardening. So it might be a week or two before I can post anything. You might find the files come in dribs and drabs.

p.s. have you got anywhere with solving the issue of excessive CPU activity when T3 is running outside the Lazarus IDE?

cheers,

Martin.
 
_______________
message ref: 1539
Hi Martin,

I'm not necessarily uninterested. But I do need to have it explained and discussed in ordinary English, not a stream of acronyms and abbreviations -- I don't do IT-speak. :)
That seems to be akin to asking for an explanation of how Templot works but without any 'railway-speak'. Just not possible. That is why our starting point in trying to find a way forward was that it must not necessitate you learning git.

UNDER NO CIRCUMSTANCES WHATSOEVER AM I PREPARED TO WORK WITH SPACES AROUND OPERATORS.
I just can't do it and won't do it. I read and write abc:=123;.
My brain just can't assimilate abc := 123; without a constant and tiring struggle. I'm too old to change now.
Crikey, Martin, where did this come from? o_O This is not about code formatting. You and I agreed long ago (Dec 2019) that such discussions were a pointless waste of time. In fact, as I recall, you wrote a little utility to format code the way you like it. Formatting is not even mentioned in my post, so no, nobody wants to change your coding style.
Nor can I do any form of cAmeL casE. Fortunately Pascal is case-insensitive, so I can happily write all lower case with underscores.
The same applies. I don't understand where this is coming from.

What I WAS trying to do was find a way for you to continue to work without change on T2, and Alistair and I undertake to fold those changes into T3.

Just doing a dump of the T2 source isn't feasible. .......
Physically this is indeed doable. I believe my git-skills are such that we could go back to your original efforts, have git extract the changes you made and re-apply them to the new version(s). It could be made to work, I am sure. HOWEVER, if I remember correctly, there are some private communications in amongst all those comments and emails that you do not want made public, which is certainly understandable. That does indeed seem to scupper that plan. :(

More thought required, it would seem. :unsure:

p.s. have you got anywhere with solving the issue of excessive CPU activity when T3 is running outside the Lazarus IDE?
OUTSIDE the IDE? :oops: That's a scary world out there!

No, not even close to it yet, sadly. The focus at the moment is mainly finding a way we can work together and replacing the missing components.

Cheers,

Graeme
 
_______________
message ref: 1554
@graeme

Hi Graeme,

Sorry if my previous reply was a bit stroppy. You caught me in the middle of trying to get a new T2 version released after a gap of 12 months, a move to a new server, and quite a few tangles. The last thing I wanted was yet more things to do.

I think you were the one who wrote a utility to modify my formatting. It's not something I have ever done.

Perhaps I misunderstood what you were asking for? There is no way I am going to publish my T2 code files verbatim. To prepare them for the first T3 release I spent a couple of weeks removing private stuff, old code which I have kept for reference, years of assorted notes and comments, and general tidying up. Some of them have been in existence for 30 years and frequently edited, so you can imagine how much junk they have accumulated.

Also, I had to remove all references to the licensed code components which I can't open-source, and in the process I moved some chunks of code around between the units to make things more logical. I tested it in Lazarus and made some changes to allow it to compile without errors. And finally added the open-source legal stuff.

That was 3 years ago (2018). Since then I have continued to develop T2, added several new features and additional files, and made dozens of changes all through many of the old files.

So as far as I can see it means starting again, going through them all again, and maybe in the process creating T4? That's quite a lot of work, and I can't see me having time to do it over the coming summer months.

If things had been different after the start of T3 we might not be here. But there was so little interest from anyone wanting to actually work with the T3 code that I rather forgot all about it and just carried on with T2 as before.

cheers,

Martin.
 
_______________
message ref: 1556
Hi Martin,

What Graeme and I are looking for is a way to keep T3 moving forward, and matching new features that you continue to develop in T2, *without* requiring significant effort on your part.

The easiest way to do that would be for you to make the unadulterated T2 source (for each release since the T3 split, including the base release) available to a trusted (I know, big ask :) ) person, who can then pull out diffs, and merge those diffs into T3. Note that this is specifically *not* publishing the T2 source. It would remain entirely confidential between yourself and the trusted person.

Asking you to keep preparing "open source" versions of the source as you did for T3 is imposing a huge amount of work on you, and is clearly not a sustainable approach.

If we don't do something about this then T2 and T3 will inevitably diverge.

Cheers,
Alistair.

PS. I have been having a bit of a look at the CPU usage issue. I found your post on the Lazarus forum from several years ago :) I have some ideas for pursuing it, but it's not an easy one... :-(
 
_______________
message ref: 1582
Hi Alistair,

Thanks for your thoughts. It's not often I say no to anyone, but I'm afraid there is no way I'm going to share my private T2 files as-is with anyone. They not only contain 40-years-worth of my accumulated Templot stuff, but also licensed code and keys which were licensed to me on the understanding they are not for publication or transfer to others.

See also para.11 at: https://85a.uk/templot/companion/terms_of_use.php

If stuff can't be posted publicly here on Templot Club, I don't want to know about it. That was the prime reason I made Templot free 10 years ago. The volume of communications from what were then "paying customers" (and therefore couldn't be ignored) just got too much for me and made me ill.

I'm willing to go through the process of cleaning up and publishing my current files for open-source T3/T4 once more. After that if (big IF based on past experience) there is active interest in the actual code (not just endless talk about Gits and Mercury and Tortoises) I would be willing to post the code for each change in T2 as I make it. I intended to do that before, but when the T3 discussion goes silent for months and months on end, there was no incentive to bother. Also I would be posting the files here on Templot Club as ordinary text attachments. Anyone who wants to diff, commit, merge, pull or push them into some other system would have to do that themselves.

Having finally got T2 update 227 released after a long gap caused by the server change and moving to new forum software, I can now draw breath and think about what comes next without any great urgency. So cleaning up and posting my files won't be the burden it would have been a month ago, and I will make a start on that shortly. They will come in dribs and drabs at a speed which will depend on whether it's raining or the sun is shining. :)

I will do a couple of the smaller ones later today, so that you can say yea or nay to proceeding this way.

cheers,

Martin.
 
_______________
message ref: 1584
Hi Martin,

I understand what the cleaned-up files would look like. (Pretty much like T3 originally did, I suppose, but with some improvements.)

What is rather less clear is what the updates will look like when you release them. I can see two options:
  1. Release the whole .pas file again. This appears to imply either:
    • another clean-up exercise (clearly unacceptable) or
    • applying the changes you have made to T2 to the cleaned-up version,
  2. Alternatively would you publish just the diffs?
  3. something else? (OK, perhaps there are more than 2 options :) )
I'm just trying to get a feel for how this will work and what steps we will have to take inT3 after your releases.

Also, rather than go through the whole clean-up exercise again, would it be easier for you to post the updates made since the last time (was it 2.90?). We could easily take those and apply them to the old T3, if that would be easier for you.

Just a thought. Whatever's easiest.

Cheers,

Graeme
 
_______________
message ref: 1590
@graeme

Hi Graeme,

My thought was your option 1.b

Diff the modified T2 against the previous T2, and copy all the changes into my cleaned-up T3 version. You could then diff it against your existing T3 version.

But ideally we wouldn't get to needing that, because as I'm developing some changes I would be posting the code and discussing it as we go along. You would then know what was involved in a given change, and decide whether to adopt it for T3, or not, or do it differently. This is what I meant about active code discussions, and what I envisaged happening when I open-sourced Templot. But we have never got that far.

Of course I don't yet know what the next changes might be, if any. There are lots of ideas in my notebook. One which I'm quite keen to get done is to put a proper knuckle bend radius on the K-crossings. There are implications for the switch tips for moveable K-crossings.

cheers,

Martin.
 
_______________
message ref: 1592
@Alistair Ward @graeme

Hi Alistair, Graeme,

I've posted a couple of my current T2 files at:

https://85a.uk/templot/club/index.php?threads/t4-files.192/

Please let me know if this format is acceptable, and I will do some more.

Note that these are not Lazarus files, they are from Delphi. So they won't work in Lazarus as they stand. But they don't need to work in Lazarus if your intention is only to diff the changes across into the existing T3 files.

cheers,

Martin.
 
_______________
message ref: 1596
Hi Martin,

These are certainly workable. However they do throw up a lot of differences with T3, on which all our work so far has been based.

Between my earlier pdf changes and the more recent changes Alistair and I have made, we have 50+ sets of changes based on 2.94a.

Would it be possible, rather than go through the whole cleanup exercise again, to simply diff your changes and apply them to that version of T3?

Your call, of course, as only you can judge the cleanup effort, but this alternative sounds easier for everyone.

Cheers,

g
 
_______________
message ref: 1598
Would it be possible, rather than go through the whole cleanup exercise again, to simply diff your changes and apply them to that version of T3?

Your call, of course, as only you can judge the cleanup effort, but this alternative sounds easier for everyone.
@graeme

Hi Graeme,

It doesn't sound easier to me!

You asked me to provide my current T2 files. And that's what I have done for the ones I posted last night. The only "cleanup" needed for those was to add the open-source legal stuff. Otherwise those are my current files unchanged.

I've been thinking back to the work I did to get the original T3 files done 3 years ago. It did indeed take me a couple of weeks or more to do. But the greater part of that was to convert them to be usable in Lazarus, so that I could post a project which would compile straight off in Lazarus. The actual cleaning up of the files by deleting all the commented-out stuff didn't take too long, and I'm willing to do that again.

I might even park the old files in an archive and start using the cleaned-up versions for real in T2. It's long-overdue housekeeping. :)

Are you saying that you have got the PDF exports working in T3?

cheers,

Martin.
 
_______________
message ref: 1599
It doesn't sound easier to me!
Well, as I said, you are best placed to decide that. :)

I might even park the old files in an archive and start using the cleaned-up versions for real in T2. It's long-overdue housekeeping. :)
That's better than I dared hope for. I did wonder whether the (at least partly) cleaned up files might be 'nicer' for you to work on going forward. It's great news that you will get some benefit from the exercise.

Are you saying that you have got the PDF exports working in T3?
Hmmmm - I think I would cautiously answer 'partly' to that one.

It is still missing a couple of key items before I would offer it as complete.
  • fonts are sizeable, but typefaces are limited to the 'standard' PDF fonts until I figure out how to embed a font into a PDF file. For me this would not be an issue. Sizing a font, I would require, but being able to specify Verdant Roman Fontface 37 for timber labels or whatever is just not something I care about, though I know some people do
  • I recall something about 'secondary' or 'alternate' colours which I don't think I ever really understood.
  • probably other bits
  • DEFINITELY thorough testing of all the combination of options needed
but basically the core functionality works - i.e. it draws rails - and accurately, and labels all the various bits, so definitely usable for me.

See below for a couple of examples of where I got to. I have no idea what setting produced these, or what aspect I was testing at the time - just a sample from my test output. :)

Cheers,

Graeme
 

Attachments

  • midland_central_2020_08_07_1542_56.png
    midland_central_2020_08_07_1542_56.png
    86.6 KB · Views: 190
  • midland_central_pages_2020_08_13_1022_11.pdf
    300.5 KB · Views: 172
  • midland_central_pages_2020_08_13_1020_46.pdf
    403.9 KB · Views: 192
_______________
message ref: 1605
Just FYI ......

I suddenly remembered as I fell asleep last night that the thing I was going to tackle next for PDF was the various forms of hatching available for sleepers. That DID seem to me to be a must-have before the code could really considered ready for serious use (perhaps the last such item - well, aside from a shedful of testing).

It should not be hard, as the PDF has such in-fill of shapes as a native capability. :)

Graeme
 
_______________
message ref: 1609
... and my next dopey idea in a long (seemingly endless!) series ...

For version numbering T4, how about using the 4xx series, with the xx indicating which version of T2 the code came from.

So for example, the 2.27 version of T2 would give rise to the 4.27 version of T4.

I expect that this will give us a few odd changes to make wherever version testing takes place, but on the plus side, it may help our poor old brains (mine at least) to keep things straight. :)

Cheers,

g
 
_______________
message ref: 1610
For version numbering T4, how about using the 4xx series, with the xx indicating which version of T2 the code came from.

So for example, the 2.27 version of T2 would give rise to the 4.27 version of T4.
@graeme @Alistair Ward

Hi Graeme,

The original plan was for Templot2 to continue with version space up to 2.89

Templot3 preliminary development space 2.90 .. 2.99

Templot3 first full release as a replacement for Templot2 as 3.00

That would be as a fully open-source Lazarus project.

The open-source files I'm posting as Templot4/T4 are for Delphi5, not Lazarus. I called them T4 simply to differentiate them from Templot2 (not open-source) and from T3 (Lazarus).

I didn't give it a lot of thought. It's not too late to change the name on them if you want to keep the Templot4 name for future Lazarus developments.

cheers,

Martin.
 
_______________
message ref: 1612
but basically the core functionality works - i.e. it draws rails - and accurately, and labels all the various bits, so definitely usable for me.
@graeme @Alistair Ward

Hi Graeme,

That PDF is looking good. :)

Is that all done open-source? Have you posted the code anywhere? I see you are posting stuff on Alistair's page at https://github.com/alistair-ward/templot3 , although I find it very difficult to follow what I'm seeing on there. Is the PDF stuff on there?

Should I be linking to there from my SourceForge account? Or closing that down, which I was thinking of doing?

cheers,

Martin.
 
_______________
message ref: 1613
That PDF is looking good. :)
Well it does OK with the 'default' template, but I have no allusions that it will stand up to rigorous use, given the level of testing it has had. :)
As a friend of mine often points out "nothing tests a system like production"

Is that all done open-source?
Yes indeed, as part of T3, though I did not actually intend to release it 'publicly' just yet.

There are actually 2 files:
  • pdf_unit.pas
  • pdf_lib_unit.pas
The first of these is heavily based on the original pdf_unit, and 'knows about' Templot data structures and drawing templates.
The second is a library unit which acts as a wrapper around the pdf library I chose. The idea was to remove any pdf-specific code from pdf_unit, and hide the details of the interface to the specific pdf library used.

It also hides other 'messy' details such as:
  • the fact that pdf.pas has the y-axis reversed (top<->bottom) from the normal pdf file convention. (Actually, I could have told pdf to act the other way up, but chose to keep the PDF files as near 'vanilla' as possible)
  • the fact that windows stores RGB colours as GBR internally, whereas PDF uses RGB. (@Alistair Ward - this sounds like it may have cross-platform implications)
If you wanted to move off the PDF library you are using, which I know is one of the proprietary components of T2, then by all means have a go at rolling this into your current source. I would be very pleased to have some more extensive usage, though I think you can tell from my description, it is far from ready for prime time, but if you think it looks promising, I would be happy to give it more focus.

I see you are posting stuff on Alistair's page at https://github.com/alistair-ward/templot3 , although I find it very difficult to follow what I'm seeing .....
If you look at the top left of that page, you will see "forked from openTemplot/templot3". My own templot3 repo has a similar pointer.

We have set up an organisation on GitHub (called openTemplot) to be the owner of the master repository for this code so it does not belong to any one single person. Then each of us has forked from that master, and we push changes to it when they are ready.

This is what Alistair was referring to when he spoke of protecting the code from 'vandalism'. Anyone can make a fork of the master and change that copy to their heart's content, but in reality neither we nor anyone else can actually 'push' code back to master. We raise what's known as a 'Pull Request' and the changes have to be pulled over from the master side, thus establishing the control.

Should I be linking to there from my SourceForge account? Or closing that down, which I was thinking of doing?
With regard to a link, I think it's a good idea, but maybe not until we have a clearer picture of how we will move from T3-based to T4-based. Perhaps if you could leave it a few days?

With respect to closing it down entirely, I have been pondering this since you posted a similar question a few days ago.

I did wonder whether perhaps that would be a good place to post the T4 code? Or would you prefer to post that only on the Club pages? SourceForge is a handy spot to have all the files grouped together in one place, but is that a useful thing?

Do I sound indecisive enough? o_O :ROFLMAO:

To be honest, I can see benefits for both options, and no strong reason against either. @Alistair Ward, any clearer (or at least more useful) thoughts?

Cheers,

g
 
_______________
message ref: 1614
Do I sound indecisive enough? o_O
@graeme @Alistair Ward

Hi Graeme,

I'm as fuzzy-headed about all this as you are indecisive. :)

I don't think there is likely to be anyone else wanting to develop Templot in Delphi5 or Delphi7. It's not compatible as it stands with modern versions of Delphi. My only reason for posting my Templot2 files as open-source is so that you can rob them of code for use in Templot3, as you wanted.

Given that they would if compiled form a lesser version of Templot2 with bits missing, I have decided to rename them Templot1 (T1). There never was a Templot1, we went straight from TemplotZero to Templot2.

This leaves you or anyone else free to develop new versions of Templot from 3 to 99 or whatever.

I have renamed the topic T1 files, and updated the attached files.

My preference would be to post files and discuss them here on Templot Club. That gives Templot users a chance to follow the action and join in with useful ideas, even if they can't do the coding stuff.

The main point of the SourceForge account was so that a Templot download remains available if I get run over by a bus and stop paying for the Templot Club hosting. That's still a valid point, although it's going to get confusing if the actual development is elsewhere from SourceForge on your Git pages.

cheers,

Martin.
 
_______________
message ref: 1615
If you wanted to move off the PDF library you are using, which I know is one of the proprietary components of T2, then by all means have a go at rolling this into your current source.
@graeme

The main reason for including a native PDF export in Templot (instead of simply using one of the many virtual printers), is that users can set a large PDF page size, several metres long and a metre or so wide. For wide-format printing of track plans on roll paper. Is your PDF library able to do that -- I'm a bit puzzled by your saying the Y-dimension is reversed, the TCanvas origin is always top-left?

cheers,

Martin.
 
_______________
message ref: 1616
Hi, Martin and Graeme,

The ability to get large prints is definitely a big plus having recently had a 5M x 3.5M print done in 4 rows. I don't have a clue about the rest of the thread content, but I follow it incase I can learn something.
 
_______________
message ref: 1619
@graeme

Hi Martin and Graeme,

I've been fairly quiet on this so far :) (it wasn't a great weekend here - massive rainfall, flooding etc, topped off with a nasty cold and a couple of days off work)

Martin, I'm really pleased to see the "T1" files appearing. I hope that you are actually able to keep using these as your base for ongoing development, as it will make things much easier to merge changes.

Graeme, I would suggest creating a separate repo under the openTemplot organisation (called templot1 perhaps?), and committing the files from Martin as he releases them. Make sure there is a suitable warning that this is not intended to be a compilable/usable project!

It will then be up to us to scan through those files for relevant changes to merge into t3. In the future, if Martin bases ongoing development on those files, then we will easily be able to get diffs for new work.

In the meantime, I started pulling on a thread... I was looking at pulling stuff out of pad_unit, so I could try to reduce the cross-unit dependencies. I am now in the process of reworking the dummy vehicle code, pulling it out into a separate, unit-testable class. (or as Capt. Oates said, "I'm just going outside and I may be some time...").

Cheers,
Alistair.
 
_______________
message ref: 1624
Given that they would if compiled form a lesser version of Templot2 with bits missing, I have decided to rename them Templot1 (T1).
That sounds like a great idea, and is a much better reflection of where they stand in the scheme of things (logically, if not chronologically).

My preference would be to post files and discuss them here on Templot Club. That gives Templot users a chance to follow the action and join in with useful ideas, even if they can't do the coding stuff.
This sounds good too.

The main point of the SourceForge account was so that a Templot download remains available if I get run over by a bus and stop paying for the Templot Club hosting.
This rationale has now taken something of a back seat as we now have several people with copies of the source and a home on Github (where I will open a repo for T1).

I agree that it could be a bit confusing, and feel more confident to suggest that perhaps Sourceforge is not needed now.

Cheers,

Graeme
 
_______________
message ref: 1625
The main reason for including a native PDF export in Templot (instead of simply using one of the many virtual printers), is that users can set a large PDF page size, several metres long and a metre or so wide. For wide-format printing of track plans on roll paper. Is your PDF library able to do that
Yes indeed - although I just did a quick test and it seems I may have some issues to address in my code. :oops:

-- I'm a bit puzzled by your saying the Y-dimension is reversed, the TCanvas origin is always top-left?
Absolutely ... BUT ... PDF files natively have the origin at the bottom left.

I origin(no pun intended)ally decided to go with the native PDF style (i.e. bottom left) but have now decided it was a bad choice. I will be amending the code accordingly. It created more work for no real benefit.

Cheers,

g
 
_______________
message ref: 1626
topped off with a nasty cold and a couple of days off work)
Doesn't sound good! I hope you are on the mend soon.

Graeme, I would suggest creating a separate repo .....
hahahaha - in hand as we speak

In the meantime, I started pulling on a thread... I was looking at pulling stuff out of pad_unit, so I could try to reduce the cross-unit dependencies. I am now in the process of reworking the dummy vehicle code, pulling it out into a separate, unit-testable class. (or as Capt. Oates said, "I'm just going outside and I may be some time...").
This kind of thing normally leaves me with no jumper and a pile of wool next to me. Good luck!
 
_______________
message ref: 1627
Absolutely ... BUT ... PDF files natively have the origin at the bottom left.

I origin(no pun intended)ally decided to go with the native PDF style (i.e. bottom left) but have now decided it was a bad choice. I will be amending the code accordingly. It created more work for no real benefit.

Sorry, Martin, but I just realised that I missed out half of the explanation here! :/

I am not using a TCanvas. I am making my own calls on the PDF library to do the actual drawing directly, rather than drawing on a TCanvas then asking for that to be translated into a PDF for me.

Hence, it matters to me that the PDF origin is at a different place from the TCanvas origin, and it is that 'caring' that is hidden away in my pdf_lib_unit.

I hope that's a bit clearer.

Cheers,

g
 
_______________
message ref: 1628
Back
Top