Subdivide Surfaces of a Brep

Done a few searches both here and on the old GH Forum, but yet to find anyone with an answer. It feels like something I have had to solve in the past on projects but can’t remember how I did it.

Ok, so what I want to do is subsurface a set of surfaces of a Brep so all edges/panels match, but the numbers can be different on each surface depending on the length or something similar.

This is using simple slider logic to show what I want to achieve but done manually.

I have been looking at the Brep Typopolgy component, Brep Edges, etc to get Interior edges to divide them and then build the grid from there but still getting miss matching edges. Even tried the Mesh Brep workflow but this still does not work.

Will post up my findings from that in the morning when I have cleaned up the code a little. Just wanted to get the ball rolling and see if anyone had any ideas I had missed.

Here’s the file seen in the image Divide Brep Surfaces WIP.gh (112.9 KB)

Cheers
Matt

If the underlying Surface match the BrepFace (meaning that the Face is Surface) … you can use classic Brep connectivity (“similar” to mesh connectivity) for inquiring/locating adjacent BrepFaces blah, blah … but why bother? - since the general case (any brep) is rather impossible to do without meshes (and K2) : you are actually after a quad “wrapper” . See this:

Another approach could be doing a tri-mesh and then converting it to a quad mesh:

Tri-to-quad-meshes-with_algorithm.pdf (414.1 KB)

Tri-to-quad-meshes-5.pdf (6.5 MB)

gmsh_quad_preprint.pdf (3.8 MB)

Thanks, I will have a read through these, a quick glance they may be a bit overkill for this simple project.

Also, the subdivision needs to stay per face so the idea of wrapping a whole object as if it where a single surface ignoring the seams would not work in this case.

Will check out Brep connectivity think I started looking at this but yet to get it to work as required