...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
model = getCurrentModel()
angle = 0 #fill in the angle
rot = modeling.Rotation(angle, modeling.CoordinateAxis(2)) #Note: CoordinateAxis(2) refers to the Z-axis
transB = modeling.Transform(rot, modeling.Vec3(a,b,c)) #fill in a,b,c
frameA = model.getComponent('frameA')
frameA = modeling.PhysicalOffsetFrame.safeDownCast(frameA)
frameB = modeling.PhysicalOffsetFrame(frameA, trans)
frameB.setName('frameB')
model.addComponent(frameB)
model.finalizeConnections()
model.print('step2.osim') |
...