added the possibility of selective rounding of certain vertex
This commit is contained in:
parent
843c852523
commit
73db4e0190
|
@ -72,6 +72,8 @@ public:
|
||||||
bool round_singularities;
|
bool round_singularities;
|
||||||
//use the crease edges as feature or not
|
//use the crease edges as feature or not
|
||||||
bool crease_as_feature;
|
bool crease_as_feature;
|
||||||
|
//true if roound selected vert
|
||||||
|
bool round_selected;
|
||||||
|
|
||||||
MIQParameters()
|
MIQParameters()
|
||||||
{
|
{
|
||||||
|
@ -80,6 +82,7 @@ public:
|
||||||
directRound=true;
|
directRound=true;
|
||||||
round_singularities=true;
|
round_singularities=true;
|
||||||
crease_as_feature=false;
|
crease_as_feature=false;
|
||||||
|
round_selected=true;
|
||||||
stiffness=5;
|
stiffness=5;
|
||||||
stiffness_iter=10;
|
stiffness_iter=10;
|
||||||
local_iter=5;
|
local_iter=5;
|
||||||
|
@ -151,6 +154,15 @@ private:
|
||||||
|
|
||||||
std::vector<int> extra_round;
|
std::vector<int> extra_round;
|
||||||
|
|
||||||
|
if (MiqP.round_selected)
|
||||||
|
{
|
||||||
|
for (int i=0;i<trimesh.vert.size();i++)
|
||||||
|
{
|
||||||
|
if (!trimesh.vert[i].IsS())continue;
|
||||||
|
extra_round.push_back(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
igl::miq(V,F,X1,X2,UV,FUV,MiqP.gradient,MiqP.stiffness,MiqP.directRound,
|
igl::miq(V,F,X1,X2,UV,FUV,MiqP.gradient,MiqP.stiffness,MiqP.directRound,
|
||||||
MiqP.stiffness_iter,MiqP.local_iter,MiqP.doRound,MiqP.round_singularities,
|
MiqP.stiffness_iter,MiqP.local_iter,MiqP.doRound,MiqP.round_singularities,
|
||||||
extra_round,hard_features);
|
extra_round,hard_features);
|
||||||
|
@ -243,7 +255,15 @@ private:
|
||||||
|
|
||||||
|
|
||||||
std::vector<int> extra_round;
|
std::vector<int> extra_round;
|
||||||
|
//collect extra vertex selected that need to be rounded
|
||||||
|
if (MiqP.round_selected)
|
||||||
|
{
|
||||||
|
for (int i=0;i<trimesh.vert.size();i++)
|
||||||
|
{
|
||||||
|
if (!trimesh.vert[i].IsS())continue;
|
||||||
|
extra_round.push_back(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (MiqP.crease_as_feature)
|
if (MiqP.crease_as_feature)
|
||||||
GetFeatureLines(trimesh,hard_features);
|
GetFeatureLines(trimesh,hard_features);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue