Removing inner Faces of a Mesh - Grasshopper2024-03-28T18:47:08Zhttps://www.grasshopper3d.com/forum/topics/removing-inner-faces-of-a-mesh?commentId=2985220%3AComment%3A860009&x=1&feed=yes&xn_auth=noDavid,
My mistake, I read fu…tag:www.grasshopper3d.com,2013-05-24:2985220:Comment:8600092013-05-24T17:45:48.808ZDavidhttps://www.grasshopper3d.com/profile/David717
<p>David,</p>
<p></p>
<p>My mistake, I read further and created the deletefaces component and fed the mesh and A output of the VB component into the deletefaces component.</p>
<p></p>
<p>It seems to be duplicating the meshes without removing the inner faces. I also tried running the mesh through the weaverbird "join meshes and weld" component before feeding it to your script but that didn't help. I've attached the gh and 3dm file if that is helpful...</p>
<p></p>
<p>Thanks!</p>
<p>David,</p>
<p></p>
<p>My mistake, I read further and created the deletefaces component and fed the mesh and A output of the VB component into the deletefaces component.</p>
<p></p>
<p>It seems to be duplicating the meshes without removing the inner faces. I also tried running the mesh through the weaverbird "join meshes and weld" component before feeding it to your script but that didn't help. I've attached the gh and 3dm file if that is helpful...</p>
<p></p>
<p>Thanks!</p> David,
Thanks for sharing th…tag:www.grasshopper3d.com,2013-05-24:2985220:Comment:8603162013-05-24T16:57:50.234ZDavidhttps://www.grasshopper3d.com/profile/David717
<p>David,</p>
<p></p>
<p><span style="font-size: 13px;">Thanks for sharing this great script. I'm trying to achieve something similar as the original poster - I have a series of stacked closed meshes who then as a result share adjacent inner faces - I'm trying to remove these inner faces as a result of the objects being stacked.</span></p>
<p></p>
<p><span style="font-size: 13px;">It seems like your script will do just this. I've setup the vb component and copied your script inside and followed…</span></p>
<p>David,</p>
<p></p>
<p><span style="font-size: 13px;">Thanks for sharing this great script. I'm trying to achieve something similar as the original poster - I have a series of stacked closed meshes who then as a result share adjacent inner faces - I'm trying to remove these inner faces as a result of the objects being stacked.</span></p>
<p></p>
<p><span style="font-size: 13px;">It seems like your script will do just this. I've setup the vb component and copied your script inside and followed your directions, plugging the mesh into an M input.</span></p>
<p></p>
<p><span style="font-size: 13px;">My question is nothing seems to happen. Do I need to setup some form of output coming out of the vb component?</span></p>
<p></p>
<p><span style="font-size: 13px;">Thanks!</span></p>
<p></p> Ah, I see what you're looking…tag:www.grasshopper3d.com,2012-12-11:2985220:Comment:7451692012-12-11T11:09:40.661ZDavid Stasiukhttps://www.grasshopper3d.com/profile/DavidStasiuk
<p>Ah, I see what you're looking to do now. Yes...messy meshes to begin with...and great call on the occlusion thing...Looks like a very promising start...joined + welded with weaverbird, split disjoint mesh, then took each face centerpoint and tested it against the mesh for occlusion in x,-x,y,-y,z,-z directions...each centerpoint that tested true for occlusion for each direction defines an index for face extraction. Super quick + easy!</p>
<p>Ah, I see what you're looking to do now. Yes...messy meshes to begin with...and great call on the occlusion thing...Looks like a very promising start...joined + welded with weaverbird, split disjoint mesh, then took each face centerpoint and tested it against the mesh for occlusion in x,-x,y,-y,z,-z directions...each centerpoint that tested true for occlusion for each direction defines an index for face extraction. Super quick + easy!</p> I was thinking of somehow may…tag:www.grasshopper3d.com,2012-12-11:2985220:Comment:7454152012-12-11T09:08:45.529ZKarl Weckerhttps://www.grasshopper3d.com/profile/KarlWecker
<p>I was thinking of somehow maybe evaluating "ambient occlusion" values through Rhino Common (if possible). I haven't checked that yet.</p>
<p></p>
<p><a rel="nofollow" href="http://meshlabstuff.blogspot.de/2009/04/how-to-remove-internal-faces-with.html" target="_blank">http://meshlabstuff.blogspot.de/2009/04/how-to-remove-internal-face...</a></p>
<p>I was thinking of somehow maybe evaluating "ambient occlusion" values through Rhino Common (if possible). I haven't checked that yet.</p>
<p></p>
<p><a rel="nofollow" href="http://meshlabstuff.blogspot.de/2009/04/how-to-remove-internal-faces-with.html" target="_blank">http://meshlabstuff.blogspot.de/2009/04/how-to-remove-internal-face...</a></p> Well, the Problem I'm facing…tag:www.grasshopper3d.com,2012-12-11:2985220:Comment:7454132012-12-11T09:04:01.240ZKarl Weckerhttps://www.grasshopper3d.com/profile/KarlWecker
<p>Well, the Problem I'm facing is to create better quality Models of Large Scale Urban Masterplan Models. It's not so much a "for this model" Problem.</p>
<p>I'm looking for a general solution to "cleanup" after Sketchup.</p>
<p></p>
<p>Please find attached a Part of the Model. I usually Join the Faces all into one mesh first, then weld the vertices and explode the meshes again.</p>
<p></p>
<p>Thanks</p>
<p>- Karl</p>
<p></p>
<p>Well, the Problem I'm facing is to create better quality Models of Large Scale Urban Masterplan Models. It's not so much a "for this model" Problem.</p>
<p>I'm looking for a general solution to "cleanup" after Sketchup.</p>
<p></p>
<p>Please find attached a Part of the Model. I usually Join the Faces all into one mesh first, then weld the vertices and explode the meshes again.</p>
<p></p>
<p>Thanks</p>
<p>- Karl</p>
<p></p> can you share your model? it…tag:www.grasshopper3d.com,2012-12-10:2985220:Comment:7445712012-12-10T10:37:27.559ZDavid Stasiukhttps://www.grasshopper3d.com/profile/DavidStasiuk
<p>can you share your model? it's difficult to understand the specific challenge created by your topology from an image alone.</p>
<p>can you share your model? it's difficult to understand the specific challenge created by your topology from an image alone.</p> Hi David,
thanks for sharing…tag:www.grasshopper3d.com,2012-12-10:2985220:Comment:7444672012-12-10T09:23:18.714ZKarl Weckerhttps://www.grasshopper3d.com/profile/KarlWecker
<p>Hi David,</p>
<p>thanks for sharing the concept. But isn't it true, that the outer faces have one edge in common with the inner faces. (And therefore also have more edges in common than their edge count).</p>
<p></p>
<p>Thanks</p>
<p>-Karl</p>
<p>Hi David,</p>
<p>thanks for sharing the concept. But isn't it true, that the outer faces have one edge in common with the inner faces. (And therefore also have more edges in common than their edge count).</p>
<p></p>
<p>Thanks</p>
<p>-Karl</p> Nice concept to know, about e…tag:www.grasshopper3d.com,2012-12-07:2985220:Comment:7430432012-12-07T16:54:34.407ZMichael Pryorhttps://www.grasshopper3d.com/profile/MikePryor
<p>Nice concept to know, about edges to faces. Thanks for sharing :)</p>
<p></p>
<p>Nice concept to know, about edges to faces. Thanks for sharing :)</p>
<p></p> I think the method would depe…tag:www.grasshopper3d.com,2012-12-07:2985220:Comment:7431382012-12-07T16:06:50.642ZDavid Stasiukhttps://www.grasshopper3d.com/profile/DavidStasiuk
<p>I think the method would depend on how your mesh is constructed...if your internal faces are duplicated, then you can extract the centerpoints from the mesh face polylines and test them for adjacency to one another...then identify all of the faces where the centerpoint is sitting on another face centerpoint and use the "delete faces" component.</p>
<p>However, if your internal faces are not duplicated, this should do it...use a VB component, set an input to be M, and type hint to…</p>
<p>I think the method would depend on how your mesh is constructed...if your internal faces are duplicated, then you can extract the centerpoints from the mesh face polylines and test them for adjacency to one another...then identify all of the faces where the centerpoint is sitting on another face centerpoint and use the "delete faces" component.</p>
<p>However, if your internal faces are not duplicated, this should do it...use a VB component, set an input to be M, and type hint to "mesh":</p>
<p>Private Sub RunScript(ByVal M As Mesh, ByRef A As Object)</p>
<p>Dim f_idx As New List(Of Int32)</p>
<p>For i As int32 = 0 To M.Faces.Count - 1<br/> Dim f_c() As Int32 = M.Faces.AdjacentFaces(i)<br/> Dim e_c() As Int32 = M.TopologyEdges.GetEdgesForFace(i)<br/> If f_c.Length - 1 > e_c.Length Then<br/> f_idx.Add(i)<br/> End If<br/> Next</p>
<p>A = f_idx</p>
<p>End Sub</p>
<p></p>
<p>Basically what it's doing is looking for any mesh face that is connected to more other faces than it has edges, and appending its index to a list that it outputs. Feed your mesh and this index into a "delete faces" component and it'll pull them out.</p> best way I have found. Since…tag:www.grasshopper3d.com,2012-12-07:2985220:Comment:7432232012-12-07T16:06:07.173ZMichael Pryorhttps://www.grasshopper3d.com/profile/MikePryor
<p><a target="_self" href="http://storage.ning.com/topology/rest/1.0/file/get/2768775902?profile=original"><img width="721" class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2768775902?profile=RESIZE_1024x1024" width="721"/></a>best way I have found. Since interior faces back to back will always be a duplicate we can cull all duplicate area centroids and use that index to call out only exterior faces.</p>
<p><a target="_self" href="http://storage.ning.com/topology/rest/1.0/file/get/2768775902?profile=original"><img width="721" class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2768775902?profile=RESIZE_1024x1024" width="721"/></a>best way I have found. Since interior faces back to back will always be a duplicate we can cull all duplicate area centroids and use that index to call out only exterior faces.</p>