Tween Two Surfaces inconsistent results. Solid to surface convertion

So, basically I am trying to convert a huge amount of closed polysurfaces into surfaces, since they are all metal sheet, my plan was to explode the breps, get the two biggest faces by area, then tween between then to get the middle plane/surface of each closed polysurf. It kinda worked. but some of the tween results became lines.

This image shows a simplified version of what I am working on.

The following two show what I did, and what the results were:


I found some topics on the subject, but I was unable to fix the issue with any of the solutions that were discoursed.

My objective is to get a huge Closed Polysurf assembly and (with like 1k + bodies) and convert it easily to single surfaces for FEA analisys.

solidstosurfaces.gh (58.9 KB)

If you look at these, they aren’t lines they are very narrow surfaces.

If you look at the surfaces producing these narrow surfaces, their u-directions run in opposite directions.

If you reverse the u-direction of one of these surfaces you will get the surfaces you are looking for.

I used a simple (1 line) python script to reverse the u-directions, you could also do this with a plug-in (for example, the Reverse Surface Direction component from LunchBox).

solidstosurfaces_re.gh (59.4 KB)

-Kevin

1 Like

Thank you very much, it works like a charm!!!

If I understood correctly, you found the wrong facing U directions using the dot product and then picked and choose those to reverse U using the python script.

The use of the python script is actually better for me because I don’t know if I will have admin rights to even download plugins in my new workplace.

I am hopping so because I used PufferFish tween two surfaces command.

Do you happen to know any python scripts kung fu magic to do that as well? Or at least point me in some direction so I can learn how to do it? Thanks.

If the breps you will be working with are all simple straight extrusions like the ones in your sample file, you can avoid any plug-ins or scripts and simplify your file by just moving one of the surfaces to the midpoint between the two surfaces.

solidstosurfaces_re_02.gh (56.8 KB)

If you’re wanting the same untrimmed surfaces you got from the Tween Two Surfaces component, you can pass the surfaces through an Untrim component.

-Kevin

1 Like

Thanks,

the sample file worked like a charm, but with the real model it did not end well.

I did however manage to adapt the solution you shared and extract all the outside faces, getting a similar result to that that I needed.

Thanks for taking the time to give some help.