Problems with materials in Direct Shape


I have a script in Grasshopper that converts Rhino Geometry (Breps) to Direct Shapes in Revit, assigning a Revit existing material to the direct shapes.

The issue I am having is that, when the shapes are a bit complex, the material doesnt show properly in “hidden line” view in Revit, it looks ok in “shaded” view. I don’t know if it is a Revit problem or a Grasshopper problem.

If I get the complex shape and divide it into smaller shapes, then the material shows properly, as you can see in the attached image: the larger shape doesn’t display the material but the others do.

Any ideas?

Hi Ismael, Hard to say from the image, can you provide additional information about your environment and issue? Thanks!

Hi Japhy,

It looks like the problem comes from the geometry. Short edges most likely?

In some cases, that component is orange, only giving the first warning about short edges, and it works as expected.

Moving geometry into Revit is always going to be subject to Revit’s tolerances.

The Add DirectShape will try and send the geometry in as is but has several methods of clean up if the initial try fails. The last resort being the .Sat import.

The Add DirectShape will highlight the errors in your Rhino preview, to see these you might need to only input the problem geometry into the Add DirectShape component and adjust your Rhino Viewport and preview settings to see the orange highlighted errors.

1 Like

Thanks Japhy. I will try to visualize where the error is coming from to model the geometry properly for Revit to accept it with no issues.

Actually, the issue is not solved.

I managed to convert the geometry to a mesh that doesnt cause the issue of the little edges.

But now I realize that if you feed a MESH into the ADD DIRECT COMPONENT, the material doesnt show properly in HIDDEN LINE view. It does look ok in SHADED view. If I add the same geometry as BREP it shows fine.

Is that a bug?

The material is applied, what you are seeing in Hidden Line is the Foreground Surface pattern.

The issue you are running into is a Revit limitation, for example you can go into the Revit UI>Modify Tab and Paint a face on the brep, the mesh is not a valid face for this command/feature in a project.

I see.

What do you recommend to generate breps or surfaces with curved geometry, to avoid the little edges issue when passing the geometry into Revit with ADD DIRECT SHAPE?

I cannot control that process if I cannot feed a Mesh. Brep Geometry with 100% straight edges?

Its hard to avoid those little edges, especially when doing boolean operations, try this definition Kike made to help identify the areas while you work.

1 Like