From 1385cad49b9b5c0e2dc64d86a7098294ed712ff8 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 29 Aug 2016 16:47:33 +0300 Subject: [PATCH] 53541: squish: MG-CADSurf Hypothesis Construction does not work correctly --- src/BLSURFPlugin/BLSURFPluginBuilder.py | 2 ++ src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx | 30 +++++++++---------- src/GUI/BLSURFPluginGUI_HypothesisCreator.h | 2 +- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/BLSURFPlugin/BLSURFPluginBuilder.py b/src/BLSURFPlugin/BLSURFPluginBuilder.py index 084b8c7..a1833a5 100644 --- a/src/BLSURFPlugin/BLSURFPluginBuilder.py +++ b/src/BLSURFPlugin/BLSURFPluginBuilder.py @@ -159,6 +159,7 @@ class BLSURF_Algorithm(Mesh_Algorithm): pass ## Sets maximal allowed ratio between the lengths of two adjacent edges. + # @param toUseGradation to use gradation # @param theVal value of maximal length ratio def SetGradation(self, toUseGradation=True, theVal=_gradation): if isinstance( toUseGradation, float ): ## backward compatibility @@ -169,6 +170,7 @@ class BLSURF_Algorithm(Mesh_Algorithm): pass ## Sets maximal allowed ratio between the lengths of two adjacent edges in 3D mesh. + # @param toUseGradation to use gradation # @param theVal value of maximal length ratio def SetVolumeGradation(self, toUseGradation=True, theVal=_gradation): if self.Parameters().GetGeometricMesh() == 0: theVal = self._volume_gradation diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index fb0f672..e8c27d1 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -1949,7 +1949,7 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const for ( ; evsIt != evs.end() ; ++evsIt) { enfVertex = (*evsIt); MESSAGE("Name: " << enfVertex->name); - double x, y, z = 0; + double x = 0, y = 0, z = 0; if (enfVertex->coords.size()) { x = enfVertex->coords[0]; y = enfVertex->coords[1]; @@ -2057,9 +2057,9 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData h_data.myQuadraticMesh = h->GetQuadraticMesh(); h_data.myVerbosity = h->GetVerbosity(); //h_data.myTopology = (int) h->GetTopology(); - h_data.myPreCADMergeEdges = h->GetPreCADMergeEdges(); - h_data.myPreCADProcess3DTopology = h->GetPreCADProcess3DTopology(); - h_data.myPreCADDiscardInput = h->GetPreCADDiscardInput(); + //h_data.myPreCADMergeEdges = h->GetPreCADMergeEdges(); + // h_data.myPreCADProcess3DTopology = h->GetPreCADProcess3DTopology(); + // h_data.myPreCADDiscardInput = h->GetPreCADDiscardInput(); BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this; @@ -2340,12 +2340,12 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi h->SetVerbosity( h_data.myVerbosity ); // if ( h->GetTopology() != h_data.myTopology ) // h->SetTopology( (int) h_data.myTopology ); - if ( h->GetPreCADMergeEdges() != h_data.myPreCADMergeEdges ) - h->SetPreCADMergeEdges( h_data.myPreCADMergeEdges ); - if ( h->GetPreCADProcess3DTopology() != h_data.myPreCADProcess3DTopology ) - h->SetPreCADProcess3DTopology( h_data.myPreCADProcess3DTopology ); - if ( h->GetPreCADDiscardInput() != h_data.myPreCADDiscardInput ) - h->SetPreCADDiscardInput( h_data.myPreCADDiscardInput ); + // if ( h->GetPreCADMergeEdges() != h_data.myPreCADMergeEdges ) + // h->SetPreCADMergeEdges( h_data.myPreCADMergeEdges ); + // if ( h->GetPreCADProcess3DTopology() != h_data.myPreCADProcess3DTopology ) + // h->SetPreCADProcess3DTopology( h_data.myPreCADProcess3DTopology ); + // if ( h->GetPreCADDiscardInput() != h_data.myPreCADDiscardInput ) + // h->SetPreCADDiscardInput( h_data.myPreCADDiscardInput ); // options are set in checkParams() //h->SetOptionValues( myOptions ); // is set in readParamsFromWidgets() @@ -2575,10 +2575,10 @@ QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothes guiHyp += tr("BLSURF_ELEMENT_ORDER") + " = " + QString(h_data.myQuadraticMesh ? "yes" : "no") + "; "; - guiHyp += tr("BLSURF_TOPOLOGY") + " = " + QString::number( h_data.myTopology ) + "; "; - guiHyp += tr("BLSURF_PRECAD_MERGE_EDGES") + " = " + QString(h_data.myPreCADMergeEdges ? "yes" : "no") + "; "; - guiHyp += tr("BLSURF_PRECAD_REMOVE_NANO_EDGES") + " = " + QString(h_data.myPreCADProcess3DTopology ? "yes" : "no") + "; "; - guiHyp += tr("BLSURF_PRECAD_DISCARD_INPUT") + " = " + QString(h_data.myPreCADDiscardInput ? "yes" : "no") + "; "; + // guiHyp += tr("BLSURF_TOPOLOGY") + " = " + QString::number( h_data.myTopology ) + "; "; + // guiHyp += tr("BLSURF_PRECAD_MERGE_EDGES") + " = " + QString(h_data.myPreCADMergeEdges ? "yes" : "no") + "; "; + // guiHyp += tr("BLSURF_PRECAD_REMOVE_NANO_EDGES") + " = " + QString(h_data.myPreCADProcess3DTopology ? "yes" : "no") + "; "; + // guiHyp += tr("BLSURF_PRECAD_DISCARD_INPUT") + " = " + QString(h_data.myPreCADDiscardInput ? "yes" : "no") + "; "; h_data.myGMFFileName = myAdvWidget->myGMFFileName->text().toStdString(); // h_data.myGMFFileMode = myGMFFileMode->isChecked(); @@ -3159,7 +3159,7 @@ bool BLSURFPluginGUI_HypothesisCreator::insertAttractor(GEOM::GEOM_Object_var aF QString constDistString = QString::fromStdString(oss3.str()); QTreeWidgetItem* item; - QTreeWidgetItem* child; + QTreeWidgetItem* child = 0; TAttractor attParams( attEntry.c_str(), phySize, infDist, constDist ); if (modify) { int rowToChange = findRowFromEntry(shapeEntry); diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h index e879db1..05ea7a2 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h @@ -169,7 +169,7 @@ typedef struct double myAnisotropicRatio, myTinyEdgeLength, myTinyEdgeOptimisLength, myBadElementAspectRatio, myCorrectSurfaceIntersectionMaxCost; bool myOptimizeMesh, myQuadraticMesh; bool myAllowQuadrangles, mySmpsurface,mySmpedge,mySmppoint,myEnforcedVertex,myInternalEnforcedVerticesAllFaces; - bool myPreCADMergeEdges, myPreCADProcess3DTopology, myPreCADDiscardInput; + // bool myPreCADMergeEdges, myPreCADProcess3DTopology, myPreCADDiscardInput; // bool myGMFFileMode; std::string myGMFFileName, myInternalEnforcedVerticesAllFacesGroup; TEnfVertexList enfVertexList; -- 2.39.2