Dear Erik,
Jochen of bimm raised an ADN case and pointed out this thread, so I will take the liberty of answering you both here for all to partake. Jochen also shared some sample code and data sets. I logged the issue REVIT-130028 [TessellatedShapeBuilder solid creation throws Could not create consistent vertex list has] with our development team for this on your behalf. Please make a note of this number for future reference.
I also noticed a similar older development issue that still remained open, REVIT-122687 [TessellatedShapeBuilder cannot build from triangle from circle face].
Prompted by my submission of your new issue, the development team took a look at the latter, older one and respond to that:
Here's a quick guess based on a glance at the add-in code and TessellatedShapeBuilder code:
The shape that is picked is not a closed solid.
Note that the add-in code in only accepts a valid solid:
Target = TessellatedShapeBuilderTarget.Solid,
Fallback = TessellatedShapeBuilderFallback.Abort
Therefore, if the selected shape is not a solid, TessellatedShapeBuilder will throw an InvalidOperationException with the odd message "Could not create consistent vertex list." That message should presumably be much more generic.
In summary: that sample data does not describe a closed solid, and the add-in code is explicitly rejecting all results that are not closed solids.
In that case, one could either fix the sample data to create a closed solid, or change the shape builder target and fall-back to something more lenient.
I see that in your sample, you implemented your own fall-back mechanism by initially trying to use
builder.Target = TessellatedShapeBuilderTarget.Solid
builder.Fallback = TessellatedShapeBuilderFallback.Abort
If the call to builder.Build fails, you launch a second attempt using
builder.Target = TessellatedShapeBuilderTarget.Mesh
builder.Fallback = TessellatedShapeBuilderFallback.Salvage
Have you checked whether this exception handling works, and the second attempt is launched as you expect?
I expect the development team will provide more feedback as soon as they have analysed your code in more depth as well.
Best regards,
Jeremy