Hi, I wonder if anyone has advice on how to trouble-shooting shade geometry and identify ‘problem’ geometry in a scene?
Scenario:
A small home, nothing too out of the ordinary:
With NO shading, the simulation runs in roughly 25 seconds. Thats pretty nice
But, if I add some shading surfaces,
the simulation time jumps up to several minutes (>2 minutes on my machine). That is not so nice
After a fair bit of poking and investigation, I found this little guy:
which it turned out was non-planar, and so was being meshed into > 500 segments:
If I remove this single ‘bad’ surface from the shade-set, simulation time drops back to <30 seconds
So: my question is:
What would be the right method to identify and flag these ‘problem’ faces in a more automatic manner, rather than manual/visual investigation?
Previously I’ve created a component which used the Face::Vertix ratio as a measurement to locate ‘bad’ geometry and flag it for me. Using 1.5 as a threshold usually helps me find any ‘bad’ geometry in the scene. But in this case, the ratio was not too high (~1.6), so that method didn’t flag this surface for me.
Alternatively, I could see trying to use a naive ‘face count’ (ie: if faces > 100, flag it…) but that doesn’t seem quite right either? I have, in the past, used large context meshes with many faces (urban scenes, ground surfaces, etc…) so it seems this is not the right method?
So, I wonder: does anyone now of a better method or metric for finding surfaces which should be simple and flat, but have accidentally (for tolerance reasons, accidents, etc) gone all wonkey and result in hundreds of very tiny segments?
Maybe comparing segment area to the parent area somehow to find excessively ‘small’ surfaces?
Or is there another way of ‘measuring’ the level of triangulation and subdivision of a surface that I could maybe utilize to help locate these types of ‘bad’ surfaces, so that I can go in and fix them?
Any thoughts or advice are much appreciate!
@edpmay
Example File:
example.gh (113.0 KB)