Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5746

BrepSplit multiple surfaces/polysurfaces by a single or mutiple surfaces?

$
0
0

@ivelin.peychev wrote:

I cannot wrap my head around this could someone give me a simple example using this RhinoCommon?

What do I do after selecting the surfaces/polysurfaces?

import Rhino
import rhinoscriptsyntax as rs
import scriptcontext as sc
import time




tol=sc.doc.ModelAbsoluteTolerance

objs_ids = rs.GetObjects("Select Objects: ",rs.filter.surface,rs.filter.polysurface)
objs = [rs.coercebrep(ID) for ID in objs_ids]
cutter_id = rs.GetObject("Select split plane: ", rs.filter.surface)
cutter = rs.coerceboundingbox(cutter_id)




ts = time.time()
for obj in objs:
    
    obj.Split(cutter,tol)
    
    
te = time.time()

print "Elapsed time is {:.2f}".format(te-ts)

I want just like Rhino command to just split the object and all properties to be the same as the original, just split

Posts: 9

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5746

Trending Articles