Revit Direct shape creation and materials

Hi,
I just tried Rhino inside (Revit) and really like the opportunities this offers! Great work!

As a trial project I tried to import a number of bricks with different materials forming a pattern and noticed that the current Rhino inside source code of the Revit.Bake command uses this Revit API call:

public static DirectShape CreateElement(
	Document document,
	ElementId categoryId,
	string appGUID,
	string appDataGUID
)

This applies the material used as default for the category to the direct shape. Unfortunately this method only allows top level categories ( and not even all of those thanks to some Revit limitations).

Will there be an implementation of the Revit.Bake command which uses the TesselatedShapeBuilder class instead here.)?

Benefit is that a material can be assigned to the face of each direct shape independent of the category chosen.

( My very basic trial node is attached…Note that it includes some error reporting…)

Thank you!

Jan
CreateTessalatedRevitShapes_V2.gh (9.7 KB)

Hi,

Nice script, thanks for sharing it.

We are currently using BRepBuilder that generates Breps in Revit and TessellatedShapeBuilder when transfering meshes.
I’ve not tested it well, but looks like BRepBuilder also allows to set material per face using this BrepBuilder.SetFaceMaterialId.

Are you most interested into having meshes in Revit or into having materials per face?

Hi Kike,

Sorry for the rather late reply…Personal preference is to be able to assign materials to direct shapes independent of their Revit category.

Some background: we fairly regular are using Rhino to model building facades at the early stage of a project, since Revit can be quite clunky to go through a large number of options…
I addition: most of the projects I am working on are very rectilinear so breps are just fine.

Thanks for pointing out the BRepBuilder class…I will see whether I can update my script and see how it works.

Jan

Hi,

Now is possible.

5 Likes

Hi Kike,

That’s awesome! I better go ahead and and pull the latest Rhino In Revit from the repo and rebuild it!

Thank you!

Jan

Thanks for the update! it works great.
Btw, I couldn’t find the “filter mask component”, which component is it?

Hi,

Is in the Params>Input panel because it also works with strings, points and referenced geometry from the Rhino model.

Another way to found it is doing right click in an output param, on a inside Revit component, and look for the ‘Connect’ menu. Here the software suggest you other compatible components that accept this kind of param.

4 Likes

Hi!
{corrected}
This is helpful but material can not be assigned from revit properties menu to an imported direct shape element.
I have tried before with Rhynamo and I was able to import Rhino file geometry into dynamo and then through some operations I was able to create a family that could be later edited (stretched, moved, dependent on how it was created etc. also changing material was possible).
Is there any workaround to be able to create similar results with GH and save (bake) it into live revit model?
{corrected}

Thanks!

RHYNAMO.zip (395.1 KB)

It seams you are looking for this

Thank you I will check it out.