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.

4 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