Simplify polysurfaces

Hi guys

I’m working on a script for early-stage CO2 calculations.

The goal is to be able to take simple volume studies like this one > use Ladybug Tools to create rooms (thereby auto-defining if a surface is a wall or a roof, etc.) > save the sub-divided geometry on a separat layer in rhino > export data to the Real-Time LCA webapp using Speckle and make the CO2 calculations there.

The workflow works, when the closed polysurfaces are modelled correctly. But sometimes I get modelles, that turn out like this:

When I delve further into the geometry, I can see that the problem is, that there are small unnecessary points along the edges.

image

My current workflow to simplify the geometry is to explode geometry > DupBorder > SelSrf and delete the old surfaces > SelCrv > SimplifyCrv > PlanarSrf > Join.
If I have multiple similar room type like in this project, I turn these into blocks so that I only have to go through this process for each block type. If that’s not the case, I will have to go through the process for every room in the model…

This beckons the question: Is there a simpler way of doing in this in either native Rhino og grasshopper?

I’ve tried dabbling with some things in grasshopper myself for one of the troublesome rooms, but all my efforts lead to Invalid Brep’s…

I figured that this problem is more geometry related that Ladybug Tools related, so that’s why I asking the question here instead of the LBT forum.

You’ll find an example of troublesome polysurfaces here:
troublesome geometry.3dm (19.6 MB)

did you try _MergeAllEdges?

Just gave it a try, but doesn’t seem to do the trick :confused:
I used ShowEdges to display the edges of the polysurface, then used MergeAllEdges, but the result was unchanged. Am I doing it right?

image

MergeAllEdges gets rid of the extra points you were showing on in the sample file in my testing. Does it not do that at your end?

I can show you what happens on my end, step-by-step.

This is how the HBrooms look like before editing:
image

Unfortunately, PointsOn doesn’t work for polysurfaces. So in the picture below, I’ve exploded the polysurfaces and extrusions and turned on the points. I don’t know how the architect has modelled this geometry, but it seems like som of the points are outside the geometry itself.

I then undid the Explode and used ShowEdges. The geometry looks fairly clean.

image

With ShowEdges turned on, I can use MergeAllEdges. This didn’t seem to make any visible changes to the edges, the points or the HBrooms.



image

Hi Mark -

For polysurfaces, use SolidPtOn.
image

That is expected behavior for trimmed surfaces.
In this case, some of those surfaces are trimmed from planes that were a lot bigger. While that is no problem per se, you can use the ShrinkTrimmedSrf command to bring the edges closer to the trim curves.

I’ve looked at your file several times now, but I never found this one:

In the file you posted, I can’t find any object that has redundant edges.
The only one that comes close is this one:
image

… but the angle between the surfaces in that front face is too large for them to be considered as coplanar, and thus they can’t be simplified.
-wim

It could also be that the issue is in your gh script. How are you processing these polysurfaces?

With the default render mesh I see this:

Try this:


To get:

Thanks for the input!
@Gijs I tried changing the NURBS meshing parameters like you suggested, but that didn’t do any difference in grasshopper either.

@wim you can find the issue in this room in this corner


I find it using DupBorder.

I don’t see the point if I use SolidPointsOn, but when I turn on ShowRenderMesh, you get the gist of where the point is (see arrow).

However, ShrinkTrimmedSrf seemed to do the job! So thank you guys!
image

Hi Mark -

Thanks!
When I use a display mode where the isocurves are turned off for planar surfaces, I see that this surface displays isocurves, which means it’s not planar.

I’m glad that gives you something that you can work with.
-wim