[C++] Trimmed (poly)surface to trimmed Bézier polysurface

I was wondering if there is a quick way to convert a trimmed polysurface into its Bézier patches, while keeping the trims intact.

In short, no.

You can repeatedly split the patch along iso-parametric lines, shrink and so on and get the result you’re after, but it is grossly inefficient if you are going to do this frequently on surfaces with lots of bi-spans.

Why do you need to do this?

If the reason is some common need we’ve overlooked, we will add an efficient and robust way to do this to ON_BrepFace and to every face in an ON_Brep.

– Dale Lear

I noticed that surfaces that have a locally highly curved edge that is maybe 1% of the length of the surface get meshed very coarsely at the highly curved part. If I split the surface over an isocurve and shrink it to isolate the highly curved part, the curved part gets meshed much more finely with the same settings. If I speculate, the meshing algorithm does not sample the highly curved region due to its locality, and does not refine the curved parts. I will post some examples and screenshots tomorrow to show this behaviour.

Coming back to my question:
I was hoping to “help” the meshing algorithm to break up the surface into smaller patches, and have them get meshed individually, to better sample the curved edges.