forked from bartvdbraak/blender
Didn't notice this patch when was fixing bug myself, but it fixes some more suspecious usages of angle_v2v2 instead of angle_v3v3.
This commit is contained in:
parent
c00eba13e0
commit
a1277508cc
@ -3234,13 +3234,13 @@ static float measure_facepair(EditVert *v1, EditVert *v2, EditVert *v3, EditVert
|
||||
normal_tri_v3( noA2,v1->co, v3->co, v4->co);
|
||||
|
||||
if(noA1[0] == noA2[0] && noA1[1] == noA2[1] && noA1[2] == noA2[2]) normalADiff = 0.0;
|
||||
else normalADiff = RAD2DEGF(angle_v2v2(noA1, noA2));
|
||||
else normalADiff = RAD2DEGF(angle_v3v3(noA1, noA2));
|
||||
//if(!normalADiff) normalADiff = 179;
|
||||
normal_tri_v3( noB1,v2->co, v3->co, v4->co);
|
||||
normal_tri_v3( noB2,v4->co, v1->co, v2->co);
|
||||
|
||||
if(noB1[0] == noB2[0] && noB1[1] == noB2[1] && noB1[2] == noB2[2]) normalBDiff = 0.0;
|
||||
else normalBDiff = RAD2DEGF(angle_v2v2(noB1, noB2));
|
||||
else normalBDiff = RAD2DEGF(angle_v3v3(noB1, noB2));
|
||||
//if(!normalBDiff) normalBDiff = 179;
|
||||
|
||||
measure += (normalADiff/360) + (normalBDiff/360);
|
||||
@ -3255,10 +3255,10 @@ static float measure_facepair(EditVert *v1, EditVert *v2, EditVert *v3, EditVert
|
||||
diff = 0.0;
|
||||
|
||||
diff = (
|
||||
fabsf(RAD2DEGF(angle_v2v2(edgeVec1, edgeVec2)) - 90) +
|
||||
fabsf(RAD2DEGF(angle_v2v2(edgeVec2, edgeVec3)) - 90) +
|
||||
fabsf(RAD2DEGF(angle_v2v2(edgeVec3, edgeVec4)) - 90) +
|
||||
fabsf(RAD2DEGF(angle_v2v2(edgeVec4, edgeVec1)) - 90)) / 360;
|
||||
fabsf(RAD2DEGF(angle_v3v3(edgeVec1, edgeVec2)) - 90) +
|
||||
fabsf(RAD2DEGF(angle_v3v3(edgeVec2, edgeVec3)) - 90) +
|
||||
fabsf(RAD2DEGF(angle_v3v3(edgeVec3, edgeVec4)) - 90) +
|
||||
fabsf(RAD2DEGF(angle_v3v3(edgeVec4, edgeVec1)) - 90)) / 360;
|
||||
if(!diff) return 0.0;
|
||||
|
||||
measure += diff;
|
||||
@ -4869,7 +4869,7 @@ void mesh_set_face_flags(EditMesh *em, short mode)
|
||||
/* helper to find edge for edge_rip */
|
||||
static float mesh_rip_edgedist(ARegion *ar, float mat[][4], float *co1, float *co2, const int mval[2])
|
||||
{
|
||||
float vec1[3], vec2[3], mvalf[2];
|
||||
float vec1[2], vec2[2], mvalf[2];
|
||||
|
||||
ED_view3d_project_float(ar, co1, vec1, mat);
|
||||
ED_view3d_project_float(ar, co2, vec2, mat);
|
||||
|
Loading…
Reference in New Issue
Block a user