(ngon) Mesh Edges

mesh

(Laurent Delrieu) #1

Hello
I have some difficulties with GH1.0/Rhinoceros WIP.
I have a mesh with triangles and quads. I made it using 3-D face. I want to extract the edges, with triangles no problem but with quad I also get interior edges. I understand that a non flat quad/ngon doesn’t exist and is triangulated. But I made a flat quad and then I move a vertice I didn’t get the inner edge (see image below). Is there a way to force Rhino 6/Grasshopper to differentiate the intented edges and the others (interior) edges ?
Here the differences between V6 and V5

V6
mesh ngon.gh (7.1 KB)
And not the problem on V5 (i understand that on v5 there are no ngons)

mesh ngon v5.gh (3.7 KB)

Thanks


Inconsistent Quad Meshes in Rhino 6 (related to n-gons)
(David Rutten) #2

Hi Laurent,

the meshes in that file have no n-gons, so that’s not the problem. Also upon importing I can only find two quads in that mesh, the edge that popped up in Rhino6 seems to be a perfectly valid edge between two triangle faces.

Can you select the mesh in both Rhino5 and Rhino6, run the _List command and tell me what you’re getting for the mesh face data (waaaay at the bottom). Mine looks like this on Rhino6:

10 mesh faces:
  m_F[0].vi = (0,2,1)
  m_F[1].vi = (4,3,6)
  m_F[2].vi = (6,5,4)
  m_F[3].vi = (7,8,9)
  m_F[4].vi = (10,11,12,13)
  m_F[5].vi = (14,15,16,17)
  m_F[6].vi = (20,21,18)
  m_F[7].vi = (18,19,20)
  m_F[8].vi = (25,22,23)
  m_F[9].vi = (23,24,25)

(Laurent Delrieu) #3

Thanks David I will do that when I will be near my PC.
But if you look at the pictures I gave, you will notice some differences between the edges showed in Rhino (there are more than 2 quads) and the one in Grasshopper 1.
So it means that internalising geometry changes the quads non planar in triangles. ngon meshes bring some differences in the treatment of meshes. As meshes could be used as a topology tool. For my example I don’t care of the surface, I just want to use the connections between vertices. I don’t want the new connections made because my quads are non planar. The problem is certainly more on Rhino side than on GH side.


(Laurent Delrieu) #4

Here the result on RH5mesh ngon v5.gh (5.5 KB)

7 mesh faces:
  m_F[0].vi = (0,1,2)
  m_F[1].vi = (3,6,5,4)
  m_F[2].vi = (7,10,9,8)
  m_F[3].vi = (11,13,12)
  m_F[4].vi = (14,17,16,15)
  m_F[5].vi = (18,21,20,19)
  m_F[6].vi = (22,25,24,23)

On RH 6
10 mesh faces:
m_F[0].vi = (0,2,1)
m_F[1].vi = (4,3,6)
m_F[2].vi = (6,5,4)
m_F[3].vi = (7,8,9)
m_F[4].vi = (10,11,12,13)
m_F[5].vi = (14,15,16,17)
m_F[6].vi = (20,21,18)
m_F[7].vi = (18,19,20)
m_F[8].vi = (25,22,23)
m_F[9].vi = (23,24,25)
3 mesh n-gons:
Ngon(0): m_vi[4]=(3,4,5,6) m_fi[2]=(1,2) capacity=7 boundary counts outer = 4, inner = 0
Ngon(1): m_vi[4]=(18,19,20,21) m_fi[2]=(6,7) capacity=7 boundary counts outer = 4, inner = 0
Ngon(2): m_vi[4]=(22,23,24,25) m_fi[2]=(8,9) capacity=7 boundary counts

So at the end Rhino shows ngon edges, knows them but triangulate when it is not flat. So it will be useful to be able with mesh edges (and surely others topology components) to access the ngon edges only and flat ngon edges list. I can surely script it but a component is a must have. At the moment I need it in order to make “Morpheus Zaha Hadid” like geometry exoskeletton.

Thanks


(David Rutten) #5

So if I understand this correctly, the mesh was made on Rhino5 and contains 2 triangles and 5 quads.
When this mesh is transferred to Rhino6 it turns into a mesh containing 8 triangles and 2 quads, and three n-gons that combine two triangles each, but in ways different than the original quads?

How was the mesh originally made (by hand? import? via GH?) and how was it put into Rhino6 (via GH? import 3dm?)


(Giulio Piacentino) #6

Hi @laurent_delrieu

I’ve looked quickly into this and opened the last definition (mesh_ngon_v5.gh) both in Rhino 5 and in WIP. I get the same amount of edges, faces and vertices. Similarly as David says, could you please explain in detail the process by which you get this inconsistency?

5

WIP

Thanks,

Giulio

Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com


(Laurent Delrieu) #8

Thanks for looking at that. First I made the mesh using 3D face in rhino WIP. Non flat quad are triangulated.
A simple example of the problem
1 Make a flat quad mesh in WIP move a vertice to make non quad
2 use these vertice to make the same mesh
So you have 2 meshes with one face
Apply GH script,one will have an extra edge
It is surely normal but when I draw a quad it is because I want the quad edges not the edges of the triangulated quad/ngon.


(Giulio Piacentino) #9

Hi @laurent_delrieu

yes, now I fully understand what happens. In the _3dFace command, Rhino WIP creates Ngons for 4-sided faces, while Rhino 5 creates quad-faces. Grasshopper currently ignores ngon information when computing edges, so, similarly-constructed geometry (although not the same one) gives different edges. This will be fixed when Grasshopper will be able to compute edges based on ngons.

See RH-38586 for more information and follow ups.


(Brian Gillespie) #12

RH-38586 is fixed in the latest WIP


(David Rutten) #13

And Grasshopper has been updated to use this. The Mesh Edges component will no longer return any of the edges that are on the interior of n-gons.


(David Rutten) #14

I also changed the [Face Boundaries] component to take ngons into account. I’m not sure how [Face Circles] should behave with respect to Ngons, possibly it should treat triangles that are part of ngons as though they do not exist.


#15

Hi!

I just tried to create a mesh with nGons. In the Rhino Properties it looks good:
Geometry:
Valid mesh.
Open double precision polygon mesh: 100 vertices, 25 faces with normals (10 n-gons)
bounding box: (30.8045,28.6149,0) to (122.325,144.511,66.5751)

but in the viewport i am still seeing the quad faces, is that normal?
It looks exactly like a non-nGon mesh?

thanks

Edit: Problem is fixed, there were duplicate vertices.