Is it possible to bake rhino Geometry from GH with the "thickness" object property already set?

Hi all,

When I model facades, the files can become quite large and i’m curious if you could bake single surfaces out of GH with the thickness object property pre-applied. In the case of mullions, I can model them as single surfaces and use the thickness object property to apply width without having to create a polysurface. Is this something that can be set up ahead of time in GH so they bake with the properties already configured? Could this be done with curve piping object property with curves as well?

-P

Thanks

Hi Vanhage,

it seems like “Rhino.DocObjects.RhinoObject.Attributes” contains the Thickness flag and infos, but I wasn’t able to isolate it.
This small script takes the whole “.Attributes” from a referenced geometry, and bake a new geometry using it (giving it the same color, layer, etc, etc, and thickness flag).
So, set as reference a geometry with thickness flag (you can’t internalize it).

Give it a try.

Bake.gh (32.4 KB)

See the following:

– Dale

1 Like

Thank you, @dale!

Bake_with_thickness.gh (45.6 KB)

It tells me “Warning (CS0612): ‘Rhino.Render.CustomRenderMeshProvider’ is obsolete.” … but it works anyway.

Click to expand code
private void RunScript(GeometryBase tobake, bool thickness_on, double distance, bool offset_only, bool solid, bool both_sides, bool bake)
      {
        if(bake){
          // Adding geometry to rhino file (baking)
          this.RhinoDocument.Objects.Add(tobake);

          // Finding the just-made object and applying wanted thickness parameters
          Rhino.DocObjects.RhinoObject obj = this.RhinoDocument.Objects.MostRecentObject();
          obj.SetCustomRenderMeshParameter(Rhino.Render.CustomRenderMeshProvider.ThickeningId, "on", thickness_on);
          obj.SetCustomRenderMeshParameter(Rhino.Render.CustomRenderMeshProvider.ThickeningId, "distance", distance);
          obj.SetCustomRenderMeshParameter(Rhino.Render.CustomRenderMeshProvider.ThickeningId, "solid", solid);
          obj.SetCustomRenderMeshParameter(Rhino.Render.CustomRenderMeshProvider.ThickeningId, "both-sides", both_sides);
          obj.SetCustomRenderMeshParameter(Rhino.Render.CustomRenderMeshProvider.ThickeningId, "offset-only", offset_only);
        }
      }

@maje90,

This is great thanks for sharing!

@dale,

do you know what the parameter names would be for piping of curves? I’m having trouble with checkbox for “faceted”, any thoughts?

Thanks!