Hi all,
I would like to do flow analysis for a terrain model so that I want to convert a mesh terrain to a surface, in which I tried to use the “patch” command but it seems to be too large. Is there any way to convert it to a surface?
Best,
HC
Hi all,
I would like to do flow analysis for a terrain model so that I want to convert a mesh terrain to a surface, in which I tried to use the “patch” command but it seems to be too large. Is there any way to convert it to a surface?
Best,
HC
Hi HC -
A terrain is typically best represented by a mesh and, generally, software that is used to analyse terrains are mesh-aware. Which plug-in are you using to perform the analysis?
-wim
hi @wim,
I am using Mosquito and Kangaroo for flow analysis and it seems that it only supports surface.
HC
Hi HC - Kangaroo supports meshes but perhaps it depends on the specific application here. Can you post your Grasshopper definition file?
-wim
You could also implement the GHPython script I link to here:
Or the terrain analysis components from Gismo:
These both work with meshes.
It requires a surface to perform the simulation. Thanks
BasicRainRunoff_I.gh (9.2 KB)
Thanks! I haven’t tried to do python in rhino (because I am also new to python) and hence I would like to fix the problem in Grasshopper first due to the deadline of my project is very soon.
Here’s a quick minimal implementation example, just in case:
190311_MeshDrainagePaths_00.gh (410.5 KB)
Very impressive!!! I should try this script on my terrain. Thanks!
-HC
Hi HC - you didn’t internalize your surface so no one else will see what you are seeing on your screen…
At any rate, it looks like @AndersDeleuran’s definition should work for you. There’s also the Bison
plug-in (and probably others) that have a flow analysis component…
Hi Wim,
Sorry about that. The attached files are what I am trying to do but it failed at the last. I am trying to simulate the rain runoff path (like the picture) so that I project some points (raindrops) on my terrain. But the result doesn’t like what I want.
HC
Terrain_FlowAnalysis.3dm (5.2 MB) Terrain_FlowAnalysis.gh (14.8 KB)I have tried the script in my terrain but I can’t get the result you showed. I am not familiar with Python so that I am not able to find out what is going on It would be grateful if you can take a look at my model.
Thanks!
HC
Test_MeshDrainagePaths_00.gh (6.1 KB)
test.3dm (4.7 MB)
I’m afraid I don’t have Rhino 6 on my personal laptop, so I can’t check your file. That said, based on Daniel’s reply here, I’d guess you probably need to increase the StepSize
value, such to better match the unit/dimensions of your file/mesh.
If you are familiar with C# (mid to advanced level) I could provide some hints on that matter … but is a rather slow procedure: 1000+ ms for the captured example [using a pathetic i5 on a pathetic laptop].
Thanks for the suggestion. I will change the unit to meter.
HC
I did not learn about C# but I actually want to do it. (because it looks nice) Is there any method to do that?
-HC
Prepare to spend several years in order to master the art. So it’s out of question to be soon in some level to effectively convert any(?) mesh into a nurbs solid via C#,
So here’s some abstract hints (focus on an approach via patch on mesh vertices):
Patch is a balance between speed (and patch settings) VS the N of points used (mesh vertices), So is paramoutnt to mastermind some method to work with a user controlled N of “equally spaced” vertices (say some percentage) while measuring the max deviation: for instance if the terrain is big and you are after some preliminary status of study then … a deviation of, say, 0.5m is rather OK (if not you should add more vertices to patch and/or change the patch settings). This trial and error approach is the only way to do it in real-life (and in some acceptable elapsed time) with big N of vertices.
Patch is done via 2 RhinoCommon Methods, The “simple” one (i.e. the 1st pass) usually yields an untrimmed surface (the transparent one shown above). The other accepts variables ( flexibility, surface pull strength, point spacing etc etc) that allow for a better mesh “approximation”.
No need to go for a trimmed result (a BrapFace, that is) since you can do help/tmp solids (using projections of the mesh boundary polylines [inner/outer “holes”] and then get the desired nurbs terrain solid (a closed polysurface) via various boolean ops (these are quite slow since Rhino is a surface modeller).