<?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: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it? in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11605649#M4527</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7472042"&gt;@soonhui&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So how can it be even possible that I check for the&amp;nbsp;&lt;SPAN&gt;IsEdgeVisibleAt property of&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;FaceRecord, when the FaceRecord doesn't even exist?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is why I made my addendum post. Use the TinSurfaceEdges to check if there is a corresponding FaceRecordEdge, if not, flag that edge for deletion.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Dec 2022 03:59:15 GMT</pubDate>
    <dc:creator>Jeff_M</dc:creator>
    <dc:date>2022-12-08T03:59:15Z</dc:date>
    <item>
      <title>Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11600226#M4519</link>
      <description>&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;&lt;FONT size="5"&gt;NOTE:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the communication with Civil 3D developer, I can confirm that the problem in the original test case&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;is a bug&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A fix is underway, but don't know when will come.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;FONT size="6"&gt;&lt;STRONG&gt;Problem description:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code that works very well when I convert from PolyFaceMesh to TinSurface under simple situation (eg: if I have a L shape PolyFaceMesh, then the TinSurface converted will preserve the PolyFaceMesh).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        [CommandMethod(nameof(ConvertFromMeshToTinSurface))]
        public void ConvertFromMeshToTinSurface()
        {
            using (var tsDest = ActiveACADDocument.TransactionManager.StartTransaction())
            {
                var destBlockTable = tsDest.GetObject(ActiveACADDocument.Database.BlockTableId, OpenMode.ForRead) as BlockTable;
                var destinationModelSpace = tsDest.GetObject(destBlockTable[BlockTableRecord.ModelSpace],
                    OpenMode.ForWrite) as BlockTableRecord;
                foreach (var id in destinationModelSpace)
                {
                    var entity = tsDest.GetObject(id, OpenMode.ForRead) as PolyFaceMesh;
                    if(entity== null)
                        continue;
                    var surfaceId2 = TinSurface.Create(ActiveACADDocument.Database, "FromMeshTest");
                    var platformSurface = tsDest.GetObject(surfaceId2, OpenMode.ForWrite) as TinSurface;
                    platformSurface.DrawingObjectsDefinition.AddFromPolyFaces(new ObjectIdCollection(new[] { entity.Id }),
                        true, $"Normal Platform");
                    var spuriousEdges = platformSurface.GetEdges().Where(ee =&amp;gt; !ee.IsLocked).ToList(); //IsLocked indicates that it's not a part of the edge in PolyMesh

                    if (spuriousEdges.Count &amp;gt; 0)
                    {

                        platformSurface.DeleteLines(spuriousEdges);
                    }
                    platformSurface.Rebuild();
                    break;
                    //MessageBox.Show(platformSurface.GetTerrainProperties().SurfaceArea2D.ToString());


                }
                tsDest.Commit();
                ACADEditor.ZoomExtents();


            }

        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, for a slightly complicated drawing like the one I attach here, it seems that some face is not properly converted into TinSurface, as shown when you compare the two screenshots for the PolyFaceMesh object and the TinSurface object:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tinsurface.png" style="width: 943px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1148818i65A492DB6F57D6FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="tinsurface.png" alt="tinsurface.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="polyfacemesh.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1148819iDFC69F03AB8AA3D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="polyfacemesh.png" alt="polyfacemesh.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that some face is missing in TinSurface as per above screenshot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I fix this? Is there a robust way that guarantees 100% conversion from PolyFaceMesh to TinSurface?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 03:54:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11600226#M4519</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2023-03-07T03:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11600241#M4520</link>
      <description>&lt;P&gt;Here's another (similar) drawing, and the problem looks even worse:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="polyfacemesh2.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1148822iF71973060C27E6F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="polyfacemesh2.png" alt="polyfacemesh2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tinsurface2.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1148823iBECD68466DC3BC02/image-size/large?v=v2&amp;amp;px=999" role="button" title="tinsurface2.png" alt="tinsurface2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm unsure whether this is a bug, or just my code of converting from&amp;nbsp; PolyFaceMesh to TinSurface is not robust.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 04:34:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11600241#M4520</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2022-12-06T04:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11601790#M4521</link>
      <description>&lt;P&gt;This:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;var spuriousEdges = platformSurface.GetEdges().Where(ee =&amp;gt; !ee.IsLocked).ToList();&lt;/LI-CODE&gt;
&lt;P&gt;looks like it must be returning edges that you really dont want returned. I think you will need to go through the FaceRecords of the PolyFaceMesh and save a list of the edges which are not visible, then remove those edges from the surface. Not sure of the best/easiest way to do this, perhaps find the midpoint of the non-visible edges then use the TinSurface.FindEdgeAtXY() to get the surface edges to remove.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 17:22:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11601790#M4521</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2022-12-06T17:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11602840#M4522</link>
      <description>&lt;P&gt;OK, I can reproduce the problem using a very simple code ( with no complicated geometry from another drawing).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is just a L shape PolyFaceMesh, and yet I can reproduce the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smaller L shape example.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1149294i4B49D70F386ED7E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="smaller L shape example.png" alt="smaller L shape example.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        [CommandMethod(nameof(LShapeAddFromPolyFace))]
        public void LShapeAddFromPolyFace()
        {
            try
            {
                using (var ts = ActiveACADDocument.TransactionManager.StartTransaction())
                {

                    var surfaceId2 = TinSurface.Create(ActiveACADDocument.Database, "FromMeshTest");
                    var platformSurface = ts.GetObject(surfaceId2, OpenMode.ForWrite) as TinSurface;

                    var bt = (BlockTable)ts.GetObject(ActiveACADDocument.Database.BlockTableId, OpenMode.ForRead, false);
                    var btr = (BlockTableRecord)ts.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite, false);

                    var vertices = platformSurface.Vertices;
                    if (vertices.Count != 0)
                    {
                        platformSurface.DeleteVertices(vertices);
                    }
                    var polyMesh = new PolyFaceMesh();
                    polyMesh.SetDatabaseDefaults();
                    btr.AppendEntity(polyMesh);
                    ts.AddNewlyCreatedDBObject(polyMesh, true);

                    var vertex1 = new PolyFaceMeshVertex(new Point3d(0, 0, 0));
                    polyMesh.AppendVertex(vertex1);
                    ts.AddNewlyCreatedDBObject(vertex1, true);
                    var vertex2 = new PolyFaceMeshVertex(new Point3d(10, 0, 0));
                    polyMesh.AppendVertex(vertex2);
                    ts.AddNewlyCreatedDBObject(vertex2, true);
                    var vertex3 = new PolyFaceMeshVertex(new Point3d(10, 10, 0));
                    polyMesh.AppendVertex(vertex3);
                    ts.AddNewlyCreatedDBObject(vertex3, true);
                    var vertex4 = new PolyFaceMeshVertex(new Point3d(0, 10, 0));
                    polyMesh.AppendVertex(vertex4);
                    ts.AddNewlyCreatedDBObject(vertex4, true);
                    var vertex5 =new PolyFaceMeshVertex(new Point3d(5, 10, 0));
                    polyMesh.AppendVertex(vertex5);
                    ts.AddNewlyCreatedDBObject(vertex5, true);
            
                 
                    var vertex6 = new PolyFaceMeshVertex(new Point3d(10, 10, 0));
                    polyMesh.AppendVertex(vertex6);
                    ts.AddNewlyCreatedDBObject(vertex6, true);
                 

                
                    var vertex7 =new PolyFaceMeshVertex(new Point3d(10, 20, 0));
                    polyMesh.AppendVertex(vertex7);
                    ts.AddNewlyCreatedDBObject(vertex7, true);
           

                    var vertex8 =new PolyFaceMeshVertex(new Point3d(5, 20, 0));
                    polyMesh.AppendVertex(vertex8);
                    ts.AddNewlyCreatedDBObject(vertex8, true);
               


                    var fr1 = new FaceRecord(1, 2, 3, 0);  //this is one based right? Furthermore, this is a triangle, so the last argument is 0. I hope my intepretation is correct!
                    polyMesh.AppendFaceRecord(fr1);
                    ts.AddNewlyCreatedDBObject(fr1, true);
                    var fr2 = new FaceRecord(1, 3, 4, 0);  //this is one based right? Furthermore, this is a triangle, so the last argument is 0. I hope my intepretation is correct!
                    polyMesh.AppendFaceRecord(fr2);
                    ts.AddNewlyCreatedDBObject(fr2, true);

                    var fr3 = new FaceRecord(5,6,7, 0);  //this is one based right? Furthermore, this is a triangle, so the last argument is 0. I hope my intepretation is correct!
                    polyMesh.AppendFaceRecord(fr3);
                    ts.AddNewlyCreatedDBObject(fr3, true);

                    var fr4 = new FaceRecord(5, 7, 8, 0);  //this is one based right? Furthermore, this is a triangle, so the last argument is 0. I hope my intepretation is correct!
                    polyMesh.AppendFaceRecord(fr4);
                    ts.AddNewlyCreatedDBObject(fr4, true);

                    platformSurface.DrawingObjectsDefinition.AddFromPolyFaces(new ObjectIdCollection(new[] { polyMesh.Id }),
                        true, $"Normal Platform");

                    var spuriousEdges = platformSurface.GetEdges().Where(ee =&amp;gt; !ee.IsLocked).ToList(); //IsLocked indicates that it's not a part of the edge in PolyMesh

                    if (spuriousEdges.Count &amp;gt; 0)
                    {

                        platformSurface.DeleteLines(spuriousEdges);
                    }

                    platformSurface.Rebuild();
                    ACADEditor.ZoomExtents();
                    ts.Commit();
                }
            }
            catch (System.Exception e)
            {
                MessageBox.Show(e.ToString());
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Maybe it's how I use the IsLocked filter to delete the spurious edge? But if I don't do it, then my TinSurface will be &lt;EM&gt;bigger&lt;/EM&gt; than the PolyFace mesh!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 03:05:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11602840#M4522</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2022-12-07T03:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11602854#M4523</link>
      <description>&lt;P&gt;How can I tell whether the edge is visible or not? There is no IsVisible property at &lt;A href="https://help.autodesk.com/view/CIV3D/2023/ENU/?guid=228c2f9f-aba3-1be8-4c1b-a3c970a72587" target="_blank" rel="noopener"&gt;TinSurfaceEdge class&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the way that you suggest seems not robust enough-- what about the the edge(s) on "hole" inside the PolyFaceMesh?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 03:19:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11602854#M4523</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2022-12-07T03:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11604731#M4524</link>
      <description>&lt;P&gt;The FaceRecord has the IsEdgeVisibleAt property. If false then get the midpoint of that edge, use the TinSurface.FindEdgeAtXY() and remove that TinSurfaceEdge. (I haven't used PolyFace Meshes or FaceRecords enough to know how to calculate the FaceRecord edge midpoint.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The IsLocked property is supposed to apply to edges at breaklines, the PolyFaceMesh does not create breaklines so it appears to be a bit random which report as being unlocked or not...hence the unwanted results you are seeing.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 18:57:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11604731#M4524</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2022-12-07T18:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11605344#M4525</link>
      <description>I should add that since I don't typically use PolyFaceMesh objects I'm just assuming that the "hole" areas have FaceRecord edges that are not visible. If this is not the case then my idea won't work. It may work in reverse, however, by checking each TinSurfaceEdge to see if there is a corresponding FaceRecord at that location.</description>
      <pubDate>Wed, 07 Dec 2022 23:51:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11605344#M4525</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2022-12-07T23:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11605496#M4526</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/32637"&gt;@Jeff_M&lt;/a&gt;&amp;nbsp;, I' not too sure I understand you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I define a few FaceRecords in my PolyFaceMesh. But for the Triangles ( or edges) I want to remove in TinSurface, they have no corresponding FaceRecords in PolyFaceMesh-- when I use TinSurface.DrawingObjects.AddFromPolyFaces to add a PolyFaceMesh the resultant TinSurface will create extra triangles that are not in the PolyFaceMesh.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So how can it be even possible that I check for the&amp;nbsp;&lt;SPAN&gt;IsEdgeVisibleAt property of&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;FaceRecord, when the FaceRecord doesn't even exist?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 01:28:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11605496#M4526</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2022-12-08T01:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11605649#M4527</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7472042"&gt;@soonhui&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So how can it be even possible that I check for the&amp;nbsp;&lt;SPAN&gt;IsEdgeVisibleAt property of&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;FaceRecord, when the FaceRecord doesn't even exist?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is why I made my addendum post. Use the TinSurfaceEdges to check if there is a corresponding FaceRecordEdge, if not, flag that edge for deletion.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 03:59:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11605649#M4527</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2022-12-08T03:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11605670#M4528</link>
      <description>&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;Use the TinSurfaceEdges to check if there is a corresponding FaceRecordEdge&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It's not that simple because The TinSurface might break the FaceRecordEdge and introduce extra point when two FaceRecordEdge intersect ( refer to &lt;A href="https://forums.autodesk.com/t5/civil-3d-customization/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11602840/highlight/true#M22525" target="_blank" rel="noopener"&gt;this example&lt;/A&gt;; One of the edge along the face fr2 will be broken into 2 and a new points introduced). So I have to introduce some numerical tolerance when I check for the line intersection... which is very messy.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 04:19:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11605670#M4528</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2022-12-08T04:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11606152#M4529</link>
      <description>&lt;P&gt;Now I've solved for the last two test cases , but the very original test case is still unsolved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason why the last two test cases have missing area is because of how I construct the PolyFaceMesh. It seems that for FaceRecord in PolyFaceMesh, you will have to break it out and make it into a few FaceRecords, if there is an intersecting point on the Edge of the FaceRecord. So for the L shape PolyFaceMesh, the way to fix it is to generate extra FaceRecord, as shown below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="facerecrod.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1149958i97D5A03A41A62EE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="facerecrod.png" alt="facerecrod.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Note that the intersecting point at the middle should be used as a basis to form extra FaceRecords.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But still, the first test case doesn't seem to have this problem ( ie. &lt;STRONG&gt;all the necessary intersecting points are created and used to create FaceRecords&lt;/STRONG&gt;), so I'm unsure why there are still missing areas.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 09:25:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11606152#M4529</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2022-12-08T09:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11803114#M4530</link>
      <description>&lt;P&gt;Based on the communication with Civil 3D developer, I can confirm that the problem in the original test case &lt;STRONG&gt;is a bug&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A fix is underway, but don't know when will come.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 03:10:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/11803114#M4530</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2023-03-07T03:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/12440586#M4531</link>
      <description>&lt;P&gt;Using the drawing (&lt;SPAN&gt;polymeshback.dwg)&lt;/SPAN&gt; in this original message and the code, I &lt;STRONG&gt;still&lt;/STRONG&gt; find that the missing area is there, even in the Civil 3D 2024.2. My version:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="c3d version.png" style="width: 739px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1304658iE212A8534DE71237/image-size/large?v=v2&amp;amp;px=999" role="button" title="c3d version.png" alt="c3d version.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've highlighted the missing area as per below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image_7.png" style="width: 763px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1304656i85EDE57A1DD68F23/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image_7.png" alt="Image_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 08:30:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/12440586#M4531</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2023-12-14T08:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/12482330#M4532</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7472042"&gt;@soonhui&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The result looks weird, I had different result on my machine.&lt;/P&gt;
&lt;P&gt;Let me double check if we are using the same way to create surface:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;How did you create the surface from polymesh: from API or UI?&lt;/LI&gt;
&lt;LI&gt;Did you check "Maintain edges from objects" when you added the polymesh?&lt;/LI&gt;
&lt;LI&gt;Did you set "Exclude out of range triangles when adding polymesh" to YES?&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 08 Jan 2024 00:49:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/12482330#M4532</guid>
      <dc:creator>WebberHu</dc:creator>
      <dc:date>2024-01-08T00:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/12485308#M4533</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6785245"&gt;@WebberHu&lt;/a&gt;&amp;nbsp;, thank you for responding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm unclear what do you mean by "&lt;SPAN&gt;if we are using the same way to create surface&lt;/SPAN&gt;". You can just run my code in the original message to create the surface right? How can we be different in that way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or do you mean the surface in the "polymeshback.dwg" file?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 09:23:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/12485308#M4533</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2024-01-09T09:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/12485663#M4534</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7472042"&gt;@soonhui&lt;/a&gt;&amp;nbsp;Yes, I see the different surface in the "polymeshback.dwg" file. I am using C3D 2025 alpha.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 12:27:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/12485663#M4534</guid>
      <dc:creator>WebberHu</dc:creator>
      <dc:date>2024-01-09T12:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why this code fail to properly convert PolyFaceMesh to TinSurface, and how to fix it?</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/12487585#M4535</link>
      <description>&lt;P&gt;Hmm, I've done further testing, it does seem that &lt;STRONG&gt;the problem is solved&lt;/STRONG&gt; in Civil 3D 2024.2 version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your effort.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 06:22:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/why-this-code-fail-to-properly-convert-polyfacemesh-to/m-p/12487585#M4535</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2024-01-10T06:22:47Z</dc:date>
    </item>
  </channel>
</rss>

