<?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 How to facet AcDbSubDMesh objects? in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-facet-acdbsubdmesh-objects/m-p/3438699#M14813</link>
    <description>&lt;P&gt;AcDbSubDMesh objects are produced by the MESH command in autocad 2010 upwards. I wonder if anyone can let me know how to get at the underlying geometry of the object, to produce an array of triangles or polygons representing the object?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Malcolm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 May 2012 12:02:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-05-01T12:02:46Z</dc:date>
    <item>
      <title>How to facet AcDbSubDMesh objects?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-facet-acdbsubdmesh-objects/m-p/3438699#M14813</link>
      <description>&lt;P&gt;AcDbSubDMesh objects are produced by the MESH command in autocad 2010 upwards. I wonder if anyone can let me know how to get at the underlying geometry of the object, to produce an array of triangles or polygons representing the object?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Malcolm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2012 12:02:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-facet-acdbsubdmesh-objects/m-p/3438699#M14813</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-01T12:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to facet AcDbSubDMesh objects?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-facet-acdbsubdmesh-objects/m-p/3440119#M14814</link>
      <description>&lt;P&gt;What about using method explode of class AcDbSubDMesh?&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2012 04:54:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-facet-acdbsubdmesh-objects/m-p/3440119#M14814</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2012-05-02T04:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to facet AcDbSubDMesh objects?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-facet-acdbsubdmesh-objects/m-p/3440405#M14815</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have just written a blog post that also might be of help:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/autocad/2012/05/facet-subd-mesh.html" target="_self"&gt;http://adndevblog.typepad.com/autocad/2012/05/facet-subd-mesh.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Adam Nagy&lt;/P&gt;
&lt;P&gt;Autodesk Developer Network&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2012 10:29:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-facet-acdbsubdmesh-objects/m-p/3440405#M14815</guid>
      <dc:creator>adam.nagy</dc:creator>
      <dc:date>2012-05-02T10:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to facet AcDbSubDMesh objects?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-facet-acdbsubdmesh-objects/m-p/3440417#M14816</link>
      <description>&lt;P&gt;Ah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I can answer my own question. &amp;nbsp;There seem to be a couple of ways to go. &amp;nbsp;The first is pretty direct:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Given an&amp;nbsp;AcDbEntity *pEnt pointer:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcDbSubDMesh *pMesh=(AcDbSubDMesh *)pEnt;&lt;/P&gt;&lt;P&gt;AcGePoint3dArray vertexArray;&lt;BR /&gt;AcArray&amp;lt;Adesk::Int32&amp;gt; faceArray;&lt;/P&gt;&lt;P&gt;Acad::ErrorStatus es = pMesh-&amp;gt;getFaceArray(faceArray);&lt;BR /&gt;if(es==Acad::eOk){&lt;BR /&gt;es=pMesh-&amp;gt;getVertices(vertexArray);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then walk through the faceArray and Vertex array to extract the geometry. &amp;nbsp;The above however doesn't do any smoothing, so that you end up with a large number of elements even for simple geometry. &amp;nbsp;For example, for a simple default cube, this gives 54 (or 56 can't quite remember) faces. &amp;nbsp;I don't know if someone has any suggestions on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to reduce the face count, all I can come up with is to go via a solid, and choosing the appropriate &amp;nbsp;bConvertAsSmooth and&amp;nbsp;optimize flags:&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcDbSubDMesh *pMesh=(AcDbSubDMesh *)pEnt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcDb3dSolid *pSolid=NULL;&lt;BR /&gt;pMesh-&amp;gt;convertToSolid(false,true,pSolid);&lt;/P&gt;&lt;P&gt;if(pMesh!=NULL){&lt;/P&gt;&lt;P&gt;&amp;nbsp; AcDbFaceterSettings faceter;&lt;BR /&gt;&amp;nbsp; AcGePoint3dArray vertexArray;&lt;/P&gt;&lt;P&gt;&amp;nbsp; AcArray&amp;lt;Adesk::Int32&amp;gt; faceArray;&lt;BR /&gt;&amp;nbsp; AcGiFaceData* faceData=NULL;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Acad::ErrorStatus es=acdbGetObjectMesh(pSolid,&amp;amp;faceter,vertexArray,faceArray,faceData);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Going via a solid seems to be clumsy and so I'd be interested in any comments!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2012 10:41:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-facet-acdbsubdmesh-objects/m-p/3440417#M14816</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-02T10:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to facet AcDbSubDMesh objects?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-facet-acdbsubdmesh-objects/m-p/3440459#M14817</link>
      <description>&lt;P&gt;Adam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for that - very helpful - saw it just after I'd posted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you offer anything on the smoothing/welding issue to reduce the face count for simple geometry?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Malcolm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2012 11:37:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-facet-acdbsubdmesh-objects/m-p/3440459#M14817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-02T11:37:02Z</dc:date>
    </item>
  </channel>
</rss>

