Dogbone
Dogbone copied to clipboard
ASM_NON_POS_HEIGHT - Unable to create hole
Looks like the hole height can become negative. Maybe a abs()
call is missing.
2023-09-18 23:39:08,999 ; dogbone.decorators ; ERROR ; 104; onExecute_handler error termination
Traceback (most recent call last):
File "/Users/tony/Development/fusion/Dogbone/decorators.py", line 101, in notify
notify_method(*handler_args, eventArgs) #notify_method_self and eventArgs come from the parent scope
File "/Users/tony/Development/fusion/Dogbone/Dogbone.py", line 663, in onExecute
self.createParametricDogbones()
File "/Users/tony/Development/fusion/Dogbone/Dogbone.py", line 950, in createParametricDogbones
holeFeature = holes.add(holeInput)
File "/Users/tony/Library/Application Support/Autodesk/webdeploy/production/11650a4fd9d0112afa52b46657568607d12a76aa/Autodesk Fusion 360.app/Contents/Api/Python/packages/adsk/fusion.py", line 23780, in add
return _fusion.HoleFeatures_add(self, input)
RuntimeError: 5 : ASM_NON_POS_HEIGHT - Unable to create hole.
Height was negative or zero.
Modeling Error: Can't create hole toolbody, please check inputs
Can you send me your model, or at least a subset that exhibits the same error. I’ve had situations where the fusion coordinate system has been confused, so that a direction into a body actually goes out. It's fixable, but I need to see an example.
Peter
Get Outlook for iOShttps://aka.ms/o0ukef
From: Tony Findeisen @.> Sent: Monday, September 18, 2023 5:41:40 PM To: DVE2000/Dogbone @.> Cc: Subscribed @.***> Subject: [DVE2000/Dogbone] ASM_NON_POS_HEIGHT - Unable to create hole (Issue #59)
Looks like the hole height can become negative. Maybe a abs() call is missing.
2023-09-18 23:39:08,999 ; dogbone.decorators ; ERROR ; 104; onExecute_handler error termination Traceback (most recent call last): File "/Users/tony/Development/fusion/Dogbone/decorators.py", line 101, in notify notify_method(*handler_args, eventArgs) #notify_method_self and eventArgs come from the parent scope File "/Users/tony/Development/fusion/Dogbone/Dogbone.py", line 663, in onExecute self.createParametricDogbones() File "/Users/tony/Development/fusion/Dogbone/Dogbone.py", line 950, in createParametricDogbones holeFeature = holes.add(holeInput) File "/Users/tony/Library/Application Support/Autodesk/webdeploy/production/11650a4fd9d0112afa52b46657568607d12a76aa/Autodesk Fusion 360.app/Contents/Api/Python/packages/adsk/fusion.py", line 23780, in add return _fusion.HoleFeatures_add(self, input) RuntimeError: 5 : ASM_NON_POS_HEIGHT - Unable to create hole. Height was negative or zero. Modeling Error: Can't create hole toolbody, please check inputs
— Reply to this email directly, view it on GitHubhttps://github.com/DVE2000/Dogbone/issues/59, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBJGTBMEGOMSXBH5WAYOQLX3C5ZJANCNFSM6AAAAAA45LB6LY. You are receiving this because you are subscribed to this thread.Message ID: @.***>
2023-09-18 23:39:08,981 ; dogbone ; INFO ; 825; Processing holes from top face - Body1
2023-09-18 23:39:08,981 ; dogbone ; DEBUG ; 836; Processing Face = 269
2023-09-18 23:39:08,981 ; dogbone ; DEBUG ; 840; topFace type <class 'adsk.fusion.BRepFace'>
2023-09-18 23:39:08,981 ; dogbone ; DEBUG ; 847; topFace isValid = True
2023-09-18 23:39:08,981 ; dogbone ; DEBUG ; 849; creating transformVector to topFace = (0.0,0.0,0.0) length = 0.0
2023-09-18 23:39:08,981 ; dogbone ; DEBUG ; 853; Processing edge - 289
2023-09-18 23:39:08,981 ; dogbone ; DEBUG ; 877; extentToEntity - True
2023-09-18 23:39:08,984 ; dogbone ; DEBUG ; 925; centrePoint = (-68.54887781622826,1.5,-56.43573053892168)
2023-09-18 23:39:08,984 ; dogbone ; DEBUG ; 929; centrePoint at topFace = (-68.54887781622826, 1.5, -56.43573053892168)
2023-09-18 23:39:08,984 ; dogbone ; DEBUG ; 944; extentToEntity before setPositionByPlaneAndOffsets - True
2023-09-18 23:39:08,984 ; dogbone ; DEBUG ; 946; extentToEntity after setPositionByPlaneAndOffsets - True
2023-09-18 23:39:08,984 ; dogbone ; INFO ; 948; hole added to list - (-68.54887781622826, 1.5, -56.43573053892168)
Hi Tony,
I've tried to recreate your issue on my test model, and unfortunately, I can't reproduce it. I need a copy of your model - which you can get by using the file|export feature in the top menu bar. You can send it to me directly to peter at ludikar dot com. If you have a subset of the model that would be even better. Alternatively, you can send me a screen grab, but a model would be preferable.
Peter
From: Tony Findeisen @.> Sent: September 18, 2023 5:48 PM To: DVE2000/Dogbone @.> Cc: Peter Ludikar @.>; Comment @.> Subject: Re: [DVE2000/Dogbone] ASM_NON_POS_HEIGHT - Unable to create hole (Issue #59)
2023-09-18 23:39:08,981 ; dogbone ; INFO ; 825; Processing holes from top face - Body1 2023-09-18 23:39:08,981 ; dogbone ; DEBUG ; 836; Processing Face = 269 2023-09-18 23:39:08,981 ; dogbone ; DEBUG ; 840; topFace type <class 'adsk.fusion.BRepFace'> 2023-09-18 23:39:08,981 ; dogbone ; DEBUG ; 847; topFace isValid = True 2023-09-18 23:39:08,981 ; dogbone ; DEBUG ; 849; creating transformVector to topFace = (0.0,0.0,0.0) length = 0.0 2023-09-18 23:39:08,981 ; dogbone ; DEBUG ; 853; Processing edge - 289 2023-09-18 23:39:08,981 ; dogbone ; DEBUG ; 877; extentToEntity - True 2023-09-18 23:39:08,984 ; dogbone ; DEBUG ; 925; centrePoint = (-68.54887781622826,1.5,-56.43573053892168) 2023-09-18 23:39:08,984 ; dogbone ; DEBUG ; 929; centrePoint at topFace = (-68.54887781622826, 1.5, -56.43573053892168) 2023-09-18 23:39:08,984 ; dogbone ; DEBUG ; 944; extentToEntity before setPositionByPlaneAndOffsets - True 2023-09-18 23:39:08,984 ; dogbone ; DEBUG ; 946; extentToEntity after setPositionByPlaneAndOffsets - True 2023-09-18 23:39:08,984 ; dogbone ; INFO ; 948; hole added to list - (-68.54887781622826, 1.5, -56.43573053892168)
— Reply to this email directly, view it on GitHubhttps://github.com/DVE2000/Dogbone/issues/59#issuecomment-1724503504, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBJGTE2W3XIEXTTUTOYMALX3C6THANCNFSM6AAAAAA45LB6LY. You are receiving this because you commented.Message ID: @.***>
I removed everything that was in the way. Please try with this file to create a dogbone on this body
Thanks
Hi Tony,
I've had a quick look at your model, and I can see the problem. Unfortunately, I think it's going to take a while to resolve from my end to make it work with models using your approach. I think part of the problem is you have multiple bodies in a component, and those bodies have been moved from their origin.
If you activate the dogbone app, select one of the bodies in "fuss" and create a static dogbone - it will seem to have successfully created the dogbones, but they don't actually appear in the model.
- right click on the timeline object that created the dogbones (blue combine icon)
- select edit feature
The dogbone feature tool will appear in red - it's nowhere near the body that was clicked That means the detected coordinates of the edges are different to underlying model. That's the issue which may take a while to fix.
However, if you change your workflow a bit you can avoid this problem. I partly blame F360 for making this difficult.
My suggestion is: always have a 1:1 relationship between bodies and components. If you want to build a table with 4 legs, 4 aprons/stretchers and a split tabletop then create 10 components right at the start of the model development (one F360 component for each table component. For each table component:
- name the component (eg leg)
- activate the component (button to right of component in browser tree)
- create your body (you can use a common sketch as a profile, or make the body using the box/cylinder/sphere native bodies
if, for example, you want 4 identical legs - you can copy the leg component (not the body) then paste 3 more times. Being aware of which component is Active is critical because if the leg is active and you paste directly, the newly pasted legs will become sub-assemblies of the 1st leg - better to activate the main component at the top of the tree!!
However, you can also create a table component, and create sub-assemblies (e.g. legs, aprons etc.) inside that table component.
The question then is how do you place/locate everything in relation to each other? - the answer is joints! Press "J" on the keyboard / or select joint from the assemble menu dropdown. Select the 1st snap point on the leg (eg) select the 2nd snap point on the table top - adjust offsets as needed
Once you have all components "joined" together - you can then move any component by simply click and drag.
The advantage then is you can make a copy of the table subassemblies - and place them in a new component called "build" which will then allow you to reconfigure the sub-assemblies so they are lying on the same plane. I do this prior to nesting for my CNC because I haven't paid for the full F360 version which has nesting built-in.
If you would like, send me your full model (via my email I gave earlier if you want to protect your design), I would be happy to re-configure your model using the above principles so you can see what it should look like - you'll find it much, much easier to develop models in future
Peter
From: Tony Findeisen @.> Sent: September 19, 2023 3:46 AM To: DVE2000/Dogbone @.> Cc: Peter Ludikar @.>; Comment @.> Subject: Re: [DVE2000/Dogbone] ASM_NON_POS_HEIGHT - Unable to create hole (Issue #59)
I removed everything that was in the way. Please try with this filehttps://github.com/DVE2000/Dogbone/files/12657160/dogbone.problem.f3d.zip to create a dogbone on this body [image]https://user-images.githubusercontent.com/1348987/268879076-2a87189d-5cb7-4eec-b5f0-97bc465de582.png
Thanks
— Reply to this email directly, view it on GitHubhttps://github.com/DVE2000/Dogbone/issues/59#issuecomment-1724995100, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBJGTD4YSUSTMZ3VEHKVQTX3FEVDANCNFSM6AAAAAA45LB6LY. You are receiving this because you commented.Message ID: @.***>
Hi Peter,
thanks for taking your time. I'm aware of joints and I didn't move the bodies. When designing, I'm sketching within a component and sometimes do e.g. 2 extractions one for the left and right leg then one for a part that combines left and right. I have 3 distinct bodies in one component. I can create components from them afterwards and join them as build join.
For nesting all bodies needs to be components so fusion can modify the individual positions. But before that, converting everything to a component and then join them seems like a not necessary step, esp. if the bodies cannot move individually.
I think what would help, also from the workflow, is that if dogbones can be created also in manufacture models. Since manufacture models are a thing, my workflow has been always, create e.g. a the furniture, go to manufacture and create a manufacture models. Create components from all bodies, so that each component only contains one body. Nest it with the arrange tool, so it's flat for CNC machining.
Now, this would be the ideal time to add dogbones as they're basically something you need only for machining the parts. I've seen that the command is not available in the manufacture space and I think this is only as it has a different api to register the command. Beside registering the rest should be the same, e.g. it's parametric, you have a history, etc.
If I'm correct, the nifty dogbone plugin is/was available in the manufacture space. So I really think it's a matter of the script registering the command.
Hi Tony,
Dogbones are already in the manufacturing workspace. if you create a manufacturing model then edit it - it'll be there on the right of the create panel.
There's definitely something going on - I'm getting some crazy coordinate offsets. Even the tools created for your mortices are ending up in odd places. I'm going to have to do some deeper digging to see what's going on.
I didn't do too much regression testing on my last update - I'll need to check to see if there's something I've done too.
Peter
From: Tony Findeisen @.> Sent: September 19, 2023 3:24 PM To: DVE2000/Dogbone @.> Cc: Peter Ludikar @.>; Comment @.> Subject: Re: [DVE2000/Dogbone] ASM_NON_POS_HEIGHT - Unable to create hole (Issue #59)
Hi Peter,
thanks for taking your time. I'm aware of joints and I didn't move the bodies. When designing, I'm sketching within a component and sometimes do e.g. 2 extractions one for the left and right leg then one for a part that combines left and right. I have 3 distinct bodies in one component. I can create components from them afterwards and join them as build join.
For nesting all bodies needs to be components so fusion can modify the individual positions. But before that, converting everything to a component and then join them seems like a not necessary step, esp. if the bodies cannot move individually.
I think what would help, also from the workflow, is that if dogbones can be created also in manufacture models. Since manufacture models are a thing, my workflow has been always, create e.g. a the furniture, go to manufacture and create a manufacture models. Create components from all bodies, so that each component only contains one body. Nest it with the arrange tool, so it's flat for CNC machining.
Now, this would be the ideal time to add dogbones as they're basically something you need only for machining the parts. I've seen that the command is not available in the manufacture space and I think this is only as it has a different api to register the command. Beside registering the rest should be the same, e.g. it's parametric, you have a history, etc.
If I'm correct, the nifty dogbone pluginhttps://apps.autodesk.com/FUSION/de/Detail/Index?id=3534533763590670806&appLang=en&os=Mac is/was available in the manufacture space. So I really think it's a matter of the script registering the command.
— Reply to this email directly, view it on GitHubhttps://github.com/DVE2000/Dogbone/issues/59#issuecomment-1726345807, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBJGTFKDXZ4VEWFW53ASPTX3HWNLANCNFSM6AAAAAA45LB6LY. You are receiving this because you commented.Message ID: @.***>
Hi Peter,
found the code place and also the command in the manufacture workspace. With a super simple example, it breaks the UI.
After I press okay, please see the toolbar.
CMD+Z to the rescue, restores it. Here is the file, I hope you can reproduce. I'm using the master branch of this repo. manufactor_toolbar_bug.f3d.zip
I'm beginning to suspect that I may have broken something with my last update. I'm checking older versions now - will let you know.
Peter
From: Tony Findeisen @.> Sent: September 19, 2023 5:25 PM To: DVE2000/Dogbone @.> Cc: Peter Ludikar @.>; Comment @.> Subject: Re: [DVE2000/Dogbone] ASM_NON_POS_HEIGHT - Unable to create hole (Issue #59)
Hi Peter,
found the code place and also the command in the manufacture workspace. With a super simple example, it breaks the UI.
[image]https://user-images.githubusercontent.com/1348987/269098638-fe5ed7e2-f6d5-419b-8bd2-a4ab36487704.png After I press okay, please see the toolbar. [image]https://user-images.githubusercontent.com/1348987/269098685-ce380ab2-e87f-4b3f-803a-42a0f187de50.png
CMD+Z to the rescue, restores it. Here is the file, I hope you can reproduce. I'm using the master branch of this repo. manufactor_toolbar_bug.f3d.ziphttps://github.com/DVE2000/Dogbone/files/12666518/manufactor_toolbar_bug.f3d.zip
— Reply to this email directly, view it on GitHubhttps://github.com/DVE2000/Dogbone/issues/59#issuecomment-1726522624, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBJGTHSJ7WUVOSIOAHTPDDX3IEUJANCNFSM6AAAAAA45LB6LY. You are receiving this because you commented.Message ID: @.***>
Hi Tony,
Which version of F360 are you using? I'm on the latest insider version, it just updated and I'm not sure if it's released to the public yet.
I can get the dogbones to work in manufacturing, but there's definitely a problem, even with an older version of my app. After applying the dogbones in manufacturing, it appears to create the combination icon successfully, but the dogbones don't appear. However, if I open the feature in edit and then simply close it, the dogbones appear. If I then roll the timeline back and attempt to delete the Db feature F360 doesn't like it and crashes. Never did that before - and my app has been going without any reported errors for months now. I'm now suspecting that the underlying API has changed and is affecting the code.
I'll do more digging to see if I can isolate an issue.
Thanks for your patience - I apologise if I sometimes appear to teach grandmother to suck eggs. It's hard to gauge the proficiency of people just through a few messages.
Peter
From: Tony Findeisen @.> Sent: September 19, 2023 5:25 PM To: DVE2000/Dogbone @.> Cc: Peter Ludikar @.>; Comment @.> Subject: Re: [DVE2000/Dogbone] ASM_NON_POS_HEIGHT - Unable to create hole (Issue #59)
Hi Peter,
found the code place and also the command in the manufacture workspace. With a super simple example, it breaks the UI.
[image]https://user-images.githubusercontent.com/1348987/269098638-fe5ed7e2-f6d5-419b-8bd2-a4ab36487704.png After I press okay, please see the toolbar. [image]https://user-images.githubusercontent.com/1348987/269098685-ce380ab2-e87f-4b3f-803a-42a0f187de50.png
CMD+Z to the rescue, restores it. Here is the file, I hope you can reproduce. I'm using the master branch of this repo. manufactor_toolbar_bug.f3d.ziphttps://github.com/DVE2000/Dogbone/files/12666518/manufactor_toolbar_bug.f3d.zip
— Reply to this email directly, view it on GitHubhttps://github.com/DVE2000/Dogbone/issues/59#issuecomment-1726522624, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBJGTHSJ7WUVOSIOAHTPDDX3IEUJANCNFSM6AAAAAA45LB6LY. You are receiving this because you commented.Message ID: @.***>
Thanks for your patience - I apologise if I sometimes appear to teach grandmother to suck eggs. It's hard to gauge the proficiency of people just through a few messages.
No worries, I'm glad that you're so supportive and provide this plugin. As I'm a developer I'm naturally want to help out, contribute and improve things. That's also, why you find my 1st PR.
I also wanted to discuss with you a potentially work-a-round for updating dogbones on design changes. Let me know, if you have time for this and I can create a new issue, where we discuss the idea.
I’m very happy to collaborate with anyone who’s interested. I’m also retired, so, in principle, I have time to explore and try out any idea although my better half does expect me to continue going through the long and never ending to do list. I still have a major renovation to complete that started before the pandemic shutdown.
Get Outlook for iOShttps://aka.ms/o0ukef
From: Tony Findeisen @.> Sent: Wednesday, September 20, 2023 3:18:12 AM To: DVE2000/Dogbone @.> Cc: Peter Ludikar @.>; Comment @.> Subject: Re: [DVE2000/Dogbone] ASM_NON_POS_HEIGHT - Unable to create hole (Issue #59)
Thanks for your patience - I apologise if I sometimes appear to teach grandmother to suck eggs. It's hard to gauge the proficiency of people just through a few messages.
No worries, I'm glad that you're so supportive and provide this plugin. As I'm a developer I'm naturally want to help out, contribute and improve things. That's also, why you find my 1st PRhttps://github.com/DVE2000/Dogbone/pull/60.
I also wanted to discuss with you a potentially work-a-round for updating dogbones on design changes. Let me know, if you have time for this and I can create a new issue, where we discuss the idea.
— Reply to this email directly, view it on GitHubhttps://github.com/DVE2000/Dogbone/issues/59#issuecomment-1727110912, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBJGTBZQ6YZZM2L5RKHCWLX3KKDJANCNFSM6AAAAAA45LB6LY. You are receiving this because you commented.Message ID: @.***>
Hi Tony, After a bit of investigating, I've found that F360 definitely misbehaves with mirrored components. Even though I create the dogbone tools in the nativeObject space of the bodies, and combine the tools in the same nativeObject space of the target, the mirrored component dogbones end up back in the same space as the original (pre-mirrored component), but also on the opposite side of the X-Y plane (so they've flipped Z co-ordinates, and haven't flipped X and Y when they should've). There are probably other instances when this seems to happen. I can't get it to do the same if I create tools manually and combine. I've had my f360 crash several times while investigating this.
I suspect F360 has screwed up the API in one of their updates. I'm going to go on the forum and see what comes of that - I had a similar issue a few years ago, and it took them months to correct it. Last time it was easier to demonstrate, this time I suspect they'll come back and say it's my code. So, I'll have to pare down the code to the essentials - it's going to take a while I think.
BTW I've merged you PR back into the master - thank you
Peter
From: Tony Findeisen @.> Sent: September 20, 2023 3:18 AM To: DVE2000/Dogbone @.> Cc: Peter Ludikar @.>; Comment @.> Subject: Re: [DVE2000/Dogbone] ASM_NON_POS_HEIGHT - Unable to create hole (Issue #59)
Thanks for your patience - I apologise if I sometimes appear to teach grandmother to suck eggs. It's hard to gauge the proficiency of people just through a few messages.
No worries, I'm glad that you're so supportive and provide this plugin. As I'm a developer I'm naturally want to help out, contribute and improve things. That's also, why you find my 1st PRhttps://github.com/DVE2000/Dogbone/pull/60.
I also wanted to discuss with you a potentially work-a-round for updating dogbones on design changes. Let me know, if you have time for this and I can create a new issue, where we discuss the idea.
— Reply to this email directly, view it on GitHubhttps://github.com/DVE2000/Dogbone/issues/59#issuecomment-1727110912, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBJGTBZQ6YZZM2L5RKHCWLX3KKDJANCNFSM6AAAAAA45LB6LY. You are receiving this because you commented.Message ID: @.***>
Hi Peter,
After a bit of investigating, I've found that F360 definitely misbehaves with mirrored components I was checking my design. I didn't mirror the component, but was rotating them. I think the best, is if I share the original design with you so you can take a look. From this we can derive a simple set.
Please share your mail address or tell me how I can get the design to you.
I've had my f360 crash several times while investigating this. This is the worst part.
I once found a way of how to change the code while keeping the add-in active, so you don't have to stop & run the extension again. This speed up my debugging. If you're interested and can make the required adjustments to the plugin in a separate PR. Basically the code for calculating needs to be in a separate module and before the calculation is done the module needs to be reloaded.
import importlib
importlib.reload(module)
Hi Tony,
Apart from issue with mirrored components, the dogbones appear to work as I expect, except on the original model you sent me. Could you send me a copy of the full model, so I can step through the timeline and investigate a bit deeper. It feels like your model has corrupted, but I can't be 100% sure.
Peter
From: Tony Findeisen @.> Sent: September 20, 2023 4:06 PM To: DVE2000/Dogbone @.> Cc: Peter Ludikar @.>; Comment @.> Subject: Re: [DVE2000/Dogbone] ASM_NON_POS_HEIGHT - Unable to create hole (Issue #59)
Hi Peter,
After a bit of investigating, I've found that F360 definitely misbehaves with mirrored components I was checking my design. I didn't mirror the component, but was rotating them. I think the best, is if I share the original design with you so you can take a look. From this we can derive a simple set.
I've had my f360 crash several times while investigating this. This is the worst part.
I once found a way of how to change the code while keeping the add-in active, so you don't have to stop & run the extension again. This speed up my debugging. If you're interested and can make the required adjustments to the plugin in a separate PR. Basically the code for calculating needs to be in a separate module and before the calculation is done the module needs to be reloaded.
import importlib importlib.reload(module)
— Reply to this email directly, view it on GitHubhttps://github.com/DVE2000/Dogbone/issues/59#issuecomment-1728355696, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBJGTBFIZICUDYKIJVMICLX3NEFJANCNFSM6AAAAAA45LB6LY. You are receiving this because you commented.Message ID: @.***>