paireks / dotbim

Minimalist file format for BIM
MIT License
161 stars 20 forks source link

Mesh normal problem, Grasshopper plugin #29

Closed seghier closed 11 months ago

seghier commented 1 year ago

Hi i download this file and import it with Grasshopper then bake the meshes and i notice that there is a problem with normals Can you check it?

https://3dviewer.net/#model=https://raw.githubusercontent.com/paireks/dotbim/master/test/ExampleFiles/TestFilesFromBlender/Site%20plan%201.bim

image

paireks commented 1 year ago

I've checked, and you're right, this model has one half of a buildings with normals pointing inside of a building. This model comes from Blender. I guess it could have happened after mirroring one building :)

seghier commented 1 year ago

Can we have an option to fix the normals? because in Rhino it must done manually. Unweld Explode Flip direction Join

paireks commented 1 year ago

I think we shouldn't fix meshes automatically during import. We should import a file exactly as it looks like. Otherwise we will have different outputs in different software.

seghier commented 1 year ago

Mesh flip fix the issue but there is no way to detect normal direction and fix it in Rhino

paireks commented 1 year ago

Yeah you're right. But even if there would be something that would detect and fix - I won't use it automatically.

We can fix this specific model manually and update it, but I think it is ok as it is, there are few more models there that also have flipped faces. Some of them are even on purpose to check the behaviour in different viewers.