dbt-ethz / mola

Pure Python Mesh Structure
21 stars 25 forks source link

collectNewFaces: strange notation #14

Closed worbit closed 5 years ago

worbit commented 5 years ago

@piter123 pointed me to the following line: newFace=Face([edge1.vertex,v2.vertex,edge2.vertex,face.vertex]) subdivision.py, L25

so a new face should be created from a list of 4 vertices. but

  1. edge1.vertex: edge doesn't have a property vertex, but v1 and v2
  2. v2.vertex: v2 is a vertex and doesn't have a property vertex
  3. see number 1
  4. face.vertex: face has a list of vertices, but no property vertex either

this method is therefore highly susceptible to not work at all...? can the author please explain?

modellstadt commented 5 years ago

This property is added on the fly (thx to python)

It is a very fast way to make the necessary queries in a subdivision process. However not intuitive...

On Mar 28, 2019, at 11:48, Mathias Bernhard notifications@github.com wrote:

@piter123 pointed me to the following line: newFace=Face([edge1.vertex,v2.vertex,edge2.vertex,face.vertex]) subdivision.py, L25

so a new face should be created from a list of 4 vertices. but

edge1.vertex: edge doesn't have a property vertex, but v1 and v2 v2.vertex: v2 is a vertex and doesn't have a property vertex see number 1 face.vertex: face has a list of vertices, but no property vertex either this method is therefore highly susceptible to not work at all...? can the author please explain?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

worbit commented 5 years ago

ok, but only because subdivide or subdivideCatmull adds these fields first? so one would not be able to call collectNewFaces separately?

modellstadt commented 5 years ago

Yes, so we can make it private! Its shared between every quadbased subd method

On Mar 28, 2019, at 12:16, Mathias Bernhard notifications@github.com wrote:

ok, but only because subdivide or subdivideCatmull adds these fields first? so one would not be able to call collectNewFaces separately?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

modellstadt commented 5 years ago

Isnt it already private? It only makes sense in the context of subdivision, so it should be! Maybe one underscore missing? Otherwise issue can be closed

worbit commented 5 years ago

it is as private as it gets with python (has an underscore). pietro found it because of the upcoming c# implementation...