@revink wrote:
Hi all,
I am trying to do what would seem a very simple operation with python but it appears to be more difficult than expected. I have a surface (or multiple surfaces) I have to split with a list of cubes, then I have to assign each of these surfaces to a layer and split them in turn with a list of lines. (see attached image)
However the rhinoscriptsyntax doesn’t allow for this as it requires to use just to object at the time. I thought I could then use the rs.command but however I can’t manage to select the objects I want to cut my surface with. Below the code I am using
import rhinoscriptsyntax as rs srf = rs.GetObject("surface to cut",8) cuttingObjects = rs.GetObjects("cutting elements",16) rs.SelectObject(srf) rs.Command("split ") rs.SelectObjects(cuttingObjects) rs.Command(" ") rs.UnselectAllObjects()I tried for example to move the objects I want to cut my surface with and then write “sellast” in the command string, however this doesn’t appear to work.
Any way this could be solved?
Thanks in advance
Posts: 5
Participants: 2
