DisplayPipeline.DrawPoint bug (R8)

Hi @stevebaer, @jeff,

there seems to be a bug in the DrawPoint method using Rhino 8.

I am using the method in a OnDynamicDisplay of a GetPoint class which i override, to draw a transparent circle at the mouse cursor.

Here is how it used to look in Rhino 6 and 7. You see a transparent filled circle with red outline which is drawn over a black diagonal line. The line is also drawn in the OnDynamicDisplay method:

DrawPointBug_Rhino7

If i do this in Rhino 8, the black diagonal line is not drawn properly when the cursor is moved over the line, also the red outline of the circle is not drawn with it’s 2 thick pixel width, it’s only barely visible:

DrawPointBug_Rhino8

To reproduce it, see attached example script, please run in Rhino 7 and 8 for comparison:

DrawPointBug.py (1.3 KB)

If you change the strokeWidth to 20 in above script, you can see that it has no effect in Rhino 8 while it works in Rhino 7. You can also reproduce the transparency bug by using the simpler version of DrawPoint in Rhino 8 which has less overloads:

c = Color.FromArgb(50, Color.White)
e.Display.DrawPoint(e.CurrentPoint, Rhino.Display.PointStyle.Circle, 40, c)

can this be fixed please ?

thanks,
c.

Hi @clement,

I’ve logged the issue - thanks.

https://mcneel.myjetbrains.com/youtrack/issue/RH-79853

– Dale

1 Like

Hi @jeff, above issue also happens on Mac M1 using Rhino 8.3.

thanks,
c.

@clement I do see the transparency issue here, but I’m not seeing the circle thickness issue… It shows up as 2 pixels here, and if/when I change the strokeWidth to 5, I get 5 pixel width… so that seems to be working (at least with the latest inhouse 8.5 build).

I’ll look into the transparency issue, but if I can’t reproduce the thickness issue, I’m not sure what I can do about it…but I’ll keep digging.

Thanks,
-Jeff

This video shows it going from 2 pixels to 5 pixels to 15 pixels and then back to 2 pixels.

I’ve edited out the frames in between setting strokeWidth to reduce file size.

-J

Hi @jeff, thanks for testing.

I am using (8.4.24016.19001, 2024-01-16) and see no effect changing strokeWidth:

StrokeWidth

maybe it fixed itself with the inhouse build 8.5 ?

_
c.

I doubt it…what’s more likely is that you have a setting somewhere that’s causing line thicknesses to change mid-command, and they’re not getting restored prior to flushing the wire cache…which ends up drawing your wires at whatever thickness was set just before the flush… That’s just a WAG, but more plausible.

You can try 8.5 and see if it’s fixed…that would save me/us a lot of time trying to dig into it…but if 8.5 still shows this for you, then we need to dig into all the other scenarios my first paragraph eludes to.

Thanks,
-Jeff

What happens if you run the script using RunPythonScript instead of running it from the ScriptEditor?

-J

Hi @jeff, i’ve tried to rule that out and can say that in the display mode i’m testing in (shaded) the curve scale is set at default:

OK, i’ll just wait until i can access it.

makes no difference, either on Windows or Mac.

_
c.

I PM’d you.

-J

@clement Just letting you know I’m still here… But got pulled away from this. I will get back to this probably tomorrow or Friday.

Thanks,
-Jeff

1 Like