<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Diving motion links to extract transfer function from model in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9448212#M12143</link>
    <description>&lt;P&gt;Hi Brian,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your answer! This is working wonderfully well on your example project and on test project of mine too. Unfortunately, I can't get it too work on the full assembly. I'm attaching a capture of the hierarchy. I verified that the root.name matches ("&lt;FONT&gt;Upper Assembly v1&lt;/FONT&gt;") unfortunately, root.joints.size() is 0 and so &lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: inherit; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: inherit; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;root&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: border-box; color: #999999; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: inherit; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: inherit; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;joints&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: border-box; color: #999999; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: inherit; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: inherit; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;itemByName&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: border-box; color: #999999; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string" style="box-sizing: border-box; color: #669900; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;'Rev5'&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: border-box; color: #999999; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;) &lt;/SPAN&gt;doesn't work. I'm not sure how that's possible. How else could the joints be found?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Martin L.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Apr 2020 16:04:36 GMT</pubDate>
    <dc:creator>martin.lab</dc:creator>
    <dc:date>2020-04-16T16:04:36Z</dc:date>
    <item>
      <title>Diving motion links to extract transfer function from model</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9446416#M12141</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your great work, I really appreciate the tool.&lt;/P&gt;&lt;P&gt;I am working on a model where an electric motor drives an input gear that transmits the motion through other gears and a peg and slot mechanism. This is built as a chain of Motion Links in Fusion360. I am trying to extract the transfer function (input rotation to output rotation of the end effector) of the system to have precise control of the motion with my motor controller (in the physical world). &lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #666666; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Through the python scripted API, I successfully rotated the input component directly or modified the joint angle through a Parameter, but the motion is not being transmitted, so I think that I really need to drive the Motion Link.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I saw a post indicating that motion links are not accessible through the API. If that is still the case (I can't find Motion Links in the API), would there be another way to do this? If I can't drive the motion link through scripting, maybe I could catch events or capture the output joint angle at regular time steps when playing the motion link animation? There might be other ways that I'm not aware of... Some guidance would be much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much for your help,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Martin L.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 00:18:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9446416#M12141</guid>
      <dc:creator>martin.lab</dc:creator>
      <dc:date>2020-04-16T00:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Diving motion links to extract transfer function from model</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9446777#M12142</link>
      <description>&lt;P&gt;It's possible to do what you need.&amp;nbsp; Attached is a very simple assembly with some motion links and one of the joints has been renamed "Drive".&amp;nbsp; It's a revolute type of joint.&amp;nbsp; The code below finds that joint and drives its value.&amp;nbsp; You can see the other parts move because of the motion joints applied.&amp;nbsp; You could also be querying the position of the other parts to determine the impact of setting the value has made.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def run(context):
    app = adsk.core.Application.get()
    ui = app.userInterface
    try:
        design = adsk.fusion.Design.cast(app.activeProduct)
        root = design.rootComponent

        driveJoint = root.joints.itemByName('Drive')
        revMotion = adsk.fusion.RevoluteJointMotion.cast(driveJoint.jointMotion)

        for step in range(360):
            angle = (math.pi / 90) * step
            revMotion.rotationValue = angle
            app.activeViewport.refresh()
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Apr 2020 06:27:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9446777#M12142</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2020-04-16T06:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Diving motion links to extract transfer function from model</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9448212#M12143</link>
      <description>&lt;P&gt;Hi Brian,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your answer! This is working wonderfully well on your example project and on test project of mine too. Unfortunately, I can't get it too work on the full assembly. I'm attaching a capture of the hierarchy. I verified that the root.name matches ("&lt;FONT&gt;Upper Assembly v1&lt;/FONT&gt;") unfortunately, root.joints.size() is 0 and so &lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: inherit; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: inherit; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;root&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: border-box; color: #999999; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: inherit; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: inherit; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;joints&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: border-box; color: #999999; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: inherit; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: inherit; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;itemByName&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: border-box; color: #999999; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string" style="box-sizing: border-box; color: #669900; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;'Rev5'&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: border-box; color: #999999; font-family: Menlo,Monaco,Consolas,&amp;amp;quot; courier new&amp;amp;quot;,monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px;"&gt;) &lt;/SPAN&gt;doesn't work. I'm not sure how that's possible. How else could the joints be found?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Martin L.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 16:04:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9448212#M12143</guid>
      <dc:creator>martin.lab</dc:creator>
      <dc:date>2020-04-16T16:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Diving motion links to extract transfer function from model</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9448331#M12144</link>
      <description>&lt;P&gt;It's hard to tell what's going on just from the picture.&amp;nbsp; Since it's not working there must be something else that's not so obvious.&amp;nbsp; Is it possible for you to send me your design so I can take a closer look?&amp;nbsp; &amp;nbsp;My email is in my signature.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 16:41:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9448331#M12144</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2020-04-16T16:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Diving motion links to extract transfer function from model</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9448838#M12145</link>
      <description>&lt;P&gt;Internally there's a difference between joints that are created using the "Joint" command and the "As-built Joint" command.&amp;nbsp; Unfortunately, they're not displayed any differently in the browser so it's easy to forget how each one was created and what type of joint they really are.&amp;nbsp; In the API they are distinctly different and to get as-built joints you use a different collection.&amp;nbsp; I just changed the following line in my program and then it works with your model.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;driveJoint = root.asBuiltJoints.itemByName('Rev5')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 20:15:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9448838#M12145</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2020-04-16T20:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Diving motion links to extract transfer function from model</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9449079#M12146</link>
      <description>&lt;P&gt;Thank you Brian! That did it, much appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 22:08:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/diving-motion-links-to-extract-transfer-function-from-model/m-p/9449079#M12146</guid>
      <dc:creator>martin.lab</dc:creator>
      <dc:date>2020-04-16T22:08:05Z</dc:date>
    </item>
  </channel>
</rss>

