Z-Fighting control via Thickness

@Gijs Thanks! that pointed me into the right direction. For anyone who is wondering. I am now doing this:

            var providerId = Rhino.Render.CustomRenderMeshProvider.ThickeningId;

            var value = rhObj.GetCustomRenderMeshParameter(providerId, "On");
            var enabled = Convert.ToBoolean(value);

            rhObj.SetCustomRenderMeshParameter(providerId, "On", true);

            rhObj.SetCustomRenderMeshParameter(providerId, "distance", 0.001);
            rhObj.SetCustomRenderMeshParameter(providerId, "both-sides", true);

            rhObj.CommitChanges();

FYI: The settings have certain keys, hence have a look at the previous post of documentations as they are not the same as the display name given in Rhino Thickmess is “distance” for example.

@Gijs I am getting a warning for ‘CustomRenderMeshProvider’ is obsolete which I also can seem to surpress. Any ideas? I tested in both Rhino7 and 8 and it works.