OK, I see something… it looks to be a mm-inch thing, thus the scale is off by a factor of 25.4. If I look at the linetype dialog in doc properties, inches is checked and the pattern definition is .1969, .1969. If I change it to mm, I get 5, 5.
The problem is, despite the fact that the file is in inches, when I read the linetype pattern from the file via RhinoCommon, I get the values in mm. @stevebaer This appears to be a bug in RhinoCommon… Run the following on your file above:
import rhinoscriptsyntax as rs
import scriptcontext as sc
for lt in lts:
#get pattern data
for i in range(lt.SegmentCount):
You will get 5,5 despite the fact that the file units are in inches.
As a workaround, I can check the current file units and scale between mm and whatever the file units are in. I’ll look at implementing that tomorrow… But this is not ideal, hopefully it can be fixed so it’s not necessary.
As everyone here works in mm, I never picked this up, thanks. It looks like files in cm and meters have the same problem… Worse, it looks like if you change the unit system on the file without scaling, the linetype does not follow suit and everything gets completely messed up. So it’s not only a RhinoCommon problem, it looks to be a Rhino problem. So now, at this point, I’m not sure what can be done to guarantee it working.