As of now justification for digitals in 3Dcabs is not managed. All digitals are left aligned, independently from the value of the Justification() parameter in the .cvf file.
I have created a patch which introduces this feature, which is present in 2D cabs.
To avoid changes in behaviour of existing 3D cabs, I am using for alignment in 3D cabs three additional values for Justification (at the moment values from 1 to 3 are used), that is 4 for center, 5 for left and 6 for right alignment. These values are considered only for 3D cabs.
In the existing code the digits are aligned just at the left of the x value of the related matrix in the .s file. The maximum number of digits allowed is 6.
To avoid bigger changes in the code, in the patch in case of right alignment a suitable number of blanks is added in front of the digital string, e.g. if there is one digit 5 blanks are added, if there are two 4 blanks are added and so on.
In case of center alignment the same procedure is used, although of course less blanks are required.
Blueprint: https://blueprints.l...nment-in-3dcabs
A PR to the master branch has been generated. Unfortunately the code bot hasn't generated an Unstable Release and exited with this error, seen in page https://james-ross.co.uk/projects/or .
Open Rails Code Bot started at 2021-09-13 09:21:09Z
GitHub organisation:
GitHub team:
GitHub repository:
GitHub base branch:
GitHub merge branch:
Unhandled exception. System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.)
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Open_Rails_Code_Bot.GitHub.Query.GetTeamMembers(String organization, String team) in C:\Jenkins\jobs\Open Rails Code Bot\workspace\GitHub\Query.cs:line 54
at Open_Rails_Code_Bot.Program.AsyncMain(IConfigurationRoot config) in C:\Jenkins\jobs\Open Rails Code Bot\workspace\Program.cs:line 53
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Open_Rails_Code_Bot.Program.Main(String[] args) in C:\Jenkins\jobs\Open Rails Code Bot\workspace\Program.cs:line 31
Page 1 of 1
Justification (Alignment) for digitals in 3Dcabs
#2
Posted 13 September 2021 - 03:42 AM
Thank you for doing this Carlo. This is a welcome and appreciated change.
Cheers,
Marek.
Cheers,
Marek.
#4
Posted 13 September 2021 - 09:05 AM
Thank you! The feature is now available in OR NewYear MG rev 104.2.
Page 1 of 1