Merge two surfaces

Hello,

I’m new to this forum an not a complete novice to rhinoscript and python scripting.

I am working on a script that should merge 2 surfaces as rhino command _MergeSrf ,

Is there a way to do it without directly invoking the command?

import rhinoscriptsyntax as rs

def MergeSurface():

Object1 = rs.GetObject("Select Surface 1" ,8)   
Object2 = rs.GetObject("Select Surface 2" ,8)
    
rs.SelectObject(Object1)    
rs.SelectObject(Object2)

rs.Command ("MergeSrf Smooth=No _Enter")

if name==“main”:
MergeSurface()

this works, but is there a better way?
because I need to merge multiple surfaces in one

thanks in advance
Aleksandar

Hi Alexander,

I don’t see thing on RhinoCommon that provides the functionality provided by MergeSrf. So, scripting the command is the way to go.

– Dale

Thanks for quick answer