Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(286)

Issue 4959056: fix weld vertices and primitive normal directions (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by howardt
Modified:
12 years, 8 months ago
Reviewers:
Ender79
Base URL:
https://svn.blender.org/svnroot/bf-blender/branches/bmesh/blender/
Visibility:
Public.

Description

Reverses order of vertices that weld op gives to make ngon so that it doesn't reverse the normal from what it used to be. Fixed a bunch of inconsistent normals in primitives: circle (made normal(s) point up instead of down), uvsphere, icosphere, cylinder, and cone.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -20 lines) Patch
M source/blender/bmesh/operators/primitiveops.c View 8 chunks +20 lines, -18 lines 2 comments Download
M source/blender/bmesh/operators/removedoubles.c View 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 1
Ender79
12 years, 8 months ago (2011-09-03 12:55:53 UTC) #1
Looks good

http://codereview.appspot.com/4959056/diff/1/source/blender/bmesh/operators/p...
File source/blender/bmesh/operators/primitiveops.c (right):

http://codereview.appspot.com/4959056/diff/1/source/blender/bmesh/operators/p...
source/blender/bmesh/operators/primitiveops.c:300: vec[0]= -dia*sinf(phi);
Since it seems essentially random which direction the normal will point when
extruding a face from a wire edge, it seems fine to flip it here if that fixes
the issue. But I wonder if this will start to show up in other places (addons).
I guess if it becomes a real problem, maybe we can flip the "randomness" so it
is always random the other way.

http://codereview.appspot.com/4959056/diff/1/source/blender/bmesh/operators/p...
source/blender/bmesh/operators/primitiveops.c:506: f = BM_Make_QuadTri(bm,
cent1, v1, firstv1, NULL, NULL, 0);
All these quadtri swaps look right for sure. The initial implementation before
these changes likely just shows how Blender's mode of drawing two-sided faces by
default can lead to thinking everything is all right when it in fact is not.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b