Grasshopper

algorithmic modeling for Rhino

Hi Guys,

 

Is there a way to merge two triangular mesh faces within a pre-defined angle tolerance? I am trying to get rid of any extra triangles in my mesh.

 

How could I measure the angle between mesh faces? That could be a good start :)

 

Looking forward to your suggestions,

Many thanks,

 

Arthur

Views: 5857

Replies to This Discussion

Hi Arthur,

 

there is a Quadrangulate component in the latest release, does it not offer the flexibility you need?

 

--

David Rutten

david@mcneel.com

Leusden, Holland

Hi David,

 

Thanks a lot for this component it is very helpful but I am trying to also merge triangles (not necessarily into quads) when they are almost planar. Below is an example of pairs I would like to marry if possible:

 

Hey,

 

take the vertices,

make Srfs out of them,

take the egdes of the new generated triangelSrfs and rotate them around their SrfNormalVector 90 deg (delte befroe the dupLines)

extrude them in Normal direction

intersect the extrudeSrf with the triangles

join all intersectioncrv

you get polycrv out of two crvs

explode them and measure the angle

 

Best Regards

 

DeDackel

 

puhh...do you get it :-)

 

Here's My effort.

Attachments:

Thanks so much guys ! That was very fast :) 

 

David, playing with the quadrangulate input helped me reduce even more the triangle count.

My guess was that an Angle threshold of 1 and a Ratio threshhold of  0 is the ultimate merging input. Is that correct?

 

Danny, I have applied your definition to the mesh and I get a strange pattern with the angle:

When the angle is greater (2), the number is smaller and vice-versa with the small angle (1).

I will use this to merge the triangles and post the results here.

 

Thanks again guys, it's really nice of you!

Arthur

 

 

 

 

 

Sorry Danny it makes complete sense.

The angle is greater when two mesh faces are more open...

Stupid me.

 

Yipee I managed!! Thanks everyone (a round of virtual beer).

Danny the offset curve is taking 99% of the memory unfortunately and I am planning on using Galapagos on this  project which might make the whole thing too slow. The "quadrangulate mesh" component has an "angle tolerance" option therefore I am wondering if there would be a VB method to find the angle between mesh faces? Couldn't find it in the SDK yet...

 

 

Its that age old GH issue of which direction do we offset in. This version offsets both ways and then culls the longer one.
PS Much quicker
Attachments:
Wow! Danny you are the master of the tree (and the branches), you shift, sort, split, it's beautiful. The definition is so much faster than before. Virtual Champagne to you.

This ones even quicker, I've managed to get it down to 3ms.

 

Veuve Clicquot if you please :)

 

Attachments:

Very nice indeed. I suppose you could take it back to my Norman ancestors for a more authentic French sounding name: Chateau Du Bois. 

 

I was intrigued by the speed increase.

 

Slowest method Offset Surface on 72 faces = 26.4 seconds

Cull Offset Curve Method on 72 faces = 176 ms

 

Average Centers method on 72 faces = 87 ms

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