I’ve got a call to Mesh.CreateFromBrep that’s throwing a DocumentCollectedException. The Brep is document controlled, but given that the example code for Mesh.CreateFromBrep is called with a document-controlled Brep, that doesn’t seem like it should be a problem.
Also, when I try to inspect the Brep with the Visual Studio debugger, a whole bunch of its property getters (including but not limited to IsSolid, IsSurface, and IsManifold) also throw DocumentCollectedExceptions, which seems weird to me.
No, but investigating that led me to what I assume is the problem. The Brep came not from a BrepObject, but a call to Brep.TryConvertBrep that was passed a Curve that didn’t have a proper Brep form. Apparently, rather than just returning null, Brep.TryConvertBrep returned a garbage Brep that couldn’t be used for anything. Should this be happening?