Trouble with dashed lines

once in a while I get a situation where I have no clue what is leading up to what I see on screen:

why do these dash differently?? looks kinda bad when trying to draw stairs. :wink:

image

1

lines.3dm (226.1 KB)

curve

ID: 61994705-9d86-43a8-b816-3e101b70149b (3)
Object name: (not named)
Layer name: C-------------------------------2D::Darüber
Render Material:
source = from obj
index = -1
Groups:
Group5026
Group5014
Group5036
Attribute UserData:
UserData ID: CE28DE29-F4C5-4faa-A50A-C3A6849B6329
Plug-in: 17b3ecda-17ba-4e45-9e67-a2b8d9be520d
description: User text (0 entries)
saved in file: yes
copy count: 168

Geometry:
Valid curve.
Open NURBS curve
start = (-397.76,530.94,228.10)
end = (-395.77,530.81,228.10)
degree = 1
control points: non-rational, count=2
knots: uniform (delta=1.00), domain = 0.00 to 1.00
clamped at start and end

2

curve

ID: 6595e974-a9f2-4f94-8d7e-e7ea9aa1061c (2)
Object name: (not named)
Layer name: C-------------------------------2D::Darüber
Render Material:
source = from obj
index = -1
Groups:
Group5029
Group5014
Group5036
Attribute UserData:
UserData ID: CE28DE29-F4C5-4faa-A50A-C3A6849B6329
Plug-in: 17b3ecda-17ba-4e45-9e67-a2b8d9be520d
description: User text (0 entries)
saved in file: yes
copy count: 168

Geometry:
Valid curve.
Open NURBS curve
start = (-397.75,531.24,228.10)
end = (-395.75,531.11,228.10)
degree = 1
control points: non-rational, count=2
knots: uniform (delta=1.00), domain = 0.00 to 1.00
clamped at start and end

Hello - I see… I don’t know what’s up. I’ll get this on the pile for the developer. Hmmm - the curves are microscopically different in length - one very slightly more than 2 in length and one very slightly less - I mean very slightly,

  line length = 1.9999999999999629
  line length = 2.0000000000000053

but that seems to be the difference - if I force them to both be over or under 2, they match. (Curves simplified to lines and testNumberFormat set to ‘accurate’ then the What command)

We could do some rounding… https://mcneel.myjetbrains.com/youtrack/issue/RH-45994

-Pascal

thanks for the testing.

FYI, they are coming from make 2d.

I’d have guessed that the dash pattern should somehow be related with the curve startpoint.
But that does not seem to be the case.

Just wondering how is this being handled in respect to local curve coordinates vs. model space?

The linetype patterns are calculated in world units.
It does look like in this case, the difference in curve length is just enough to make the difference in display.

I can confirm this - as I needed to create a script in V5 to replace the defunct “ExplodeLinetype” bonus tool for V4, I looked into how Rhino calculates dashed lines. The rule is the beginning and ending dashes can never be less than exactly half the length of the standard dash. If they become less than half, the distribution on the curve is recalculated and longer dashes are put at the start/end.

This switch happens at an exact moment, out to as many decimal places as can be calculated. So the reported situation will be absolutely typical, if the switch falls at 2.0000000000000…

–Mitch