- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
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
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?
Solved! Go to Solution.