The RhinoCommon method, CreateBlendSurface, is documented here:
If you are trying to make this work in a GHPython component, you could do something like this, (BUT…this is an example, you will need to implement some method of deciding which two edges to use, in the example below they are hard coded, but depending on input geometry, will not always be the same…maybe just add inputs to your component to let the user set the appropriate edge?)
# Srf_a and Srf_b inputs set to item access with type hint "Brep".
# set variable names as listed in RhinoCommon
face0 = Srf_a.Faces
edge0 = Srf_a.Edges # you will need to determine a better way to find the 2 edges you want to blend.
dom0 = edge0.Domain
face1 = Srf_b.Faces
edge1 = Srf_b.Edges # you will need to determine a better way to find the 2 edges you want to blend.
dom1 = edge1.Domain
# find a way to set the blend continuity variable
if BC == 0:
BlCont = Rhino.Geometry.BlendContinuity.Position
elif BC == 1:
BlCont = Rhino.Geometry.BlendContinuity.Tangency
BlCont = Rhino.Geometry.BlendContinuity.Curvature
# feed rhinocommon method your clearly named variables
# BlCont is the blend continuity, could be set different for each surface edge. Here the same value is used
BlendSrf = Rhino.Geometry.Brep.CreateBlendSurface(face0, edge0, dom0, flipA, BlCont, face1, edge1, dom1, flipB, BlCont)
GHPy_BlendSrf.gh (22.7 KB)
As far as your second question, I think one of the best ways for you to learn this is would be to start referencing the RhinoCommon Documentation, and understanding the difference between:
Generally, when calling a Rhinocommon method, if you aren’t sure what to name a variable…just use what is listed in the documentation. Example: documentation listed above, for the CreateBlendSurface method, shows face0, edge0, domain0, etc…
Also, giving this a read: