algorithmic modeling for Rhino
Hey all,
I'm working on a project where we're analysing the soil composition for a site. We have all the borehole data drawn in CAD, so we've about 400 lines divided into parts representing the soil make up (sand, silt, clay etc.)
Because we don't have stratigraphy software, I'm trying to do this in grasshopper. My plan so far was to take the top and bottom points of each material, create two surfaces, and then maybe loft the edges together to make a big chunk of that material. I know it's not exact, but it's good enough for this stage of the project.
So far, the best way to represent the areas has been to make two Delaunay meshes, which groups the points into a mesh really well, but then turning those two meshes into a solid chunk is where I'm stuck.
Any suggestions?
Tags:
Give us the lines/points to work with? You can probably do it without meshes.
This is the Rhino file. They layers are all the soil parts. If I can figure out a script to do it for one type, eg sand, then I can do it for all of them.
I tried another approach, by getting contours from the mesh, with a view to then making a surface from the contours, but I'm not having much luck with that either.
Interesting... The vertical scale/range of the "curves" on each layer is extremely small compared to the horizontal scale of the "water (bubbles)" layer - the only one readily visible.
Looking at the "SAND" layer, 'Scale' by a factor of 100 gives some visual. Even so, there appears to be a wide range of lengths on just one layer. For each layer, you want to create a surface from the curve's start points and another surface from their end points?
I tried using this bit that converts a mesh to a brep:
http://www.grasshopper3d.com/forum/topics/volume-between-meshes?com...
It works here but the mesh has anomalies that have so far prevented me from creating a solid between the top and bottom points... Break time!
Here is something. Distorted but... I "fixed" the two Delaunay meshes by adding four points to each one, derived from the corner points of the top and bottom, respectively, of a slightly scaled bounding box. This allowed the two surfaces to be lofted as a "Closed Brep". Not ideal at all, but a direction for solving the problem?
This is the version where the curves on the SAND layer are scaled (vertically) by a factor of 40. There is a 'Value List' toggle to switch to the "Original" curves.
I tried applying the code posted previously to all the soil layers and color coding them... Found some anomalies that reveal flaws in the algorithm. The yellow panel in this image shows the number of breps for each layer of soil. Ideally, it would always be "1" closed brep, as I saw on the "SAND" layer ("{0;0}"). But as you can see, many soil layers end up with multiple breps, often not "Closed" (solid). Scaling the curves in each layer by a factor of 100 makes them easier to see but results in even more breps in some layers!
There are two different ways of color coding included. The 'Tree/List Viewer' has a 'path idx' slider that corresponds to each of the soil layers and a 'list idx' slider that highlights one brep at a time in each path (soil layer) when there is more than one.
It takes ~30 seconds to respond to a change in the scaling factor, so use that with care!
The 'Volume' component takes a LONG TIME so I recommend using it with only one soil layer or brep at a time. It makes no sense when scaled anyway.
Perseverance furthers.
Steady persistence in adhering to a course of action, a belief, or a purpose; steadfastness.
Wow, the captcha challenge on this forum is getting very aggressive?!
I made some changes that improve the two surfaces, based on top and bottom end points of the curves. The Delaunay meshes work better with no base plane (the 'Pl' input was 'WorldXY', is now "Empty Plane parameter). And I used 'Planar' inside the 'M2B (Mesh to Brep)' component to filter the faces used for brep. I've run into a wall, though, with the problem of how to generate a straight, clean brep between the edges of the top and bottom surfaces. It works in some cases, not others, due (I think) to vertical segments in the curve(s). Example:
What's the trick? Tried a lot of different things, all failed so far. Pretty sure I could do it manually by creating enough triangles between the top and bottom curves. I remember trying to solve a very similar problem in the past here on this forum, using a loop to methodically "walk" through the discontinuity points on the two curves - but I don't remember succeeding...?
The goal is to create a "Closed Brep" between 'Brep1' and 'Brep2', the top and bottom surfaces of one soil layer.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by