通过grasshopper的python代码切分面的代码:
x 为item类型 brep;y为list类型 brep
import rhinoscriptsyntax as rs import scriptcontext as sc tol = sc.doc.ModelAbsoluteTolerance # 范围值 import Rhino # 将需要切分的面构成一个 brep集合 cutter = Rhino.Geometry.Brep() for b in y: cutter.Append(b) pieces = x.Split(cutter, tol) a = pieces print(pieces)