Align 3D Body's Face and a Plane in parallel

Dominique_Cracovia
Member Posts: 4
**
in 3D Design
I'm looking for a quick solution how I can align a face of a body (a cube for example) and a plane in parallel in the same operation. I'd like it to align and rotate around it's own Y axis at the same time.
I tried this code below bu all I get is:expected HandleAxis, got CoordinateAxis
selection = BodySelection.Create(GetRootPart().Bodies[4]) upToSelection = Selection.Create(GetRootPart().DatumPlanes[0]) moveFrame = Move.CreateFrame(FaceSelection.Create(GetRootPart().Bodies[4].Faces[4])) axis = GetRootPart().CoordinateSystems[1].Axes[2] options = MoveOptions() options.CreatePatterns = False options.DetachFirst = False options.MaintainOrientation = False options.MaintainMirrorRelationships = True options.MaintainConnectivity = True options.MaintainOffsetRelationships = True options.Copy = False options.SnapAssociatedVertices = True result = Move.OrientTo(selection, upToSelection, moveFrame, axis, options) # EndBlock
Tagged:
0