some Normals facing opposite direction

   2371   4   0
User Avatar
Member
50 posts
Joined: Nov. 2016
Offline
For some reason one of the faces has a normal facing the opposite direction. Higher up the node stack I have a extrude that insets the middle diameter and depending inset value i get a different face from the inner ring with bad normals or at some values its fine. I have tried using point sop, facet, normal and polydoctor to fix the normals but nothing happens.
I had deformed the initial tube shape from the base node(not talking about the container) rather than a transform. So I changed to transformed and checked the differences and it turned out both caused issues with normals just in different moments.

Attachments:
Capture.PNG (371.2 KB)
bad_normals.hipnc (70.7 KB)

User Avatar
Member
10 posts
Joined: April 2015
Offline
If you put this expression in your last group, it works.
@N.y<0.99

But seems a bug.
User Avatar
Member
6076 posts
Joined: Sept. 2011
Offline
You need some kind of angle threshold, you can't guarantee that 4 points will be perfectly coplanar and have a normal equal to exactly {0, 1, 0}. With any floating point value, exact equalities should be avoided.

To select faces aligned within 5 degrees of the Y axis:
dot(@N,{0,1,0})>=cos(radians(5.0))
User Avatar
Member
50 posts
Joined: Nov. 2016
Offline
I'll agree that most of the time i should be using a threshold but in this case nothing is deformed and all top faces should be planar and perpendicular to the Y axis. I wasn't using a threshold because I wanted to make things totally exact ( even though it doesn't matter in this case). But with 0.99 everything worked like a charm .
Jsmack could you elaborate a bit more on that expression? Why are you converting to cos?
User Avatar
Member
6076 posts
Joined: Sept. 2011
Offline
The comparison is to the cosine of the angle, because the dot product gives you the cosine of the angle between to two vectors. Instead of comparing to the cosine directly, which doesn't give a very intuitive response rate, this expression allows for comparing with the angle (in degrees), which is more easily visualized.
  • Quick Links