# The curious vertex order of Brep boxes

We are processing a lot of information based from Breps at the moment. Because we want to keep the topological order of surfaces, points, etc. always the same we are also producing breps in the same way, and then keep using them for all sorts of things.

If you look at the screenshot you see what I mean. We can always be rest assured that the points and surfaces are in the same order.

However, once we start exploding this brep to process its individual faces and THEIR vertices, it turns out that, I think, all of them still follow the same original vertex order from the Brep. That means, for example, that the face with the blue 3 has the point order “bottom right, top right, bottom left, top left”. This is really funny because if I were to produce a 4-point-surface with that point order it would create a self-intersecting surface.

Does Rhino just accept that this is the point order without noticing that it couldn’t possibly be topologically correct? Or is there another underlying order of edges and vertices?

Note that I’m referring to the De-Brep GH component, when I explode or take apart breps and surfaces.

I don’t think we have the same definition of “topologically correct”. To me, the ordering doesn’t matter, only that all vertices have a different index, and that all indices between 0 and n are used.

For many breps, there is no way to come up with a reasonable ordering of vertices, edges and faces anyway, so I doubt we even try.

Whether or not the topology of a brep is valid depends not on what identifiers have been assigned to the various elements, but how the elements are connected together.

Hi @DavidRutten,

The “topologically correct” was in reference to a surface, not a brep. I totally understand that the order of vertices on a brep can’t always make sense (to us humans, anyway).

What I meant was that any untrimmed surface has three or four points, which are ordered clockwise when viewed along the normal vector. Or at least, that’s how the surface normal turns out if it’s being built from points.

So, when exploding an existing Brep and looking at the points of a resulting single surface in GH, I was surprised that the points could also be in a different order.