Ensure tanget continuity between adjacent surface patches

hello, i have developed an algorithm that takes an input mesh and tries to create a smoothed brep out of it. The algorithm first creates a series of boundary curves that are tangentially continuous. These curves are then passed to CreateEdgeSurface method. I attached a sample output

i would like to ensure a tangent continuity between the patches. any ideas?