Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ThroughAllExtentDefinition fails to extrude almost always

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
siliconlad
547 Views, 6 Replies

ThroughAllExtentDefinition fails to extrude almost always

siliconlad
Contributor
Contributor

This might be me not understanding how to use it correctly (I've taken a look at this post, but that didn't help me much).

 

I have created a sketch point, construction plane and circular sketch that is parallel to the face of the cube as shown in the image below. I would like to then run a script which extrudes this sketch through the cube.

 

siliconlad_0-1705070494268.png

 

When I try and use the `ThroughAllExtentDefition`, like below:

 

app = adsk.core.Application.get()
design = adsk.fusion.Design.cast(app.activeProduct)
root = design.rootComponent
extrudes = root.features.extrudeFeatures

extent = adsk.fusion.ThroughAllExtentDefinition.create()
e_input = extrudes.createInput(profile, adsk.fusion.FeatureOperations.CutFeatureOperation)
e_input.setTwoSidesExtent(extent, extent)
extrudes.add(e_input)  # Create extrude

 

It fails with the following error:

Traceback (most recent call last):
  File "C:\Users/angus/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/AddIns/cadify-fusion\commands\agent\operations\helper.py", line 130, in try_op
    f()
  File "C:\Users/angus/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/AddIns/cadify-fusion\commands\agent\operations\extrude.py", line 46, in two_sides_extent
    extrudes.add(e_input)  # Create extrude
    ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/angus/AppData/Local/Autodesk/webdeploy/production/b0c303e70bd97cfdc195adab65922cfeffcb363a/Api/Python/packages\adsk\fusion.py", line 20926, in add
    return _fusion.ExtrudeFeatures_add(self, input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: 5 : EXTRUDE_CREATION_FAIL_ERROR - Cannot complete extrusion.

 

But I can see the extrude in the timeline and when I manually click, 'Edit Feature' then click `Ok` without changing anything it successfully creates the extrude cut.

 

Sometimes I have the sketch on a curved surface like

 

siliconlad_2-1705072081667.png

 

And I get the error

 

Cadify: Failed to execute operation: 2 : InternalValidationError : isCalFarestBody
Traceback (most recent call last):
  File "C:\Users/angus/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/AddIns/cadify-fusion\commands\agent\operations\helper.py", line 130, in try_op
    f()
  File "C:\Users/angus/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/AddIns/cadify-fusion\commands\agent\operations\extrude.py", line 71, in negative_extent
    extrudes.add(e_input)  # Create extrude
    ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/angus/AppData/Local/Autodesk/webdeploy/production/b0c303e70bd97cfdc195adab65922cfeffcb363a/Api/Python/packages\adsk\fusion.py", line 20926, in add
    return _fusion.ExtrudeFeatures_add(self, input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: 2 : InternalValidationError : isCalFarestBody

 

Whereas in all the situations, using the `DistanceExtentDefinition` works perfectly fine. Is there a reason behind this?

1 Like

ThroughAllExtentDefinition fails to extrude almost always

This might be me not understanding how to use it correctly (I've taken a look at this post, but that didn't help me much).

 

I have created a sketch point, construction plane and circular sketch that is parallel to the face of the cube as shown in the image below. I would like to then run a script which extrudes this sketch through the cube.

 

siliconlad_0-1705070494268.png

 

When I try and use the `ThroughAllExtentDefition`, like below:

 

app = adsk.core.Application.get()
design = adsk.fusion.Design.cast(app.activeProduct)
root = design.rootComponent
extrudes = root.features.extrudeFeatures

extent = adsk.fusion.ThroughAllExtentDefinition.create()
e_input = extrudes.createInput(profile, adsk.fusion.FeatureOperations.CutFeatureOperation)
e_input.setTwoSidesExtent(extent, extent)
extrudes.add(e_input)  # Create extrude

 

It fails with the following error:

Traceback (most recent call last):
  File "C:\Users/angus/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/AddIns/cadify-fusion\commands\agent\operations\helper.py", line 130, in try_op
    f()
  File "C:\Users/angus/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/AddIns/cadify-fusion\commands\agent\operations\extrude.py", line 46, in two_sides_extent
    extrudes.add(e_input)  # Create extrude
    ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/angus/AppData/Local/Autodesk/webdeploy/production/b0c303e70bd97cfdc195adab65922cfeffcb363a/Api/Python/packages\adsk\fusion.py", line 20926, in add
    return _fusion.ExtrudeFeatures_add(self, input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: 5 : EXTRUDE_CREATION_FAIL_ERROR - Cannot complete extrusion.

 

But I can see the extrude in the timeline and when I manually click, 'Edit Feature' then click `Ok` without changing anything it successfully creates the extrude cut.

 

Sometimes I have the sketch on a curved surface like

 

siliconlad_2-1705072081667.png

 

And I get the error

 

Cadify: Failed to execute operation: 2 : InternalValidationError : isCalFarestBody
Traceback (most recent call last):
  File "C:\Users/angus/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/AddIns/cadify-fusion\commands\agent\operations\helper.py", line 130, in try_op
    f()
  File "C:\Users/angus/AppData/Roaming/Autodesk/Autodesk Fusion 360/API/AddIns/cadify-fusion\commands\agent\operations\extrude.py", line 71, in negative_extent
    extrudes.add(e_input)  # Create extrude
    ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/angus/AppData/Local/Autodesk/webdeploy/production/b0c303e70bd97cfdc195adab65922cfeffcb363a/Api/Python/packages\adsk\fusion.py", line 20926, in add
    return _fusion.ExtrudeFeatures_add(self, input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: 2 : InternalValidationError : isCalFarestBody

 

Whereas in all the situations, using the `DistanceExtentDefinition` works perfectly fine. Is there a reason behind this?

Labels (1)
6 REPLIES 6
Message 2 of 7
john.kirchner
in reply to: siliconlad

john.kirchner
Autodesk
Autodesk

I'm able to reproduce this issue, it looks like a bug. I've logged this to a ticket to be fixed - thank you for finding and posting this!



3 Likes

I'm able to reproduce this issue, it looks like a bug. I've logged this to a ticket to be fixed - thank you for finding and posting this!



Message 3 of 7
siliconlad
in reply to: john.kirchner

siliconlad
Contributor
Contributor

No worries! Is there a way to track when this gets fixed? 

0 Likes

No worries! Is there a way to track when this gets fixed? 

Message 4 of 7
john.kirchner
in reply to: siliconlad

john.kirchner
Autodesk
Autodesk

We don't have anything public facing but I could see this issue being picked up fairly quickly, so hopefully a fix will be included in the next release. I can post here when that becomes clearer



1 Like

We don't have anything public facing but I could see this issue being picked up fairly quickly, so hopefully a fix will be included in the next release. I can post here when that becomes clearer



Message 5 of 7
siliconlad
in reply to: john.kirchner

siliconlad
Contributor
Contributor

Thank you!

0 Likes

Thank you!

Message 6 of 7
john.kirchner
in reply to: siliconlad

john.kirchner
Autodesk
Autodesk

The fix for this issue will be included in the release towards the end of March, thank you for your patience!



1 Like

The fix for this issue will be included in the release towards the end of March, thank you for your patience!



Message 7 of 7
siliconlad
in reply to: siliconlad

siliconlad
Contributor
Contributor
Accepted solution

Seems to work now!

1 Like

Seems to work now!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report