[Issue] Boolean union of bad model with non solids (cityGML model aqired from gov site)

Hello guys,

I’m trying to do boolean union to the 3d model of a city part with some terrain object for grasshopper algorithm to analize, script requires it to be one singular brep, therefore I need to merge buildings with terain (“point in brep” component) i can download 3d models of buildings from government site, but those are in .gml format, I can transform them to a readible format through CityEditor plugin for sketchup, (with 3 layers: slab, walls and roofs) but when imported models are messed up.

I’m trying for few days without any satisfying results, even if it works for some singular models, some things are always making boolean union to fail, I’ve even tried to just extrude exploded poly/surfaces downwards to get the outer shell of the model, but also this path fails.

I don’t quite understand how can I manage it without remodeling whole cities in Rhino.

Please help me guys, give me any advices.

I’m attaching small section of the bigger model with problematic elements (3dm for rh6 and rh5) When I work with tose models I use “MeshToNURB” command.
(please consider that it works for simple buildings, but fails for buildings with more complicated roofs)GML_Import_fragment.3dm (2.5 MB)
GML_Import_fragment_rh5.3dm (3.0 MB)

Edit; some further info: I’ve tried ReduceMesh, MergeAllFaces, MergeAllEdges. I think that any way to get solid is good, even some grasshopper magic with Mesh|Ray component, generating mesh from points etc would be good enough, but I’m not sure where to start and not sure if that would give me vertical walls…

Hello - there are no breps at all in the files you posted, it’s all meshes - you can simply Join them into one mesh if that helps with your process.

-Pascal

Yes, I know, I need to import these models through Sketchup and I need to convert them to breps, I’ve posted file with meshes because that’s my starting point and no path led to any success yet.

Normally I change them by {MeshToNURB}, or {reduceMesh > MeshToNURB} but maybe that’s the wrong approach.

Join on this meshes gives me open mesh anyways, so I don’t have brep that will work with {point in brep} grasshopper component. I want to create a closed mesh/polisurface/brep that will be recognized as singular object with an interior and exterior by grasshopper.

Thanks for quick reply!

Hello - individually it I can Join than ToNurbs these, but the meshes are messy - sides of buildings that are clearly meant to be planar are not - for example here the marked points are more than two units out of plane:

which makes the resulting brep much more complex that needed even if you try MergeAllFaces. But, it seems possible to make closed breps from the ones I looked at so far.

-Pascal

I’m not sure if I understand your workflow for this problem, should I use simple Join on multiple meshes, should I try to fix individual objects?
please consider that I need to work in city scale, which means that manual fixing is not an option.

It might be worth thinking about an alternative without this requirement. I’ve found that Boolean operations on questionable geometry are rarely worth fighting for. Especially if there’s lots of it.

What are your trying to analyze?

1 Like

I’m trying to analyze sky view factor, by colisions with surfaces of the model, one solid brep is required to check if the point for analyzis is inside of the building and should be ignored or not, but I’m not sure if it’s only purpose of solid brep, as when I was trying to ignore this, algorithm kinda worked but it showed some weird artifacts (weird tendency of colour gradient to follow certain direction) which I don’t understand, as person who did the algorithm is not available for a while. Unfortunately I’m not a grasshopper master by any means, therefore I cannot give a definitive answer, I can attach gh file in the moment tho!

here’s gh definition, it suposed to work with those buildings connected by some ground solid, for testing purposes it can be just a cube on the bottom of the buildings.svf2_edit_MP.gh (81.3 KB)

Update, I’ve managed to make those geometries into closed solid polysurfaces, by increasing tolerance to 0.01 but now one closed solid polysurface does fail to boolean union with ground object and then even those joined into one closed polysurf fails in grasshopper. for some reason component MassAddition fails.