<?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: Sketch.boundingBox is not reporting correctly current sketch boundary box in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6560688#M19352</link>
    <description>&lt;P&gt;Is the sketch2 variable referencing a Sketch? &amp;nbsp;If so, that's not valid input for the project method. &amp;nbsp;I suspect that the project failed so there aren't any offset curves which would result in the min and max points of the bounding box being the same. &amp;nbsp;It's very useful to add a try except statement to all of your functions so that it will be obvious when something fails.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2016 02:51:29 GMT</pubDate>
    <dc:creator>ekinsb</dc:creator>
    <dc:date>2016-09-14T02:51:29Z</dc:date>
    <item>
      <title>Sketch.boundingBox is not reporting correctly current sketch boundary box</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6560681#M19351</link>
      <description>&lt;P&gt;an excerpt from my script:&lt;/P&gt;&lt;PRE&gt;        splineCurves = ag.project(sketch2)
        offsetSplineCurves = do_offset(splineCurves, self.inputs.basic.thickness.value) # local function calls sketch2.offset

        bbox = sketch2.boundingBox
        p0,p1 = bbox.minPoint,bbox.maxPoint
        print((p0.x,p0.y,p0.z),(p1.x,p1.y,p1.z))&lt;BR /&gt;        print(sketch2.healthState, sketch2.isParametric, sketch2.isValid, sketch2.isComputeDeferred)&lt;BR /&gt;
&lt;/PRE&gt;&lt;P&gt;Returns:&lt;/P&gt;&lt;PRE&gt;(-1e+30, -1e+30, -1e+30) (1e+30, 1e+30, 1e+30)&lt;BR /&gt;0 True True False&lt;/PRE&gt;&lt;P&gt;Curiously, if I run another script right after this, that takes the same sketch object as selection, it reports correctly.&lt;/P&gt;&lt;P&gt;I'll try to create an stand alone version of this issue if you cannot repro it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached screenshot.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 02:41:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6560681#M19351</guid>
      <dc:creator>gscotti</dc:creator>
      <dc:date>2016-09-14T02:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch.boundingBox is not reporting correctly current sketch boundary box</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6560688#M19352</link>
      <description>&lt;P&gt;Is the sketch2 variable referencing a Sketch? &amp;nbsp;If so, that's not valid input for the project method. &amp;nbsp;I suspect that the project failed so there aren't any offset curves which would result in the min and max points of the bounding box being the same. &amp;nbsp;It's very useful to add a try except statement to all of your functions so that it will be obvious when something fails.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 02:51:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6560688#M19352</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2016-09-14T02:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch.boundingBox is not reporting correctly current sketch boundary box</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6560758#M19353</link>
      <description>&lt;P&gt;I tried to abstract my wrapper functions to Fusion's API, but failed on comment.&lt;/P&gt;&lt;P&gt;I'm attaching an working example of this failure.&lt;/P&gt;&lt;P&gt;Select the base face from given model and you will see what I was talking about. (look at stdout - I typically type print() at spyder2 console to get stdout flushed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 04:25:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6560758#M19353</guid>
      <dc:creator>gscotti</dc:creator>
      <dc:date>2016-09-14T04:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch.boundingBox is not reporting correctly current sketch boundary box</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6560759#M19354</link>
      <description>&lt;P&gt;Forgot to add initial point to close curve. Here it goes (v2).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 04:30:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6560759#M19354</guid>
      <dc:creator>gscotti</dc:creator>
      <dc:date>2016-09-14T04:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch.boundingBox is not reporting correctly current sketch boundary box</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6563059#M19355</link>
      <description>&lt;P&gt;I'm able to reproduce the problem.&amp;nbsp; It appears to be a general problem with getting the bounding box from sketch geometry and sketches.&amp;nbsp; The only entity that worked correctly for me is sketch lines.&amp;nbsp; All others return the large bounding box that you're seeing.&amp;nbsp; I've file a defect so we can fix it in a future update.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 00:09:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6563059#M19355</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2016-09-15T00:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch.boundingBox is not reporting correctly current sketch boundary box</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6563156#M19356</link>
      <description>&lt;P&gt;Thanks for replying. I have two more bugs to report.&lt;/P&gt;&lt;P&gt;First, if you get my script and change line #115 moving it to after component creation, selection is gone!&lt;/P&gt;&lt;PRE&gt;        # create new component
        parent = design.rootComponent
        occurrence = parent.occurrences.addNewComponent(core.Matrix3D.create())
        component = occurrence.component

        # take selected face
        face = self.selectionInput.selection(0).entity&lt;/PRE&gt;&lt;P&gt;Second is, if you create a rectangle with large dimensions - i.e., same dimensions as reported by boudingBox, whole Fusion 360 app goes crazy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 01:57:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6563156#M19356</guid>
      <dc:creator>gscotti</dc:creator>
      <dc:date>2016-09-15T01:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch.boundingBox is not reporting correctly current sketch boundary box</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6564484#M19357</link>
      <description>&lt;P&gt;The first issue isn't a bug but a result of Fusion's behavior. &amp;nbsp;Selections are relatively fragile and if you do something to change the model they will be cleared. &amp;nbsp;To work around this behavior in your example, you can first get the selection and save the reference in a variable, create the component, and then do whatever you intended to do with the selected entity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the second issue, it doesn't surprise me. &amp;nbsp;There are limitations, both with very very small and large objects. &amp;nbsp;This is because of&amp;nbsp;how the modeling kernel is implemented and also&amp;nbsp;as a result of how floating point math is done on a computer.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 15:15:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/sketch-boundingbox-is-not-reporting-correctly-current-sketch/m-p/6564484#M19357</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2016-09-15T15:15:09Z</dc:date>
    </item>
  </channel>
</rss>

