<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Extrude-Cut in API (and also Interactively) in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-cut-in-api-and-also-interactively/m-p/5847645#M20744</link>
    <description>&lt;P&gt;To perform a cut in the scenerio you're dealing with, you'll need a negative value for the distance. &amp;nbsp;Choosing the cut operation does not automatically flip the positive direction of the extrude to point into the body to be cut.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you should try:&lt;/P&gt;
&lt;PRE&gt;distance = adsk.core.ValueInput.createByReal(-.5);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Happy Coding!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DaVeR&lt;/P&gt;</description>
    <pubDate>Tue, 06 Oct 2015 17:31:02 GMT</pubDate>
    <dc:creator>david_reaume</dc:creator>
    <dc:date>2015-10-06T17:31:02Z</dc:date>
    <item>
      <title>Extrude-Cut in API (and also Interactively)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-cut-in-api-and-also-interactively/m-p/5846371#M20743</link>
      <description>&lt;P&gt;I am writing a simple command, wish takes a profile and calls Extrude-with-Cut-boolean. For this the code I have written is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    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)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interactively also it fails. After searching some posts here, it seems that its bit inconsistent. sometimes&amp;nbsp;it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/192611i73B246AB05DD132D/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="CutFails.png" title="CutFails.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any clues?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2015 05:47:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-cut-in-api-and-also-interactively/m-p/5846371#M20743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-06T05:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extrude-Cut in API (and also Interactively)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-cut-in-api-and-also-interactively/m-p/5847645#M20744</link>
      <description>&lt;P&gt;To perform a cut in the scenerio you're dealing with, you'll need a negative value for the distance. &amp;nbsp;Choosing the cut operation does not automatically flip the positive direction of the extrude to point into the body to be cut.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you should try:&lt;/P&gt;
&lt;PRE&gt;distance = adsk.core.ValueInput.createByReal(-.5);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Happy Coding!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DaVeR&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2015 17:31:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-cut-in-api-and-also-interactively/m-p/5847645#M20744</guid>
      <dc:creator>david_reaume</dc:creator>
      <dc:date>2015-10-06T17:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Extrude-Cut in API (and also Interactively)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-cut-in-api-and-also-interactively/m-p/5848954#M20745</link>
      <description>&lt;P&gt;Perfect!!! Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 11:46:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-cut-in-api-and-also-interactively/m-p/5848954#M20745</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-07T11:46:55Z</dc:date>
    </item>
  </channel>
</rss>

