Rhino.Inside - Grasshopper - Brep DirectShape vs. Import CAD command

Hi All,

just to add to the ongoing discussion of importing Brep geometry into Revit, I noticed that results between adding a relatively simple surface via Grasshopper / Brep DirectShape component and the standard Insert - Import CAD yield quite different results in Revit 2018. Brep Directshape results in a triangulated mesh while the Import CAD seems to successfully import the Surface geometry from a Rhino file - see screenshots below. I would think that both commands internally should in principle rely on the same API commands - but this does not seem the case judging by the results. Does anybody know more ?

!

As of yet, the geometry conversion logic behind importing CAD into a Revit model, is not exposed to the Revit API. Revit uses an older geometry engine for it’s data. Rhino.Inside.Revit has a built in geometry convertor that undestands Rhino geometry and can prepare the geometry for Revit but in some cases Revit can not understand this geometry and automatically converts it into Mesh.

I’ll tag @kike here as he knows this best

@PhilO Would you mind sharing the source file btw?

Hi @PhilO,

First of all I would say that we are aware there is still room to improve our geometry conversion mechanisms, there are things on the list that will be implemented to make this process more straightforward.

The question is a bit tricky.
I can not answer well since we have no access to the Import CAD code you mention.
But I can share what we have found up to now.

  • I seams that Revit API follows a similar architecture as Rhino. Revit API is a .NET wrapper of the internal Revit C++ API, as RhinoCommon is the .NET wrapper of Rhino C++ API. I may be wrong with this but openNURBS.dll is C++ so I guess their 3DM importer is build on top of their internal C++ API. This would mean that there is one layer less on their implementation. For instance you can found normal-reversed surfaces on the Revit model, and as long as I know there is no public API to generate those kind of surfaces using the public .NET Revit API.
  • It seams that the geometry contained in a DirectShape and geometry contained in a Family is a bit different, I can’t tell you if those containers use different geometry kernel implementations, but it seams DirectShape is more picky. Looks like DirectShape.IsValidGeometry method ensures this additional validation step for DirectShape. In my opinion Import commands don not follow DirectShapes additional restrictions and are using Family geometry.
  • We are unable to found more detailed documentation about some aspects, like tolerances, Revit geometry kernel is using and this is key for a good conversion. For instance some geometry that is failing seams to transfer well if it is just upscaled.
  • In your sample, it seams this surface comes from a SubD, those surfaces use to have a kind of special points on the round corners at the bottom. In surfaces like that we have observed that moving those corners slightly makes the conversion work. But again the key is how much (tolerance value) should those corners be moved in order to make this work, and why.

Hi Kike and Ehsan,

thank you for your replies - that definitely sheds some light onto the issue.

Best,
Philipp

1 Like

Phillip -

Sending us the geometry always helps if we find it is a condition we have not seen before.

Hi Scott, All

yes, sure - I shared it with Ehsan to have a look.

Based on what Kike wrote above -

would it be thinkable calling the Import CAD command from GH and create Family Geometry rather then using the DirectShapes thus sidestepping the issue ?

In the long run, seems though Autodesk needs to do further work on their API and what they expose there as well as their documentation.

From the designer side, guess it also about thinking what is worth importing into Revit and at what stage of a project it can contribute to raise overall work efficiency - which is the only reason for using it in the first place.

Many thanks,
Philipp

The import command does create forms if a Family file is current open, essentially bypassing Directshapes. The import button at top of the Revit Rhinoceros toolbar also creates layers as Sub-categories for those objects.

Just my 2 cents but there are two techniques for importing geometry via the Revit API which produces two different outcomes, 1 meshed, the other smooth surfaces like what the OP showed. If the RevitAPI ShapeBuilder is used, generally meshes are output as its very limited and doesn’t support surface creation. However if the Revit API ShapeImporter is used to create a DirectShape the results are a lot better as it preserves the surface.

1 Like