Message 1 of 3
Not applicable
10-05-2015
10:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am writing a simple command, wish takes a profile and calls Extrude-with-Cut-boolean. For this the code I have written is:
def Execute(self, selectedProfile):
if not isinstance(selectedProfile,adsk.fusion.Profile):
return;
app = adsk.core.Application.get();
doc = app.activeDocument
d = doc.design
rootComp = d.rootComponent
extrudes = rootComp.features.extrudeFeatures
extrudeInput = extrudes.createInput(selectedProfile, adsk.fusion.FeatureOperations.CutFeatureOperation)
distance = adsk.core.ValueInput.createByReal(.5);
extrudeInput.setDistanceExtent(False, distance);
extrude = extrudes.add(extrudeInput)
But it fails saying that, 'No body to intersect/cut' was found. But I had drawn cut-profile-sketch on a face of a body. That body should have been the obvious choice to cut with the computed tool-body.
Interactively also it fails. After searching some posts here, it seems that its bit inconsistent. sometimes it works.
Any clues?
Solved! Go to Solution.