From 00efc9cdc73ff23bad034aff9260fc3bcb9e2336 Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Mon, 5 Jul 2021 14:57:16 +0200 Subject: [PATCH] remove option to load/save abstract mesh in iso parametrization main --- .../filter_isoparametrization.cpp | 44 +++++++++---------- .../iso_parametrization.h | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.cpp b/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.cpp index 83bde12a4..60cc63b2f 100644 --- a/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.cpp +++ b/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.cpp @@ -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." "
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 FilterIsoParametrization::applyFilter( CMeshO::PerMeshAttributeHandle isoPHandle = tri::Allocator::GetPerMeshAttribute(*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 FilterIsoParametrization::applyFilter( } isoPHandle().CopyParametrization(mesh); ///copy back to original mesh - } - else - { - AbstractMesh *abs_mesh = new AbstractMesh(); - ParamMesh *para_mesh = new ParamMesh(); - bool Done=isoPHandle().LoadBaseDomain(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(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 : diff --git a/src/meshlabplugins/filter_isoparametrization/iso_parametrization.h b/src/meshlabplugins/filter_isoparametrization/iso_parametrization.h index 403e9f36c..cc1300932 100644 --- a/src/meshlabplugins/filter_isoparametrization/iso_parametrization.h +++ b/src/meshlabplugins/filter_isoparametrization/iso_parametrization.h @@ -1754,7 +1754,7 @@ public: typedef std::map::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;ivert.size();i++) {