I’ve extracted a surface of a brep and after running the Join method it returns a brep with a weird rendermesh. Judging by the isocurves the surfaces look identical though, so what’s going on? How come I get a different render mesh? And how do I prevent that from happening?
In the example above, yes it is a single object. But that’s just because I took the problem out of a list of breps that I’m trying to join and not all are connected (it’s related to this topic)
Does it matter that it’s a single object though?
@dale any idea what’s causing this? Is this expected? Is the new surface equally usable as the old one? How should I go about cleaning up the render mesh?
Yes, you probably don’t want to pass a single Brep to Brep.JoinBreps, even though the method will let you. The method splits up edges, in preparation for joining with other edges. But since you don’t provide any other Breps, the results are not good.
As I mentioned, this brep is part of a list that I just took out to show the problematic surface. When I add another object to it, the same problem occurs:
import rhinoscriptsyntax as rs
import Rhino
import scriptcontext as sc
def test_join():
objs = rs.GetObjects()
if not objs:
return
blist = []
for i in objs:
brep = rs.coercebrep(i)
blist.Add(brep)
jbrep = Rhino.Geometry.Brep.JoinBreps(blist,sc.doc.ActiveDoc.ModelAbsoluteTolerance)
for j in jbrep:
sc.doc.ActiveDoc.Objects.AddBrep(j)
rs.Redraw()
test_join()
I’m not 100% sure, since I receive this file from a client saying it’s causing problems with the plugin I made for them. I think it’s made in Rhino but I can double check with them.