Extract surface thickness with python Script


I tried to search the info but I only found it for grasshopper and C# script.
Is it possible to get with a python script the thickness set on a surface.

With C# it seems to be Rhino.Render.CustomRenderMeshProvider.ThickeningId but it does not seems to work with Python.

Do you have an idea ? The goal is to extract this parameter to put a text below the surface with the thikcness using a srcipt like AddNameLayerGroupObj_Ex_V1.py (found in this forum)
AddNameLayerGroupObj_Ex_V1.py (987 Bytes)

Hi Simon
You can take a look at surface-thickness-settings.

python code:


import Rhino.Render.CustomRenderMeshProvider as rrc
import scriptcontext as sc
import rhinoscriptsyntax as rs
import System.Convert as s

guid = rs.GetObject("Pick  a surface.")
obj = sc.doc.ActiveDoc.Objects.FindId(guid)

providerId = rrc.ThickeningId
value = obj.GetCustomRenderMeshParameter(providerId, "Distance")
distance = s.ToDouble(value)

print distance

Hi Naruto,
This is perfect, thank you.
Do you know out to set the mesh paramater ? I tried SetCustomRenderMeshParameter but did not figured out how it works. I also didn’t found on the internet.

Sorry Sorry, did not look properly at the link you provided… My bad