Reduce radius of key ball when add to convex hull.

master
Jeremy Hu 2017-01-08 12:07:18 +09:30
parent 37e1cf2ca7
commit ef11025e9e
1 changed files with 4 additions and 2 deletions

View File

@ -687,7 +687,9 @@ static convexHull *createConvexHullForBall(bmesh *bm, int depth,
return 0;
}
if (BMESH_BALL_TYPE_KEY == ball->type) {
if (-1 == addBallToHull(hull, ball,
bmeshBall reduceBall = *ball;
reduceBall.radius *= 0.75;
if (-1 == addBallToHull(hull, &reduceBall,
&outmostBall, &outmostBallFirstVertexIndex)) {
fprintf(stderr, "%s:addBallToHull failed.\n", __FUNCTION__);
arrayDestroy(ballPtrArray);
@ -1033,7 +1035,7 @@ int bmeshGenerate(bmesh *bm) {
bmeshGenerateInbetweenMesh(bm);
subdivCalculteNorms(bm->model);
//bm->subdivModel = subdivCatmullClark(bm->model);
bm->subdivModel = subdivCatmullClarkWithLoops(bm->model, 2);
bm->subdivModel = subdivCatmullClarkWithLoops(bm->model, 1);
return 0;
}