guys, i am stuck by trying to extract a intact surface from a unioned brep.
I got a lot of identical boxes which were adjacent . then I chose some of them to do solid union. so I got a variety of boxes. When I deconstructed them, I guess i can get complete faces which are unioned. however, it just showed original faces.
for instance, there is a unioned brep from two boxes. i want to get the surface from 6 after deconstructed it. but it actually have 10.
You’re creating a polysurface from two boxes, this doesn’t mean that each of the co-planar surfaces are merged into a single surface. It means only that whatever is enclosed inside is removed from the boolean union operation.
if you so much wanna do that, you’ll have to extract the meshes out of these co-planar surfaces, merge the meshes and convert back to surface. Although, you’ll run into other issues.
I don’t understand the underlying code and math well enough to get why this is a hard thing to do.
MergeAllFaces and MergeAllEdges work fine in Rhino, if the input is coplanar/colinear. The simplify curve component in grasshopper does too: if you take co-linear line segments, join them, put it in simplify curve, what comes out is one segment that can’t be exploded.
I’m not an experienced coder, that makes it hard. I tried using merge faces last week for one task and the result wasn’t a single surface. But I applied it on curved surfaces, maybe this is the case, it has to be co-planar surfaces. Another issue might have been that the two surfaces I wanted to apply this method on, were trimmed and this method may be working only on untrimmed nurbs surfaces. I don’t know. Next time I need to do a similar task I’ll research more.
The only time I use merge all faces is if I’ve done boolean unions or subtractions between planar geometry, and I need a single face border to turn into a toolpath on the CNC.
Also sometimes use it to consolidate flat or flat-enough faces that are part of an object I made using Clayoo SubD - a bunch of creased edges can flatten a subD surface, but sometimes you can’t joint them into one surface in SubD or it changes the way they pull on other more curvy stuff on the same object.
thank you max3, you help me out! i didn’t notice the component before.
but here is another problem, how can i get surfaces in the same direction? like, every single brep’s west facade.
I’m not an experienced coder, that makes it hard. I tried using merge faces last week for one task and the result wasn’t a single surface.
MergeCoplanarFaces from rhinocommon makes a single surface. If in your case it didn’t then it means the surfaces were not co-planar, even if they looked like they were. Or you may have had some micro gap on the edge.
I tried to extract and reuse this sorting method on another Brep, but it would not work, the Top and Bottom both get highlighted by filter gate 4 and nothing gets highlighted by filter gate 5.
Can you tell me what I did wrong or left out? File attached with internal ized data.