Not receiving Breps from Revit

Hi @teocomi

As I understood from your post, it is possible to send Revit geometries as Breps using the Revit converter. I am currently using the Api within SpeckleCore2.dll and the Revit Converter kit to send over some geometries using a custom plugin. However, I receive a Speckle.Geometry.Mesh on the other end:

I am currently using a reference to [this post](https://speckle.community/t/how-to-run-revit-to-speckle-conversions-in-c/1548/3 to do the conversion:

var kit = KitManager.GetDefaultKit();
var converter = kit.LoadConverter(ConnectorRevitUtils.RevitAppName);
converter.SetContextDocument(CurrentDoc.Document);
var conversionResult = converter.ConvertToSpeckle(revitElement);

Do I need to include any additional information, or use another method to receive Breps from Revit on the server?

Hey @janx,

I might not have expressed myself correctly: it’s possible to receive Breps in Revit, but when sending the connector only grabs the mesh representation of Revit elements. So, what you’re doing is all correct!

Getting Breps from Revit should be possible by parsing their Solid class and derivates but it’s not a trivial task.

Why do you need the breps instead of meshes?

1 Like

@teocomi I might have mentioned it before somewhere, that for fabrication purposes we need to transport complex breps Rhino <> Revit with precision. The processing of such geometries from Revit in Rhino/GH currently take breps as an input along with other elements for boolean operations, so rebuilding the mesh is not a viable option for us.

The question is, would you consider adding this feature in the near future? I am certain this would be a desirable feature for many others.

Oh yes, apologies, I remember now that we spoke recently :slight_smile:
The feature is definitely on the roadmap, but we are not exactly sure when we’ll tackle it. The good news is that since Rhino Inside supports extracting Breps, there is probably some logic we can reuse in writing that conversion.

Maybe you’d be interested in giving it a go yourself?

The difficulty in doing so with Speckle is that we don’t have access to Rhino’s geometry kernel, which might be needed to rebuild or validate the final Brep.

@AlanRynne has implemented support Brep > Revit and might have some additional comments.

1 Like

@AlanRynne in your experience do you have any particular suggestions about how to begin to tackle this?