Hi,
Is there any way in Rhino common to access the new Thickness settings found on some objects such as surfaces? As Shown below…
cheers!
Hi,
Is there any way in Rhino common to access the new Thickness settings found on some objects such as surfaces? As Shown below…
cheers!
Hi @jeremy.graham86,
These data is provided by the RDK (Render Development Kit).
@Andy, can this be access via RhinoCommon?
– Dale
Thanks @dale!
@andy any help would be appreciated. Can I access this data via a standard C# plugin?
Jeremy.
following, would the RDK help me solve the issue of accessing a mesh for edge count which is stuck internally right now @dale
Hi @jeremy.graham86,
It turns out you can access RDK thickness values using RhinoObject.GetCustomRenderMeshParameter and RhinoObject.SetCustomRenderMeshParameter methods.
For the providerId
parameter, specify the Rhino.Render.CustomRenderMeshProvider.ThickeningId
id.
The applicable parameter names and data types for thickening are:
"on", bool
"distance", double
"solid", bool
"both-sides", bool
"offset-only", bool
For example, to determine of thickening is enabled on an object, you can do this:
var providerId = Rhino.Render.CustomRenderMeshProvider.ThickeningId;
var value = obj.GetCustomRenderMeshParameter(providerId, "On");
var enabled = System.Convert.ToBoolean(value);
Does this help?
– Dale
Sorry, no.
– Dale
That is perfect! Thank you Dale!
Thought I looked everywhere for those methods but obviously not! Thanks again
Hi,
I’m sorry for bumping this since it’s already answered
Though I’m wondering if there is a way to find the custom render mesh parameter names for all these settings (like displacement, edge softening, custom mesh modifier …)
Thanks
Alexandre Beaudet
Hi Dale,
In Rhino 7, this piece of code can yield the correct results, but when using this code in Rhino 8, the variable “value” is returning a null value. Has the usage method in Rhino 8 changed?
-Jorin
Hi @JorinChi,
Can you share some simple code, that we can run here, that doesn’t work the way you expect?
– Dale
Hi Dale,
Here is the code:
ObjRef objRef;
RhinoGet.GetOneObject("Select a surface", false, ObjectType.Surface, out objRef);
if (objRef is null)
{
return Result.Success;
}
var providerId = Rhino.Render.CustomRenderMeshProvider.ThickeningId;
// The "value" variable gets null in Rhino 8, it gets true or false in Rhino 7.
var value = objRef.Object().GetCustomRenderMeshParameter(providerId, "On");
// The "enabled" variable is always false.
var enabled = System.Convert.ToBoolean(value);
RhinoApp.WriteLine("Result:{0}", enabled);
return Result.Success;
I tested it in Rhino8 Beta (8.0.23262.17303, 2023-09-19)
Best,
-Jorin
Hi @JorinChi,
I can repeat the issue - thank you for the code sample.
I’ve logged the issue.
https://mcneel.myjetbrains.com/youtrack/issue/RH-77191
– Dale
Hi @Alexandre_Beaudet, (@dale)
Did you ever figure this out? I’m looking for the parameter names for the displacement.