Repeatedly calling the clip node's functionality using Python verbs in order to create cutting patterns on a mesh.
import math
node = hou.pwd()
geo = node.geometry()
cuts = node.evalParm('cuts')
clip = hou.sopNodeTypeCategory().nodeVerb('clip')
for i in range(cuts - 1):
angle = i / (cuts - 1.0)
dir = hou.Vector3(math.sin(angle * math.pi), 0.0, math.cos(angle * math.pi))
clip.setParms({
'dir': dir,
'clipop': 2
})
geo.execute(clip, [])
if hou.updateProgressAndCheckForInterrupt():
break
node.geometry().merge(geo)