Could not convert BREP - Freeform element Revit

Hi I am trying to stream some freeform elements from GH to Revit and the Revit connectors gives me the following warnings:

Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
at Objects.Converter.Revit.ConverterRevit.FreeformElementToNative(FreeformElement freeformElement)
at Speckle.ConnectorRevit.UI.ConnectorBindingsRevit.ConvertReceivedObjects(List`1 objects, ISpeckleConverter converter, StreamState state) in C:\Users\circleci\project\ConnectorRevit\ConnectorRevit\UI\ConnectorBindingsRevit.Receive.cs:line 195
Could not convert BREP 47cfd77b049e967de5c59c96a9361d46 to native, falling back to mesh representation.
TessellatedShapeBuilder failed to build the requested geometry.
at Autodesk.Revit.DB.TessellatedShapeBuilder.Build()
at Objects.Converter.Revit.ConverterRevit.MeshToNative(Mesh mesh, TessellatedShapeBuilderTarget target, TessellatedShapeBuilderFallback fallback)

Could not convert BREP 7be95672d928b75ab78447a0054f9892 to native, falling back to mesh representation.
Could not convert BREP b01c3be6712b8de2689ecd8014fb1fe6 to native, falling back to mesh representation.
Could not convert BREP ec2bc7ab0b1330cb23bd97bf35582dab to native, falling back to mesh representation.
Could not convert BREP 4cd33a534042965c22b0e796c9256355 to native, falling back to mesh representation.
Could not convert BREP d94bab6d8b66311408ce50fb686d9b41 to native, falling back to mesh representation.
Could not convert BREP b1841a4ab07066d21186e4f6d857a813 to native, falling back to mesh representation.
Could not convert BREP 73cccd9866175726777cb136b1a39907 to native, falling back to mesh representation.
Could not convert BREP a101ae87e913f1c5f2c4ae92f2242863 to native, falling back to mesh representation.
Could not convert BREP 5f847541d7d53883db797f4a358dd669 to native, falling back to mesh representation.
Could not convert BREP 822328fa085ce4cc3441de1eaa39ce91 to native, falling back to mesh representation.
Could not convert BREP a433d2ce752908f335cd9f236cda7610 to native, falling back to mesh representation.
Could not convert BREP 9227f1644cbddd73ac369e9dc008bc26 to native, falling back to mesh representation.
Could not convert BREP c5e1d0338e077dd3e89c3e5d1b9fed3f to native, falling back to mesh representation.
Could not convert BREP 7179f69704fbde451d904144be132e3b to native, falling back to mesh representation.
Could not convert BREP a711ec8588283164896c3833b4adcef8 to native, falling back to mesh representation.
Could not convert BREP 76933f59c4b1ac8033f0dab424e65b20 to native, falling back to mesh representation.
Could not convert BREP 3ea7276957f247429dec577881a9b68f to native, falling back to mesh representation.
Could not convert BREP 2528a3e9ac1b7b9e1413d22777a49819 to native, falling back to mesh representation.
Could not convert BREP 0b0a233a0f9a93c401d5128516d5683b to native, falling back to mesh representation.
Could not convert BREP 71be4c81fca670ef4e6e97a5bf42f890 to native, falling back to mesh representation.
Could not convert BREP 71906ae16f5eb635497a95907b1e5bc5 to native, falling back to mesh representation.
Could not convert BREP 2abbcc4f20cefefd529a1f2770499e05 to native, falling back to mesh representation.
Could not convert BREP 36a18edff807c8642679114e2d10d523 to native, falling back to mesh representation.
Could not convert BREP 974a52f0d31e25c5601952624710dcea to native, falling back to mesh representation.
Could not convert BREP 24fcbdba0da2d2ec5b74485e6ee2776d to native, falling back to mesh representation.
Could not convert BREP f8cce5ecb5914b0e2bade7670bd7c1b0 to native, falling back to mesh representation.
Could not convert BREP 593825c61e99a8bae0ccd3890efc06ef to native, falling back to mesh representation.
Could not convert BREP 0bc4dc4e556bd2d28b9b04d22fa01687 to native, falling back to mesh representation.
Could not convert BREP ec8f749c72aa22e3111ee3419e3f6d70 to native, falling back to mesh representation.
Could not convert BREP e839387a094cd760f168d9acef05d57a to native, falling back to mesh representation.
Could not convert BREP 888ff7c94f0e8972c6f92c6e7ca5110b to native, falling back to mesh representation.
Could not convert BREP 992be21d64c49f87866ea661f5562e6f to native, falling back to mesh representation.
Could not convert BREP f72572e29cf390cd62da395a520b2579 to native, falling back to mesh representation.
Could not convert BREP bb84f9b4c9be66cbd651d01b9af76824 to native, falling back to mesh representation.
Could not convert BREP f88d583c8350f498a40ed381cdae12c6 to native, falling back to mesh representation.
Could not convert BREP ba91e4e5145b4d4e140af433ff102a4e to native, falling back to mesh representation.

The link to the stream (Representation online looks fine):

When I push the same geometry to Revit with Rhino Inside it works flawless…

Does anyone have a clue what is the problem?

Hey @Joelmick!

Thanks for reporting this :slight_smile: we’ve actually been trying to find a solution for this issue today. We’re not fully sure about why is this happening, but essentially there’s a problem with the TesselatedShapeBuilder class in Revit when it’s being used inside a Family Document.

What’s happening in your case is that the Breps you are sending are failing (maybe for another reason?), so their displayMesh is used instead. Since freeform elements are in itself a family, we then bump into the TesselatedShapeBuilder problem.

We’ve been tracking it here: Revit: issue with displaymesh conversions inside generic family document · Issue #608 · specklesystems/speckle-sharp · GitHub

Thanks for the stream! I’ll do some tests on it to see why the Breps are failing. As for the mesh problem, we’re all pretty much out of ideas on what could be going on here, so it may take a minute for us to fix it. :pray:t3:

1 Like

As a temporary workaround @Joelmick you should be able to send them as DirectShape. It’ll be faster (as we don’t need to create a new family in the background) but they will not be editable.

1 Like

Okay, I thought so. For now we do these things with Rhino.Inside, mostly because of the missing subcategories and not being able to send more then 1 shape in 1 family, but the direct shape could be a short term solution if we want to do this purely speckle based.

Thanks for looking into this. If I can do anything, let me know

When you say missing subcategories, are you referring to the list of categories that show up when making a DirectShape?

No I means the actual Subcategories within a Category.

When we create families, e.g. a Beam (Structural Framing), we add a Subcategory per Material

So Steel or Concrete. This way, all the Families with Subcategory Steel or Concrete have the same material, which interms gives the same hatches and patterns in section views.

Gotcha! We can look into adding the subcategory as well as an input, it will probably just be a string value. Would that work for you?

1 Like

That would be perfect, but keep in mind that the subcategory is not always already in the Freeform template so the speckle kit should create a subcategory for that category in the fly if it doesnt exist.

2 Likes

@Joelmick it took us a while, but we’ve added this feature!

You can now set a subcategory from GH, and if doesn’t exist it will be created. The category instead always default to “Generic Models” for Free Form Elements.
This update will be included in the next release.

1 Like