I'm trying to drive a revolute joint via script with a contact set but the anima

I'm trying to drive a revolute joint via script with a contact set but the anima

typ1804
Explorer Explorer
395 Views
0 Replies
Message 1 of 1

I'm trying to drive a revolute joint via script with a contact set but the anima

typ1804
Explorer
Explorer

I'm trying to drive a revolute joint via script with a contact set but the animation is only half there.

 

It works with the contact set disabled but as soon as I enable the contact set the revolution works only until the two components touch. Then the whole animation stops until the components would stop touching. After the two components stop touching the animation is back on track. Its seems like its missing the contact set animation.

 

The model is the Example Geneva Drive and I want to drive the rotor together with the cross as seen in this tutorial https://www.youtube.com/watch?v=UkGdrTyAaBg just automatically via script

 

#Author-
#Description-

import adsk.core, adsk.fusion, adsk.cam, traceback, math

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        des = adsk.fusion.Design.cast(app.activeProduct)
        root = des.rootComponent

        joint = root.joints.itemByName('Rev2')
        rev = adsk.fusion.RevoluteJointMotion.cast(joint.jointMotion)
        
        for i in range(360):
            rev.rotationValue = i * (math.pi/180)
            adsk.doEvents()

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
396 Views
0 Replies
Replies (0)