<?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 create multi patch geometry from triangle-mesh coordinates using ArcPy in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/how-to-create-multi-patch-geometry-from-triangle/m-p/1483979#M7066</link>
    <description>&lt;P&gt;Any help to convert this AtcObjects code to ArcPy code?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;public static IGeometry ConstructMultiPatchGeometryByTriangles(List&amp;lt;XPoint3D[]&amp;gt; mesh)&lt;BR /&gt;{&lt;BR /&gt;IGeometry unionedGeom = null;&lt;BR /&gt;ITopologicalOperator unionedOp = null;&lt;/P&gt;&lt;P&gt;if (mesh != null)&lt;BR /&gt;{&lt;BR /&gt;IGeometryCollection multiPatchGeometryCollection = new MultiPatchClass();&lt;BR /&gt;IMultiPatch multiPatch = multiPatchGeometryCollection as IMultiPatch;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for (int i = 0; i &amp;lt; mesh.Count; i++)&lt;BR /&gt;{&lt;BR /&gt;var triangle = mesh[i];&lt;BR /&gt;var firstPoint = triangle[0];&lt;BR /&gt;var secondPoint = triangle[1];&lt;BR /&gt;var thirdPoint = triangle[2];&lt;/P&gt;&lt;P&gt;IPointCollection TriangleStrip = new TriangleStripClass();&lt;/P&gt;&lt;P&gt;TriangleStrip.AddPoint(ConstructPoint3D(firstPoint.X, firstPoint.Y, firstPoint.Z), ref _missing, ref _missing);&lt;BR /&gt;TriangleStrip.AddPoint(ConstructPoint3D(secondPoint.X, secondPoint.Y, secondPoint.Z), ref _missing, ref _missing);&lt;BR /&gt;TriangleStrip.AddPoint(ConstructPoint3D(thirdPoint.X, thirdPoint.Y, thirdPoint.Z), ref _missing, ref _missing);&lt;/P&gt;&lt;P&gt;multiPatchGeometryCollection.AddGeometry(TriangleStrip as IGeometry, ref _missing, ref _missing);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;var _geometry = multiPatch as IGeometry;&lt;/P&gt;&lt;P&gt;if (unionedGeom == null)&lt;BR /&gt;{&lt;BR /&gt;unionedGeom = _geometry;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;unionedOp = (ITopologicalOperator)unionedGeom;&lt;/P&gt;&lt;P&gt;unionedGeom = unionedOp.Union(_geometry);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return unionedGeom;&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jun 2024 07:04:28 GMT</pubDate>
    <dc:creator>IbrahimMassoudWGS84</dc:creator>
    <dc:date>2024-06-04T07:04:28Z</dc:date>
    <item>
      <title>How to create multi patch geometry from triangle-mesh coordinates using ArcPy</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-create-multi-patch-geometry-from-triangle/m-p/1483979#M7066</link>
      <description>&lt;P&gt;Any help to convert this AtcObjects code to ArcPy code?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;public static IGeometry ConstructMultiPatchGeometryByTriangles(List&amp;lt;XPoint3D[]&amp;gt; mesh)&lt;BR /&gt;{&lt;BR /&gt;IGeometry unionedGeom = null;&lt;BR /&gt;ITopologicalOperator unionedOp = null;&lt;/P&gt;&lt;P&gt;if (mesh != null)&lt;BR /&gt;{&lt;BR /&gt;IGeometryCollection multiPatchGeometryCollection = new MultiPatchClass();&lt;BR /&gt;IMultiPatch multiPatch = multiPatchGeometryCollection as IMultiPatch;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for (int i = 0; i &amp;lt; mesh.Count; i++)&lt;BR /&gt;{&lt;BR /&gt;var triangle = mesh[i];&lt;BR /&gt;var firstPoint = triangle[0];&lt;BR /&gt;var secondPoint = triangle[1];&lt;BR /&gt;var thirdPoint = triangle[2];&lt;/P&gt;&lt;P&gt;IPointCollection TriangleStrip = new TriangleStripClass();&lt;/P&gt;&lt;P&gt;TriangleStrip.AddPoint(ConstructPoint3D(firstPoint.X, firstPoint.Y, firstPoint.Z), ref _missing, ref _missing);&lt;BR /&gt;TriangleStrip.AddPoint(ConstructPoint3D(secondPoint.X, secondPoint.Y, secondPoint.Z), ref _missing, ref _missing);&lt;BR /&gt;TriangleStrip.AddPoint(ConstructPoint3D(thirdPoint.X, thirdPoint.Y, thirdPoint.Z), ref _missing, ref _missing);&lt;/P&gt;&lt;P&gt;multiPatchGeometryCollection.AddGeometry(TriangleStrip as IGeometry, ref _missing, ref _missing);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;var _geometry = multiPatch as IGeometry;&lt;/P&gt;&lt;P&gt;if (unionedGeom == null)&lt;BR /&gt;{&lt;BR /&gt;unionedGeom = _geometry;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;unionedOp = (ITopologicalOperator)unionedGeom;&lt;/P&gt;&lt;P&gt;unionedGeom = unionedOp.Union(_geometry);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return unionedGeom;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 07:04:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-create-multi-patch-geometry-from-triangle/m-p/1483979#M7066</guid>
      <dc:creator>IbrahimMassoudWGS84</dc:creator>
      <dc:date>2024-06-04T07:04:28Z</dc:date>
    </item>
  </channel>
</rss>

