1.) Brep.CreateFromOffsetFace isn’t getting the directions of the faces right, and
2.) Brep.CreateFromOffsetFace isn’t creating a solid from your geometry.
You mentioned that you found problems with some edges, so you probably noticed that the shortest edge curve that is a line has 6 stacked control points. This is causing the failure in building walls. Did you make this in Rhino? If so, how? I’d like to make it so that doesn’t happen. I’m changing RH-31895 from a bug in the wall maker to an example for geometry validation testing.
I indeed found later the geometry to be faulty.
I did not create the geometry, it’s probably made in Rhino but it’s from a client so I’m not able to tell you what steps led to this geometry. I do know they work partly with imported geometry to build on so it could be Rhino native or imported faultt geometry.
While at it:
I have found the command _RebuildEdges to clean up (some of) these edges. I also found the probably equivalent in Rhino.Geometry.BrepFace.RebuildEdges().
My question is, wheter or not many itterations of the EdgeRebuilding will degarde the edge’s features? In other words, is it like with rebuilding a curve, that tends to get ‘smoother’ with each itteration, or is RebuildEdges doing something else that is realted to getting the edge in tolerance with the underlying surface, more that smoothing it out?
RebuildEdges just constructs the 3D edge curves from the 2D parameter space curves, so, since the 2D curves do not change, you should get the same result each time you call it.