Page 1 of 1

Inconsistent positioning of drawn objects v track

Posted: Fri 1. May 2020, 22:43
by SimonB
In order to determine the minimum track separation for my layout, I have drawn a rectangle that is 40mm high x 50mm wide (40mm being the width across the cylinders of my widest loco, a Tri-ang Albert Hall 1960s vintage).

I'd intended placing this over some horizontally-placed track (Peco Code 100) to check whether or not two copies of this loco could pass each other safely on a straight double track section.

However, a drawn rectangle always has at least a border line width '1' around it, and when positioned at (say) x,y coords of 100,100 then it's the top left corner of the *stroked* rectangle that gets put at that position. This puts the bottom right corner of the 40x50 stroked rectangle at 151,141.

Track, however - when the full trackbed is filled (30mm wide in the case of Peco Code 100) - is drawn so that it's the ___centre___ (not the top) of the upper stroke that is placed at a specific "y" position.

This leads to a misleading 0.5mm y offset (and x offset, but that's less important in this instance) between a positioned track and a positioned drawn rectangle that share the same y coordinates.

The attached image shows an example of what I mean. The green track is a section of SL-100 positioned at 50,100. The red-stroked black 40x50 rectangle is positioned at 100,100.

Screen Shot 2020-05-01 at 23.39.44.png
Positioning discrepancy illustration
Screen Shot 2020-05-01 at 23.39.44.png (314.49 KiB) Viewed 487 times

It would be incredibly useful if it were possible for there to be a 'zero width' stroke for drawn shapes, so that a 40x50 rectangle positioned at 100,100 would have its top left corner at 100,100 and its bottom right corner at 150,140