remove option to load/save abstract mesh in iso parametrization main

This commit is contained in:
alemuntoni 2021-07-05 14:57:16 +02:00
parent 59a4fe5836
commit 00efc9cdc7
2 changed files with 23 additions and 23 deletions

View File

@ -131,8 +131,8 @@ RichParameterList FilterIsoParametrization::initParameterList(const QAction *a,
par.addParam(RichInt("convergenceSpeed",1, "Convergence Precision", "This parameter controls the convergence speed/precision of the optimization of the texture coordinates. Larger the number slower the processing and ,eventually, slightly better results"));
par.addParam(RichBool("DoubleStep",true,"Double Step","Use this bool to divide the parameterization in 2 steps. Double step makes the overall process faster and robust."
"<br> Consider to disable this bool in case the object has topologycal noise or small handles."));
par.addParam(RichString("AbsLoadName", "", "Load AM", "The filename of the abstract mesh that has to be loaded. If empty, the abstract mesh will be computed according to the above parameters (suggested extension '.abs')."));
par.addParam(RichString("AbsSaveName", "", "Save AM", "The filename where the computed abstract mesh will be saved. If empty, nothing will be done."));
// par.addParam(RichOpenFile("AbsLoadName", "", {"*.txt"}, "Load AM", "The filename of the abstract mesh that has to be loaded. If empty, the abstract mesh will be computed according to the above parameters (suggested extension '.abs')."));
// par.addParam(RichSaveFile("AbsSaveName", "", "*.txt", "Save AM", "The filename where the computed abstract mesh will be saved. If empty, nothing will be done."));
break;
}
case ISOP_REMESHING :
@ -218,9 +218,9 @@ std::map<std::string, QVariant> FilterIsoParametrization::applyFilter(
CMeshO::PerMeshAttributeHandle<IsoParametrization> isoPHandle =
tri::Allocator<CMeshO>::GetPerMeshAttribute<IsoParametrization>(*mesh,"isoparametrization");
QString AbsLoadName = par.getString("AbsLoadName");
if(AbsLoadName.isEmpty())
{
// QString AbsLoadName = par.getString("AbsLoadName");
// if(AbsLoadName.isEmpty())
// {
IsoParametrizator Parametrizator;
switch (stopCriteria)
{
@ -276,24 +276,24 @@ std::map<std::string, QVariant> FilterIsoParametrization::applyFilter(
}
isoPHandle().CopyParametrization<CMeshO>(mesh); ///copy back to original mesh
}
else
{
AbstractMesh *abs_mesh = new AbstractMesh();
ParamMesh *para_mesh = new ParamMesh();
bool Done=isoPHandle().LoadBaseDomain<CMeshO>(qUtf8Printable(AbsLoadName),mesh,para_mesh,abs_mesh,true);
if (!Done)
{
delete para_mesh;
delete abs_mesh;
throw MLException("Abstract domain doesn't fit well with the parametrized mesh");
}
}
// }
// else
// {
// AbstractMesh *abs_mesh = new AbstractMesh();
// ParamMesh *para_mesh = new ParamMesh();
// bool Done=isoPHandle().LoadBaseDomain<CMeshO>(qUtf8Printable(AbsLoadName),mesh,para_mesh,abs_mesh,true);
// if (!Done)
// {
// delete para_mesh;
// delete abs_mesh;
// throw MLException("Abstract domain doesn't fit well with the parametrized mesh");
// }
// }
QString AbsSaveName = par.getString("AbsSaveName");
if(!AbsSaveName.isEmpty()) {
isoPHandle().SaveBaseDomain(qUtf8Printable(AbsSaveName));
}
// QString AbsSaveName = par.getString("AbsSaveName");
// if(!AbsSaveName.isEmpty()) {
// isoPHandle().SaveBaseDomain(qUtf8Printable(AbsSaveName));
// }
break;
}
case ISOP_REMESHING :

View File

@ -1754,7 +1754,7 @@ public:
typedef std::map<AbstractVertex*,int>::iterator iteMapVert;
///add vertices
fprintf(f,"%d,%d \n",AbsMesh()->fn,AbsMesh()->vn);
fprintf(f,"%d,%d \n",AbsMesh()->vn,AbsMesh()->fn);
int index=0;
for (unsigned int i=0;i<AbsMesh()->vert.size();i++)
{