Grasshopper

algorithmic modeling for Rhino

Hi, I am new here. Thank you for a great plugin and forum!

I have a problem with the "offset mesh" function in weaverbird. I had the same problem in Rhino and thought it could be solved in GH, but I can't find my way....

The overall problem is about overlapping surfaces, because the shape is very curved. I need to keep the outside of the mesh and need to offset inside the mesh. Do anybody know how to solve this?

In this case it could be great to offset in the direction only towards an axis in the center of the shape... 

- and how do you make the offset solid?

Hope someone has an idea...

 

First image is the shape with no offset

second image is with offset showing the overlapping surface

Views: 14728

Replies to This Discussion

Hi,

here is a GH for offsetting a mesh without intersection. It used isosurface of Millipede. Weavebird is optional. I did offsetting inside the mesh, so I assume direction of faces of a closed mesh go outside. If you want positive offset you must resize the bounding box. I did use a million of point for isosurface. It was quite fast on my laptop.

Hope it helps

Laurent

Attachments:

Hi Laurent, 

It seems to work!

That's great. Thank you so much!

Cheers

Flemming

.There is a little bug in my definition. In order to see if the distance is positive or negative (inside) between a point "xyz" and a mesh. I determine the closest point between "xyz" and the mesh say this point is "Mxyz". I evaluate normal at "Mxyz" and I make a dot product between this normal and the vector Mxyz->xyz. In certain point the normal tend to invert results, so there are strange isosurfaces. I think for a smooth surface that is impossible  but for a mesh it seems to happen !

Instead I must code the algorithm inside or outside a volume using the party of numbers of intersection. 

Hi Laurent, 

Thank you! I have to check that more.

Thanks!

Flemming

here are an updated script using a VB script with  Mesh.IsInside instead of dot product. 

Here a comparison between v1 and v2

154 volumes with V1

95 volume with v2 (because of fin ears !)

Hope it works better !

thumbs up for this tool!

Yes, really neat! This really proves the potential of isosurfaces in mesh healing, should it had ever been in question.

Giulio

Updated script with mesh healing and also option for offset distance with real unit. 

Attachments:

Hi Laurent

Thank you for uploading this. I am working on something really complex, I have tried to offset with Rhino native offset and wb or even zbrush, but, they are all some how generating intersecting parts which I can not print.

I have downloaded offset_mesh_withoutself_intersection_v3.gh and installed meshedit, millipede, but, when I run the v3.gh and picked the mesh, e.g. a mesh sphere cut into half, and pick the cutted half, it is really really slow, I do mean slow, after like 1 or 2 mintues, it gives me nothing, I clicked output mesh, there is nothing, I am sure the preview is on.

Am I doing something wrong? 

Hi Laurent By the way, I am working on an open mesh. I can see the naked edges have been drew, but the result model can not find anywhere.

The mesh must be closed. Because it uses inside mesh, there is no inside outside on an open mesh.

Some new scripts more stand alone (without the need of Millipede) if needed. Not optimized for speed (no multi-threading)

Isosurface extraction using a rectilinear scalar field (here distance from a mesh)
1) rectilinear scalar field representing the distance from a closed mesh
used to obtain the offset of a mesh for example with a classical marching cubes, here iso-surface from Millipede 
2) Marching tetrahedrons
based on Paul Bourke program
http://paulbourke.net/geometry/polygonise/
3) Naive surface nets/dual contouring without smoothed vertex (could be non Manifold)
Idea from Mikola Lysenko 
http://0fps.net/2012/07/12/smooth-voxel-terrain-part-2/
4) Naive surface nets/dual contouring with smoothed vertex
Could be used to obtain quad mesh from a triangular mesh (could be non Manifold)
Idea from Mikola Lysenko
http://0fps.net/2012/07/12/smooth-voxel-terrain-part-2/

* MaxRes is the maximum number of cells in the longuest direction of the bounding box
* Factor is used to expand bounding box if you want positive offset
* Offset is in real unit, so it couldn't be less than the thickness of the object

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service