I have an issue with closing Breps .
The final result is generated by joining individual faces and down the row there are some Micro Edges which can be removed by Rhino command “RemoveAllNakedMicroEdges” . However, I can’t find anything in rhinoCommon.dll which does it!
Can you post a model that contains a Brep that works well with this command?
I attached the model. This is created by a grasshopper plugin which I am working on.
If you explode the object and join its faces back, you still get an open object. but after calling the RemoveAllNakedMicroEdges command the object is closed! I can’t find out why and I am not able to simulate this within the API.Issue with open Breps.3dm (107.2 KB)
There isn’t anything on RhinoCommon, at the moment, that can help. But I’ve added something that will. Try the new
BrepEdgeList.RemoveNakedMicroEdges method in next week’s Rhino 7 Beta release.
having this method in Rhino 7 is great!, Is there any chance to include this in the next Rhino 6 service pack? our aim is to release the plugin for Rhino 6 .
One of the triangular faces has 4 edges, one of 0 length.
This could be a workaround:
for(var i = 0; i < brep.Faces.Count; i++) if (brep.Faces[i].AdjacentEdges().Any(j => !brep.Edges[j].IsValid)) brep.Faces.RemoveAt(i); A = brep.CapPlanarHoles(RhinoDocument.ModelAbsoluteTolerance);
torabiarchitect.gh (15.8 KB)
Good to know! I can imagine what is causing this… could you please explain how did you find out ? Actually I exploded the object and look for such a thing , but I couldn’t find …
excellent ! I should first find out what causes the problem in first place, If I can’t then I will try to kill the invalid edges… thanks a lot
- _ShowEdges with Naked edges mode to identify naked edges.
- _ExtractSrf the adjacent faces.
- _What each face to get its edge count.
- If the edge count is more than expected, _DupEdge the edges of the face then _SelShortCrv. (In the case of the face with the extra edge in your model, _DupBorder simplifies the edge curves to a 3-point polyline.)
If this is something you need to do often, the faces can be identified with BrepEdge.AdjacentFaces for each edge whose length is below a minimum tolerance.
Problems like this can occur when the input Breps for Boolean, split, etc., operations have coincident or overlapping geometry.
Thanks a lot!
here I have a case where edges are overlapping. please see the attached images. my issue is that I cannot find a way to avoid this in the pipeline, hence I have to fix it after the brep is created by joining its faces. the question is how to eliminate the edges which partially overlap?
See if RetrimSrf.py in the post below can repair the faces.