my script cut the extremity of the 3 filets and i need to create the network surface with the 3 breps edges create…
my script find a list of the 3 edges, but the Rhino.Geometry.NurbsSurface.CreateNetworkSurface(edges,2,0,0,0,0) return an error about the type of list,
so i created an Ienumerable but not enought…
in fact, i have to put fillet on 3dm product, but i do that along 4 or 5 days work… I don’t know how many fillet i have to draw but it’s not on a cube and every radius value is different so i have to put them one by one for a lot of them and draw manualy the connection…
fillet tool on every cad solution doesn’t work, solidworks is the worth, Catia can make a good job, but it’s not faster than rhino… i passed a lot of time on this kind of intersection of 3 filet, if i find the script for 3 filet it can run for four!!!
i’ll try your script, but i’m not sure that it is what i want…
on your script all edges has the same radius value…??? no?
Yes, but it would also be possible to enter the radius values for specific edges manually.
Furthermore, each edge can have different values for the start and end radius!
i don’t know how can explain my problem in english, i just want to know how can i , with a list of Brep.edge, create a network surface with this list…
Does the code below help? It’s pulled directly from the rs.AddNetworkSrf code…
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
def GetBrepEdges(prompt):
go = Rhino.Input.Custom.GetObject()
go.SetCommandPrompt(prompt)
go.EnablePreSelect
go.GeometryFilter=Rhino.DocObjects.ObjectType.EdgeFilter
go.GetMultiple(1,0)
if go.CommandResult()!=Rhino.Commands.Result.Success:
return go.CommandResult()
objrefs = go.Objects()
if not objrefs: return
#can have multiple objrefs from same brep object(multiple edges), cull objrefs
unique_IDs=[]
unique_objrefs=[]
objs=[]
for objref in objrefs:
if not objref.Object().Id in unique_IDs:
unique_IDs.append(objref.Object().Id)
unique_objrefs.append(objref)
objs.append(objref.Object())
edge_crvs=[]
#need to loop here in case multiple base objs are involved
for obj in objs:
sub_objs=obj.GetSelectedSubObjects()
if sub_objs:
trims=[obj.Geometry.Trims[sub_obj.Index] for sub_obj in sub_objs]
trim_crvs=[trim.Edge.ToNurbsCurve() for trim in trims]
edge_crvs.extend(trim_crvs)
#returns selected EDGE curve *GEOMETRY* (Nurbs curves)
return edge_crvs
def TestAddNetworkSrfFromBRepEdges():
tol=sc.doc.ModelAbsoluteTolerance
atol=sc.doc.ModelAngleToleranceRadians
curves=GetBrepEdges("Pick Brep edges for network surface")
pass
surf, err = Rhino.Geometry.NurbsSurface.CreateNetworkSurface(curves,2,tol,tol,atol)
if err==0:
rc = sc.doc.Objects.AddSurface(surf)
sc.doc.Views.Redraw()
TestAddNetworkSrfFromBRepEdges()
Thank you @Helvetosaur, I tried to take some parts of this script, but it’s more difficult, I’ve got a list of brep edges and you a list of object… I think I’ve to convert my edges to nurbs curve, but in yours you pass by a trim , I don’t understand why… It’s really nebulous for me…
I’ve quickly hammered this together in the last 15 minutes, but it seems to work with trimmed and non-trimmed surfaces. The only important thing is that your input surfaces are connected (at vertices), like in your screenshot above.
Anybody have tipes for creating an IEnumerable Mesh ? It’s taken me maybe 15 minutes of googling just to try and get one method working, Curve.ProjectToMesh with python, I think there should be a rethink (at least in terms of documentation) to make this clearer.