Hi,
I use the Rhino.Geometry.Brep.Trim method to cut a piece out of a torus with a cylindrical cutter.
plane1 = rg.Plane(rg.Point3d(0,0,center.Z),rg.Point3d(0,0,1+center.Z),rg.Point3d(1,0,center.Z))
torus1 = rg.Torus(plane1,parameter1,parameter2)
cylinder1 = rg.Cylinder(rg.Circle(rg.Point3d(0,0,-10),parameter3),20)
cutting_brep1 = rg.Cylinder.ToBrep(cylinder1,0,0)
torus_brep = rg.Torus.ToBrep(torus1)
torus_segment = torus_brep.Trim(cutting_brep1,1)
torus_segment_id = sc.doc.Objects.AddBrep(torus_segment[0])
Subsequently I want to create a smooth surface between the torus part and another surface using Rhino.Geometry.Brep.CreateBlendSurface
brep_A = rs.coercebrep(part1)
edge_A = brep_A.Edges[0]
ival_A = edge_A.ToNurbsCurve().Domain
cont_A = Rhino.Geometry.BlendContinuity.Tangency
brep_B = rs.coercebrep(part2)
edge_B = brep_B.Edges[2]
ival_B = edge_B.ToNurbsCurve().Domain
cont_B = Rhino.Geometry.BlendContinuity.Tangency
surface = rg.Brep.CreateBlendSurface(face_A, edge_A, ival_A, False, cont_A, face_B, edge_B, ival_B, True, cont_B)
However, the edge of the torus part is split up in two pieces which is preventing the creation of a smooth surface between the torus part and the other surface.
Magenta is the torus, blue is the part cut out of the torus, black is the other surface. Target is to create a smooth surface between the blue and black surface.
The BlendSurface command which is available in the viewport has an option to chain edges which allows selecting both edges of the blue part, resulting in a smooth surface between the blue and the black. Is there a way to obtain the same behavior using the Rhino.Geometry.Brep.CreateBlendSurface command?
Thanks.