mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-25 06:00:32 +05:00
22860: EDF 9944 SMESH: Regression when scaling a mesh
This commit is contained in:
parent
513a8ebdac
commit
38136d541c
@ -47,15 +47,16 @@
|
||||
// SALOME GUI includes
|
||||
#include <LightApp_SelectionMgr.h>
|
||||
#include <LightApp_UpdateFlags.h>
|
||||
#include <SALOME_ListIO.hxx>
|
||||
#include <SVTK_ViewWindow.h>
|
||||
#include <SVTK_ViewModel.h>
|
||||
#include <SalomeApp_Application.h>
|
||||
#include <SUIT_ResourceMgr.h>
|
||||
#include <SUIT_OverrideCursor.h>
|
||||
#include <SUIT_MessageBox.h>
|
||||
#include <SUIT_Desktop.h>
|
||||
#include <QtxComboBox.h>
|
||||
#include <SALOME_ListIO.hxx>
|
||||
#include <SUIT_Desktop.h>
|
||||
#include <SUIT_MessageBox.h>
|
||||
#include <SUIT_OverrideCursor.h>
|
||||
#include <SUIT_ResourceMgr.h>
|
||||
#include <SUIT_Session.h>
|
||||
#include <SVTK_ViewModel.h>
|
||||
#include <SVTK_ViewWindow.h>
|
||||
#include <SalomeApp_Application.h>
|
||||
|
||||
// SALOME KERNEL includes
|
||||
#include <SALOMEDS_SObject.hxx>
|
||||
@ -1223,6 +1224,7 @@ void SMESHGUI_BaseComputeOp::onPublishShape()
|
||||
GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
|
||||
SALOMEDS::Study_var study = SMESHGUI::GetSMESHGen()->GetCurrentStudy();
|
||||
|
||||
QStringList entryList;
|
||||
QList<int> rows;
|
||||
SMESH::getSelectedRows( table(), rows );
|
||||
int row;
|
||||
@ -1260,10 +1262,13 @@ void SMESHGUI_BaseComputeOp::onPublishShape()
|
||||
QString shapeText = QString("%1 (%2)").arg( name.in() ).arg( entry.in() );
|
||||
table()->item( row, COL_SHAPE )->setText( shapeText );
|
||||
table()->item( row, COL_PUBLISHED )->setText( entry.in() );
|
||||
entryList.push_back( entry.in() );
|
||||
}
|
||||
}
|
||||
}
|
||||
getSMESHGUI()->getApp()->updateObjectBrowser();
|
||||
getSMESHGUI()->getApp()->browseObjects( entryList, /*isApplyAndClose=*/true );
|
||||
|
||||
currentCellChanged(); // to update buttons
|
||||
}
|
||||
|
||||
|
@ -4842,9 +4842,16 @@ SMESH_MeshEditor_i::scale(SMESH::SMESH_IDSource_ptr theObject,
|
||||
gp_Trsf aTrsf;
|
||||
|
||||
#if OCC_VERSION_LARGE > 0x06070100
|
||||
aTrsf.SetValues( S[0], 0, 0, thePoint.x * (1-S[0]),
|
||||
0, S[1], 0, thePoint.y * (1-S[1]),
|
||||
0, 0, S[2], thePoint.z * (1-S[2]) );
|
||||
// fight against ortagonalization
|
||||
// aTrsf.SetValues( S[0], 0, 0, thePoint.x * (1-S[0]),
|
||||
// 0, S[1], 0, thePoint.y * (1-S[1]),
|
||||
// 0, 0, S[2], thePoint.z * (1-S[2]) );
|
||||
aTrsf.SetTranslation( gp_Vec( thePoint.x * (1-S[0]),
|
||||
thePoint.y * (1-S[1]),
|
||||
thePoint.z * (1-S[2])));
|
||||
gp_Mat & M = ( gp_Mat& ) aTrsf.HVectorialPart();
|
||||
M.SetDiagonal( S[0], S[1], S[2] );
|
||||
|
||||
#else
|
||||
aTrsf.SetValues( S[0], 0, 0, thePoint.x * (1-S[0]),
|
||||
0, S[1], 0, thePoint.y * (1-S[1]),
|
||||
|
@ -4175,7 +4175,7 @@ class Mesh:
|
||||
|
||||
## Scales the object
|
||||
# @param theObject - the object to translate (mesh, submesh, or group)
|
||||
# @param thePoint - base point for scale
|
||||
# @param thePoint - base point for scale (SMESH.PointStruct or list of 3 coordinates)
|
||||
# @param theScaleFact - list of 1-3 scale factors for axises
|
||||
# @param Copy - allows copying the translated elements
|
||||
# @param MakeGroups - forces the generation of new groups from existing
|
||||
@ -4189,6 +4189,8 @@ class Mesh:
|
||||
if ( isinstance( theObject, list )):
|
||||
theObject = self.GetIDSource(theObject, SMESH.ALL)
|
||||
unRegister.set( theObject )
|
||||
if ( isinstance( thePoint, list )):
|
||||
thePoint = PointStruct( thePoint[0], thePoint[1], thePoint[2] )
|
||||
if ( isinstance( theScaleFact, float )):
|
||||
theScaleFact = [theScaleFact]
|
||||
if ( isinstance( theScaleFact, int )):
|
||||
@ -4203,7 +4205,7 @@ class Mesh:
|
||||
|
||||
## Creates a new mesh from the translated object
|
||||
# @param theObject - the object to translate (mesh, submesh, or group)
|
||||
# @param thePoint - base point for scale
|
||||
# @param thePoint - base point for scale (SMESH.PointStruct or list of 3 coordinates)
|
||||
# @param theScaleFact - list of 1-3 scale factors for axises
|
||||
# @param MakeGroups - forces the generation of new groups from existing ones
|
||||
# @param NewMeshName - the name of the newly created mesh
|
||||
@ -4215,6 +4217,8 @@ class Mesh:
|
||||
if ( isinstance( theObject, list )):
|
||||
theObject = self.GetIDSource(theObject,SMESH.ALL)
|
||||
unRegister.set( theObject )
|
||||
if ( isinstance( thePoint, list )):
|
||||
thePoint = PointStruct( thePoint[0], thePoint[1], thePoint[2] )
|
||||
if ( isinstance( theScaleFact, float )):
|
||||
theScaleFact = [theScaleFact]
|
||||
if ( isinstance( theScaleFact, int )):
|
||||
|
@ -266,7 +266,7 @@ class Mesh_Algorithm:
|
||||
# the value of \a isFacesToIgnore parameter.
|
||||
# @param isFacesToIgnore if \c True, the Viscous layers are not generated on the
|
||||
# faces specified by the previous parameter (\a faces).
|
||||
# @param extrMethod extrusion method defines how position of nodes are found during
|
||||
# @param extrMethod extrusion method defines how position of new nodes are found during
|
||||
# prism construction and how creation of distorted and intersecting prisms is
|
||||
# prevented. Possible values are:
|
||||
# - StdMeshers.SURF_OFFSET_SMOOTH (default) method extrudes nodes along normal
|
||||
|
Loading…
Reference in New Issue
Block a user