Reordering vertices of generated Brep from curves

Hi,

I am trying to evaluate a surface created from curves using C# creating a grasshopper-component.

Having the four curves I am using CreateEdgeSurface(curves) to get the Brep and then converting it into a surface. The problem is that ordering of the vertices is not as expected. My hope was that the first vertex in the Brep would be the same as the start point of the first curve, but instead the CreateEdgeSurface has its own ordering which makes it difficult to predict the ordering. I have tried to change the ordering of the input curves, but this doesn’t change the ordering of the vertices. In order to evaluate the surface correctly the ordering must be “correct”.

Does anyone have any experience with this and have a solution? Or maybe even a different way of creating the surface where the ordering can be controlled?

Thanks.

1 Like

Hi @martinveea,

The function does convert the input curves to NURBS, and then sorts, orients and trims off any dangling ends. Thus, tracking inputs to edges can be difficult.

Are you trying to create a planar surface or something else? Perhaps we could use more information what you are trying to do?

– Dale

I am in a similar situation. Ordering is not as expected after using Brep.CreateEdgeSurface(curves). Surface, U, V and normal are also not as expected. I need the ordering and U, V, and normal direction consistent with the order of the curves passed to Brep.CreateEdgeSurface(curves).

Perhaps there could be an overload of the function that can give more control over ordering, and Surface U,V?