I’m trying to script a way to get ‘the most amount of quads in a mesh,’ but I cannot create it. Do you know a way to cut an existing mesh?

Pink is the cutter and the red is the mesh.

20181031 problem mesh quads 01.gh (31.5 KB)

The simplest version, with native GH tools, would be to set the min and max edge in you mesh settings. This will, in most cases, result in as many quads as possible, before triangulating the edges. (obviously, the input edge value is dependent on the scale of your obect).

1 Like

How do you get beautiful triangels? Mine triangles look very mean. Yours looks very pretty.

20181031 problem mesh quads 02.gh (42.0 KB)

it has to do with how your input surface was created. I just made a boundary curve as an example. If your surface is planar, then you could just extract the boundary of the surface and plug that into your meshing component. The little triangles around the edge can get messy, depending on input shape.

I am looking for a component that merges the ‘ugly triangles.’

Do you know any?
I cannot understand why it would make twenty-one triangles in a place where it could be 1 quad.

well, if your solution requires as many quad faces as possible, (and you are using Rhino 6), you could try to use the “align veritices” component. This can help, but it is possible that it can collapse some faces and cause some unwanted behavior.

Or, you could try a remeshing approach using Mesh Machine/Kangaroo. This is really handy if your input surface is not planar, because you can tell it to “hold” certain points, which reduces deviation between the original mesh and the “remeshed” mesh.
You will still have triangulated faces around the edge, but they can be a bit cleaner.

1 Like

You are getting many triangles because your border is not just a polyline but a polycurve made of nurbs curve with very high number of control points.
If you know it should be just a polyline, get the discontinuity points (as Chris did just here ^ ) and redraw your border/perimeter.

What do you exactly mean?
I tried to follow your suggestion, but I could not make it ‘redraw border/perimeter.’

Chris’ one made it possible for me to create the quads.
But, your suggestion, your suggestion made me believe to go even further with quads (see image) below, however, I was not able to make it.

I thought from your description that I could do ‘discontinuity’ and ‘shatter’ to get the points and edges; and with a normal surface mesh extracting the vertices; combine everything and get a very smooth quad semi triangle mesh. That is what you meant right?

EDIT: see latest file below this post (my response to Mr. Chanley)

20181031 problem mesh quads 03.gh (71.5 KB)

I tried this to make it ‘better,’ but, my input is I guess not correct.
Do you see what I am doing wrong?

I think I am really close to what I am trying to achieve.

20181031 problem mesh quads 04.gh (78.1 KB)

make sure that it’s not just a preview issue? also, if you could save/post a simplified version, with just the one piece of geometry going into mesh machine, (similar to the screen shot I posted earlier), it would be a little easier to see what’s going on.

Simplified version.
20181031 problem mesh quads 05.gh (58.4 KB)

Try this.

2 Likes

I am now trying this with weaverbird,
but it does not work with the lines.

Do you know what I am doing wrong?
I am not able to shatter all the polylines to lines properly… I think

I tried a new meshing method, but I am not able to order the data correctly.
Do you might know what I am doing wrong?