Creating trimmed Brep manually causing seam error

Hi,

I’m creating Breps from NURBS data, most surfaces work except ones with seams. I get the following error:

ON_Brep.m_F[0] is on a closed surface. Outer loop m_L[0] contains boundary trims 1 and 15. They should be seam trims connected to the same edge.

How do I check for seam trims?

Thanks,
Mike

Hmm, it seems that I need to make sure that I use the same edge for seam trims. Do I just need to compare the start and end points of the curves?

OK, so I fixed the seam error, but now I have another error:

[0]: 0 - 1

[1]: 1 - 2
[2]: 2 - 2
[3]: 2 - 3

[4]: 0 - 1

[5]: 3 - 4
[6]: 4 - 5
[7]: 5 - 6
[8]: 6 - 7
[9]: 7 - 8
[10]: 8 - 9
[11]: 9 - 10
[12]: 10 - 11
[13]: 11 - 0

ON_Brep.m_L[0] loop has trim vertex mismatch:
m_T[loop.m_ti[3]=3].m_vi[1] = 3 != m_T[loop.m_ti[4]=4].m_vi[0]=0.

Hi @Mike_Johnson,

Some code that isn’t working for you might help up, as you have not provide much for us to go on.

Thanks,

– Dale

Hi @dale, I managed to fix it.