Cull/Delete faces in mesh in Topography mesh - Grasshopper2024-03-29T10:25:51Zhttps://www.grasshopper3d.com/forum/topics/cull-delete-faces-in-mesh-in-topography-mesh?commentId=2985220%3AComment%3A1434682&feed=yes&xn_auth=noI'm agree, it is a pleasure t…tag:www.grasshopper3d.com,2016-01-09:2985220:Comment:14353842016-01-09T20:47:02.359ZDaniel Domenech Muñozhttps://www.grasshopper3d.com/profile/DanielDomenechMunoz
<p>I'm agree, it is a pleasure to kill mesh</p>
<p>Very useful tools, thank you for your time Lord Fotiadis</p>
<p>I'm agree, it is a pleasure to kill mesh</p>
<p>Very useful tools, thank you for your time Lord Fotiadis</p> Thank you This is really ni…tag:www.grasshopper3d.com,2016-01-09:2985220:Comment:14351942016-01-09T20:44:19.722ZDaniel Domenech Muñozhttps://www.grasshopper3d.com/profile/DanielDomenechMunoz
<p>Thank you This is really nice and work perfectly! Thank for your time, Chris</p>
<p>Thank you This is really nice and work perfectly! Thank for your time, Chris</p> Added another massacre option…tag:www.grasshopper3d.com,2016-01-09:2985220:Comment:14350282016-01-09T08:09:56.781Zpeter fotiadishttps://www.grasshopper3d.com/profile/peterfotiadis
<p>Added another massacre option (maybe not suitable for this case ... but since I hate meshes killing some is always a pleasure, he he).</p>
<p><a target="_self" href="http://storage.ning.com/topology/rest/1.0/file/get/2769083487?profile=original"><img width="721" class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2769083487?profile=RESIZE_1024x1024" width="721"/></a></p>
<p>Note: same test brep is used as in the first massacre def</p>
<p>Added another massacre option (maybe not suitable for this case ... but since I hate meshes killing some is always a pleasure, he he).</p>
<p><a target="_self" href="http://storage.ning.com/topology/rest/1.0/file/get/2769083487?profile=original"><img width="721" class="align-full" src="http://storage.ning.com/topology/rest/1.0/file/get/2769083487?profile=RESIZE_1024x1024" width="721"/></a></p>
<p>Note: same test brep is used as in the first massacre def</p> Hmm ... appears that you have…tag:www.grasshopper3d.com,2016-01-09:2985220:Comment:14350232016-01-09T06:59:16.638Zpeter fotiadishttps://www.grasshopper3d.com/profile/peterfotiadis
<p>Hmm ... appears that you have a "solid" as a mesh not just a "surface" (the "vertical" parts) - that said I confess that I never exploited your file (30K faces makes me nervous, he he).</p>
<p>Anyway get the massacre MK2 (<strong>reduce</strong> mesh) C# that maybe has more sense in your case.</p>
<p>The very same test surface is used (Load R file first): notice the PlanA (reduce) and PlanB (MeshMachine).</p>
<p>Moral: massacre (kill first then ask questions)</p>
<p>Hmm ... appears that you have a "solid" as a mesh not just a "surface" (the "vertical" parts) - that said I confess that I never exploited your file (30K faces makes me nervous, he he).</p>
<p>Anyway get the massacre MK2 (<strong>reduce</strong> mesh) C# that maybe has more sense in your case.</p>
<p>The very same test surface is used (Load R file first): notice the PlanA (reduce) and PlanB (MeshMachine).</p>
<p>Moral: massacre (kill first then ask questions)</p> NOTE: the attached sample def…tag:www.grasshopper3d.com,2016-01-08:2985220:Comment:14346822016-01-08T20:55:41.072ZChris Hanleyhttps://www.grasshopper3d.com/profile/ChrisHanley
<p>NOTE: the attached sample definition can take a few seconds to compute with the provided mesh.</p>
<p>Here are some steps that use native GH components. The description is a bit lengthy...sorry. I got carried away on lunch break...</p>
<p>1 - Clean up the mesh a bit: Lots of ways to do this, but as a rule of thumb, it's probably best to clean the mesh as best you can before bringing into GH. But, for the sake of example...a basic method is comparing the normal of a face to a Z Vector,…</p>
<p>NOTE: the attached sample definition can take a few seconds to compute with the provided mesh.</p>
<p>Here are some steps that use native GH components. The description is a bit lengthy...sorry. I got carried away on lunch break...</p>
<p>1 - Clean up the mesh a bit: Lots of ways to do this, but as a rule of thumb, it's probably best to clean the mesh as best you can before bringing into GH. But, for the sake of example...a basic method is comparing the normal of a face to a Z Vector, and if the comparison results in a match, within some tolerance...then you can get rid of it. When dealing with topography and slope, the common unit of measure is generally percent, but to start with, we can use degrees.</p>
<p>2 - Evaluate MeshFaceNormals: similar to step 1, you are simply getting the normal vector of a face, and comparing it to a Z vector. The important thing to note is that the Vector Compare component outputs radians. At this point, you need to either convert to degrees again, OR, do some math and convert to percent. </p>
<p>3 - Set Slope Zones and Ranges : There are a few ways to do this, but I think this is one of the most straight forward methods. Set your "slope zones", create some consecutive domains from those numbers, then just find the values that fit into those domains, (you have the values from step 2, so you can pump those into the N input of the Find Domain component.)</p>
<p></p>
<p>4 - Color Mesh by Slope Value : the gradient component is setting colors based on your slope range domains. Because you have input a list of domains, (0 to 10, 10 to 20 , 20 to 25, 25 to 40, and 40 to 60), the Find Domain component is actually just putting the slope values into the corresponding range, and then outputting the index number of the slope domain, (0,1,2,3,4). The gradient component then maps those 5 numbers, (0-4.....which is actually 5 numbers because list counts start, and include, 0), to 5 colors.</p>
<p>4a - NOTE: The gradient component needs a Lower limit, and Upper Limit. In this case we start the lower limit at 0, (index of first slope range...0 to 10). The upper limit is the index of the LAST item in the Slope Zone/Range list, which is 4. I used a list length component to get the length of the below list, (which correctly returns 5 items....but I need the index of the last one, so the expression subtracts 1 from the length total).</p>
<p><br/>0. 0.0 To 10.0<br/>1. 10.0 To 20.0<br/>2. 20.0 To 25.0<br/>3. 25.0 To 40.0<br/>4. 40.0 To 60.0</p>
<p>Then construct the mesh again using the cleaned vertices and faces from step 2, only adding in the new colors.</p>
<p>The last bit of the definition is just visualizing the slope value on the face...it's kind of overkill, but shown as an example.</p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2769081287?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2769081287?profile=RESIZE_1024x1024" width="721" class="align-full"/></a></p>
<p></p>
<p></p> Guaaau, that's great. The kil…tag:www.grasshopper3d.com,2016-01-08:2985220:Comment:14347272016-01-08T20:15:27.791ZDaniel Domenech Muñozhttps://www.grasshopper3d.com/profile/DanielDomenechMunoz
<p>Guaaau, that's great. The killing was in order. Now its populations of faces is 30000, 9000 less. </p>
<p>Ok, i have installed Plankton, it seems and interesting add-on</p>
<p></p>
<p>How it is that C# maybe it is interesting?</p>
<p></p>
<p>P.S: Massacre at Mesh Fall, is not the titel of the new Fargo Season?</p>
<p></p>
<p></p>
<p></p>
<p>Guaaau, that's great. The killing was in order. Now its populations of faces is 30000, 9000 less. </p>
<p>Ok, i have installed Plankton, it seems and interesting add-on</p>
<p></p>
<p>How it is that C# maybe it is interesting?</p>
<p></p>
<p>P.S: Massacre at Mesh Fall, is not the titel of the new Fargo Season?</p>
<p></p>
<p></p>
<p></p> Well ...
... for a mesh massa…tag:www.grasshopper3d.com,2016-01-08:2985220:Comment:14345022016-01-08T18:47:41.520Zpeter fotiadishttps://www.grasshopper3d.com/profile/peterfotiadis
<p>Well ...</p>
<p>... for a mesh massacre based on slope (mesh face normals) see attached. I'll add later various other ways (points et all) to kill properly a mesh.</p>
<p>NOTE: Daniel's <strong>MeshMachine</strong> is used in order to control the demo mesh "density" (but you can provide any mesh in fact).</p>
<p>BTW: do you want a small C# that reduces a mesh?</p>
<p>Well ...</p>
<p>... for a mesh massacre based on slope (mesh face normals) see attached. I'll add later various other ways (points et all) to kill properly a mesh.</p>
<p>NOTE: Daniel's <strong>MeshMachine</strong> is used in order to control the demo mesh "density" (but you can provide any mesh in fact).</p>
<p>BTW: do you want a small C# that reduces a mesh?</p>