I experimented a little with the “Set surface tangent direction” tool in the Suface Tools menu and I can get effect I want, i.e. going from:
Which shows a much smoother transition between the two surfaces. My problem is the following: What would be the way to do this from a Python script. I could not find the code for the _SetSurfaceTangent command nor could I get it to work with a custom command like:
rhinoscriptsyntax.Command("_SetSurfaceTangent " + "SelID " + str(bridgeNURBSSurface) + " _Enter ")
where bridgeNURBSSurface is the GUID of my right NURBS surface. If it can help, I get the following traces:
python debug ( Continue StepInto StepOver StepOut RunToEnd Stop ): _SetSurfaceTangent
Select untrimmed naked edge: SelID
Object ID to select: 22458561-4345-4364-a03c-e88d69da74fa
No objects added to selection.
Select untrimmed naked edge: _Enter
Select untrimmed naked edge:
Does anybody have any idea how to go about this?
Thanks in advance
the reason why the custom command does not work is because it requires the selection of an edge not only the object (by ID).
Since there is no python or rhinoscript equivalent for
_SetSurfaceTangent or something like MatchSrf , the only way to do it would be to re-create your surface with changed controlpoint positions. So you would have find the matching edges first to cook up the tangent positions of the second row of surface controlpoints yourself, then build a new surface using rs.AddNurbsSurface using the proper weights, knots and degree values. Not an easy task but possible if your surface to change is untrimmed.
Could there be a way to get the ID of the edge and feed this to the rhinoscript command instead of the surface ID? The edge that interests me will always be the one with the lowest Z coordinate so I have a criteria to select it…
unfortunately not, the Rhino command version does not allow to pass an edge as id. It requires the users screen pick.