FamilyType.ByGeometry solids are not converted but the familyType is created?

Hey,

So I am working on a workflow for bringing solids to families (I want to be able to cut and annotate the elements) and basically this works, but some solids do not get translated to actual solid families. is there any way to check if a solid in dynamo is convertible to a revit family freeformelement before i envoke the .bygeometry command? this way i can send them to the model as directshapes..

(and also: is there any way to fix the solids so that i am sure the family is going to be generated?

Appreciate any input!

Yes and no.

The reasons geometry fails to convert is infinately large, and this isn’t unique to Revit imports. All geometry kernals are more or less a series of 10000’s of if > else if statements in sequence. There isn’t a ‘direct’ series you can just use, but some things to check are minimum edge length (check vs the Revit document’s minimum), minimum surface area, minimum radius, etc.

Maximums also matter. Anything with a bounding box over a given dimension, or anything with a min or max points over a given dimension also are concerning.

Also different geometry types will work better with different creation methods - i.e. points, curves, surfaces, solid extrusions, solid sweeps, solid revolves, etc. are all preferred to generic import from both a performance and reliability standpoint.

That is interesting, this might help me.
“Line is too short” error when drawing lines in Revit
What I do find interesting is that some solids are able to plot as directshape, but not as a freeform. currently my workflow is:

  • get solid geometry from json
  • create family by geometry
  • check if family has a volume
    • if not: extract a polysurface from solid and create directshape and then delete the original family from the document

This is not the holy grail unfortunately since i am still losing geometry occaisionally, I am now investigating a way to simplify solids that do not get converted, but the only thing that works so far is mesh.bygeometry with a tolerance

Working in the family environment instead of the project environment is also advisable here. Doing so would allow direct shapes consistently which are more apt to succeed, with resulting output working just fine once the family is loaded into the project. This does take a fair bit of document management or building a tool to run things in sequence, but if you are careful with the origin point selection it also allows reuse more readily (assuming the incoming data identifies reused types and the orientations thereof).

There are limitations on such workflows (and in fact most workflows around interoprability), but like every geometry task it’s a series of sequential ‘if’ statements to deal with the variable outcomes.

1 Like