The "Merge Faces" command

Hello!
Please tell me how to create 4 “clean” surfaces from one Brep, which is a broken geometry, in grasshopper. The “Merge Faces” command does not work well for surfaces that have holes.
Finishing AC-to-Grass.3dm (282.1 KB)
thank you


Hi Kyrylo
Have you tried MergeCoplanarFace?

thanks for the answer! I am interested in how to do it in grasshopper

Curious how you ended up with such wacky walls?

Used this:


FMerge_2024Apr9b.gh (22.5 KB)

Not sure how much of this is necessary, just playing games. Geometry internalized:
FMerge_2024Apr9bb.gh (39.5 KB)

2 Likes

Hi Kyrylo

Sorry, I see. If you call the method from a script component you can specify tolerances.

https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.brep/mergecoplanarfaces

merge face.gh (16.5 KB)

x.MergeCoplanarFaces(1,1)
a = x
1 Like

This works for your case:
merge-co-planar-faces.gh (25.1 KB)


Trick learnt from @inno :wink:

3 Likes

these are walls that are imported from archicade through live condition. Looking forward to your help, I will study your script

Thanks for your help, I will study your script

thanks for the help

image
Your solution looks like this to me

@Johan_Lund_Pedersen’s GH requires R8.

missing

Hi @Joseph_Oster and @sambrari95

Sorry. Does this work for Rhino 7?

merge face.gh (19.4 KB)

Yes and no. Face planes remain messed up.

missing

Hi @Joseph_Oster

Ok, apparently script is not backward compatible.
Does Align plane solve the issue?

merge face.gh (19.4 KB)

Don’t have R7? Does it work in R8?

I do get this error in Rhino7:

Runtime error (MissingMemberException): 'NoneType' object has no attribute 'MergeCoplanarFaces'

Traceback:
  line 1, in script

Hi @Cumberland and @Joseph_Oster

It sounds like you haven’t set the type to brep on the script component.