Grasshopper

algorithmic modeling for Rhino

Stratigraphy/Soil Layers (Combining two meshes into one solid)

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?

Views: 1723

Replies to This Discussion

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.

Attachments:

Hmmm...  Now it works without using the bounding box.  Couldn't get the 'Closed Brep' earlier but looks OK in this version?

Attachments:

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.

Attachments:

Scale = 40:

Scale = 300:

On visual inspection with the 'Tree/List Viewer', it becomes apparent that layers with multiple breps have one VERY LARGE BREP that constitutes most of the surface area.  Sorting by area and using only the largest will clean up this model.

Data visualization baby!  Sometimes it's better to show "just the facts" before smoothing out the data.

Two surfaces... the "SAND" soil layer.

Back in the 1970s, Texas Instruments got BIG MONEY for interpreting oil field data like this.

POV!

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.

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service