<?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: face.CalculateFacetsAndTextureMap throw exception in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/face-calculatefacetsandtexturemap-throw-exception/m-p/3922652#M130890</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would need to initialize the input arrays:&amp;nbsp;&lt;A href="http://adndevblog.typepad.com/manufacturing/2013/05/type-mismatch-when-calling-calculatefacetsandtexturemap.html" target="_self"&gt;http://adndevblog.typepad.com/manufacturing/2013/05/type-mismatch-when-calling-calculatefacetsandtexturemap.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
    <pubDate>Tue, 14 May 2013 22:35:42 GMT</pubDate>
    <dc:creator>adam.nagy</dc:creator>
    <dc:date>2013-05-14T22:35:42Z</dc:date>
    <item>
      <title>face.CalculateFacetsAndTextureMap throw exception</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/face-calculatefacetsandtexturemap-throw-exception/m-p/3916643#M130889</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a valid Face from a SurfaceBody, and the call to face.CalculateFacetsAndTextureMap throws the following exception....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[System.Runtime.InteropServices.COMException] = {"Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code I'm using is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                foreach (Face face in surfaceBody.Faces)
                {
                    double tolerance = 0.1;
                    int vertexCount = 0;
                    int facetCount = 0;
                    double[] vertexCoordinates;
                    double[] normalVectors;
                    int[] vertexIndexes;
                    double[] textureCoordinates;
                    face.CalculateFacetsAndTextureMap(tolerance, out vertexCount, out facetCount, out vertexCoordinates, out normalVectors, out  vertexIndexes, out textureCoordinates);
                }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Can anyone guide to me what I am doing wrong pls?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2013 09:56:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/face-calculatefacetsandtexturemap-throw-exception/m-p/3916643#M130889</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2013-05-10T09:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: face.CalculateFacetsAndTextureMap throw exception</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/face-calculatefacetsandtexturemap-throw-exception/m-p/3922652#M130890</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would need to initialize the input arrays:&amp;nbsp;&lt;A href="http://adndevblog.typepad.com/manufacturing/2013/05/type-mismatch-when-calling-calculatefacetsandtexturemap.html" target="_self"&gt;http://adndevblog.typepad.com/manufacturing/2013/05/type-mismatch-when-calling-calculatefacetsandtexturemap.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2013 22:35:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/face-calculatefacetsandtexturemap-throw-exception/m-p/3922652#M130890</guid>
      <dc:creator>adam.nagy</dc:creator>
      <dc:date>2013-05-14T22:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: face.CalculateFacetsAndTextureMap throw exception</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/face-calculatefacetsandtexturemap-throw-exception/m-p/4298543#M130891</link>
      <description>&lt;P&gt;I confirm that this fixes the issue.&amp;nbsp; Thank you so much for taking the time to add a blog entry on this.&amp;nbsp; A reminder for other people implementing this function, the vertex indexes start at 1, not 0 (this is in the documentation, but easy to miss).&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2013 10:41:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/face-calculatefacetsandtexturemap-throw-exception/m-p/4298543#M130891</guid>
      <dc:creator>pfk</dc:creator>
      <dc:date>2013-06-14T10:41:14Z</dc:date>
    </item>
  </channel>
</rss>

