EvilHacker / BoxJoint

A Fusion 360 Add-In for creating CNC friendly box/finger joints
MIT License
6 stars 0 forks source link

RuntimeError: 3 : Feature does not belong to this component #2

Open deece opened 4 months ago

deece commented 4 months ago

Test Tray v1.zip

Thanks for sharing! I was about to write something similar, so this saved me a heap of work.

My use case is lasercutting, so I can only perform 2D operations. I've attached the project and the settings as images to this issue.

When processing the attached file, I get the following error: EventHandler.notify: Traceback (most recent call last): File "C:\Users/Alastair/AppData/Roaming/Autodesk/ApplicationPlugins/BoxJoint.bundle/Contents\fusion_util.py", line 48, in notify handler(eventArgs) File "C:\Users/Alastair/AppData/Roaming/Autodesk/ApplicationPlugins/BoxJoint.bundle/Contents\fusion_cf_addin.py", line 191, in onPreview self._createCustomFeature(params) File "C:\Users/Alastair/AppData/Roaming/Autodesk/ApplicationPlugins/BoxJoint.bundle/Contents\fusion_cf_addin.py", line 247, in _createCustomFeature customFeature.setStartAndEndFeatures(features[0], features[-1]) File "C:\Users/Alastair/AppData/Local/Autodesk/webdeploy/production/9852aa66f5af6660db76d8087c75a7da16ce322c/Api/Python/packages\adsk\fusion.py", line 62319, in setStartAndEndFeatures return _fusion.CustomFeature_setStartAndEndFeatures(self, startFeature, endFeature) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: 3 : Feature does not belong to this component

EventHandler.notify: Traceback (most recent call last): File "C:\Users/Alastair/AppData/Roaming/Autodesk/ApplicationPlugins/BoxJoint.bundle/Contents\fusion_util.py", line 48, in notify handler(eventArgs) File "C:\Users/Alastair/AppData/Roaming/Autodesk/ApplicationPlugins/BoxJoint.bundle/Contents\fusion_cf_addin.py", line 199, in onExecuteCreate self._createCustomFeature(params) File "C:\Users/Alastair/AppData/Roaming/Autodesk/ApplicationPlugins/BoxJoint.bundle/Contents\fusion_cf_addin.py", line 247, in _createCustomFeature customFeature.setStartAndEndFeatures(features[0], features[-1]) File "C:\Users/Alastair/AppData/Local/Autodesk/webdeploy/production/9852aa66f5af6660db76d8087c75a7da16ce322c/Api/Python/packages\adsk\fusion.py", line 62319, in setStartAndEndFeatures return _fusion.CustomFeature_setStartAndEndFeatures(self, startFeature, endFeature) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: 3 : Feature does not belong to this component

Interestingly enough, the tabs have been created successfully and are available in the timeline. timeline parameters

EvilHacker commented 4 months ago

The Box Joint add-in currently does not work on bodies in different components. The workaround is to add your joints before you separate bodies into different components.

The root cause of this error is comes from the "CustomFeature API" used by the add-in, which does not work on bodies in different components.

Right now, I don’t see a way around this.

Autodesk would have to make their "CustomFeature"s work across different components.

I may have to update the add-in to prevent and warn against use across multiple components.

deece commented 4 months ago

Hmm, I thought I had all the bodies in 1 component. I'll double check next time I boot into Windows.