How to split a cylinder say 10 times?

Erik Kostson
Member, Moderator, Employee Posts: 312
✭✭✭✭
Is there a way using scripting say to automatically split a cylinder along a direction say 10 times?
0
Answers
-
Below is one possible way of doing this:
# Python Script, API Version = V242 # Create Datum Plane selection = FaceSelection.Create(GetRootPart().Bodies[0].Faces[1]) # base plane to use for split result = DatumPlaneCreator.Create(selection, False, None) # EndBlock for ii in range(1,11,1): # Translate Along Z Handle selection = Selection.Create(GetRootPart().DatumPlanes[0]) direction = Move.GetDirection(selection) options = MoveOptions() result = Move.Translate(selection, direction, MM(-100), options) # change as needed # EndBlock # Slice Bodies by Plane selection = BodySelection.Create(GetRootPart().Bodies[ii-1]) datum = Selection.Create(GetRootPart().DatumPlanes[0]) result = SplitBody.ByCutter(selection, datum) # EndBlock
0
This discussion has been closed.