mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
Merge remote-tracking branch 'origin/V9_5_BR'
Conflicts: src/SMESH_I/SMESH_Mesh_i.cxx
This commit is contained in:
commit
d55dbe18f5
@ -27,7 +27,7 @@ INCLUDE(CMakeDependentOption)
|
||||
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
|
||||
|
||||
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9)
|
||||
SET(${PROJECT_NAME_UC}_MINOR_VERSION 4)
|
||||
SET(${PROJECT_NAME_UC}_MINOR_VERSION 5)
|
||||
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
|
||||
SET(${PROJECT_NAME_UC}_VERSION
|
||||
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
|
||||
|
@ -1402,9 +1402,11 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
|
||||
SALOME_ListIteratorOfListIO anIt (aList);
|
||||
for (; anIt.More(); anIt.Next())
|
||||
{
|
||||
aGeomGroup = GEOMBase::ConvertIOinGEOMObject(anIt.Value());
|
||||
|
||||
CORBA::Object_var aGroupObj = SMESH::IObjectToObject(anIt.Value());
|
||||
if (CORBA::is_nil(aGroupObj))
|
||||
continue;
|
||||
// Check if the object is a geometry group
|
||||
aGeomGroup = GEOM::GEOM_Object::_narrow(aGroupObj);
|
||||
if (CORBA::is_nil(aGeomGroup))
|
||||
continue;
|
||||
|
||||
|
@ -43,8 +43,6 @@
|
||||
#include <SalomeApp_Application.h>
|
||||
#include <LightApp_VTKSelector.h>
|
||||
#include <SVTK_ViewWindow.h>
|
||||
#include <LightApp_SelectionMgr.h>
|
||||
#include <LightApp_DataOwner.h>
|
||||
|
||||
// IDL includes
|
||||
#include <SALOMEconfig.h>
|
||||
@ -79,8 +77,6 @@ void SMESHGUI_Selection::init( const QString& client, LightApp_SelectionMgr* mgr
|
||||
|
||||
if( mgr )
|
||||
{
|
||||
myOwners.clear();
|
||||
mgr->selected(myOwners, client);
|
||||
for( int i=0, n=count(); i<n; i++ ) {
|
||||
myTypes.append( typeName( type( entry( i ) ) ) );
|
||||
myControls.append( controlMode( i ) );
|
||||
@ -659,20 +655,22 @@ bool SMESHGUI_Selection::hasGeomReference( int ind ) const
|
||||
|
||||
bool SMESHGUI_Selection::canBreakLink( int ind ) const
|
||||
{
|
||||
if ( ind >= 0 && ind < myTypes.count()) {
|
||||
if (isReference(ind)) {
|
||||
SUIT_DataOwner* aOwn = myOwners.at(ind);
|
||||
LightApp_DataOwner* sowner = dynamic_cast<LightApp_DataOwner*>(aOwn);
|
||||
QString aEntry = sowner->entry();
|
||||
_PTR(SObject) aSObject = SMESH::getStudy()->FindObjectID(aEntry.toStdString());
|
||||
_PTR(SObject) aFatherObj = aSObject->GetFather();
|
||||
_PTR(SComponent) aComponent = aFatherObj->GetFatherComponent();
|
||||
if (aComponent->ComponentDataType() == "SMESH") {
|
||||
QString aObjEntry = entry(ind);
|
||||
_PTR(SObject) aGeomSObject = SMESH::getStudy()->FindObjectID(aObjEntry.toStdString());
|
||||
GEOM::GEOM_Object_var aObject = SMESH::SObjectToInterface<GEOM::GEOM_Object>(aGeomSObject);
|
||||
if (!aObject->_is_nil())
|
||||
return aObject->IsParametrical();
|
||||
if ( ind >= 0 && isReference(ind) ) {
|
||||
QString aEntry = objectInfo(ind, OI_RefEntry).toString();
|
||||
if (!aEntry.isEmpty()) {
|
||||
_PTR(SObject) aSObject = SMESH::getStudy()->FindObjectID( aEntry.toStdString());
|
||||
if (aSObject) {
|
||||
_PTR(SObject) aFatherObj = aSObject->GetFather();
|
||||
if (aFatherObj) {
|
||||
_PTR(SComponent) aComponent = aFatherObj->GetFatherComponent();
|
||||
if (aComponent && aComponent->ComponentDataType() == "SMESH") {
|
||||
QString aObjEntry = entry(ind);
|
||||
_PTR(SObject) aGeomSObject = SMESH::getStudy()->FindObjectID(aObjEntry.toStdString());
|
||||
GEOM::GEOM_Object_var aObject = SMESH::SObjectToInterface<GEOM::GEOM_Object>(aGeomSObject);
|
||||
if (!aObject->_is_nil())
|
||||
return aObject->IsParametrical();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,6 @@
|
||||
|
||||
// SALOME GUI includes
|
||||
#include <LightApp_Selection.h>
|
||||
#include <SUIT_DataOwner.h>
|
||||
|
||||
// SALOME KERNEL includes
|
||||
#include <SALOMEDSClient_definitions.hxx>
|
||||
@ -99,7 +98,6 @@ private:
|
||||
QStringList myTypes;
|
||||
QStringList myControls;
|
||||
QList<SMESH_Actor*> myActors;
|
||||
SUIT_DataOwnerPtrList myOwners;
|
||||
};
|
||||
|
||||
#endif // SMESHGUI_SELECTION_H
|
||||
|
@ -6757,7 +6757,8 @@ TListOfListOfInt SMESH_Mesh_i::findConcurrentSubMeshes()
|
||||
TDimHypList dimHypListArr[4]; // dimHyp list for each shape dimension
|
||||
|
||||
map<int, ::SMESH_subMesh*>::iterator i_sm = _mapSubMesh.begin();
|
||||
for ( ; i_sm != _mapSubMesh.end(); i_sm++ ) {
|
||||
for ( ; i_sm != _mapSubMesh.end(); i_sm++ )
|
||||
{
|
||||
::SMESH_subMesh* sm = (*i_sm).second;
|
||||
// shape of submesh
|
||||
const TopoDS_Shape& aSubMeshShape = sm->GetSubShape();
|
||||
@ -6767,7 +6768,8 @@ TListOfListOfInt SMESH_Mesh_i::findConcurrentSubMeshes()
|
||||
// Find out dimensions where the submesh can be concurrent.
|
||||
// We define the dimensions by algo of each of hypotheses in hypList
|
||||
list <const SMESHDS_Hypothesis*>::const_iterator hypIt = hypList.begin();
|
||||
for( ; hypIt != hypList.end(); hypIt++ ) {
|
||||
for( ; hypIt != hypList.end(); hypIt++ )
|
||||
{
|
||||
SMESH_Algo* anAlgo = 0;
|
||||
const SMESH_Hypothesis* hyp = dynamic_cast<const SMESH_Hypothesis*>(*hypIt);
|
||||
if ( hyp->GetType() != SMESHDS_Hypothesis::PARAM_ALGO )
|
||||
|
@ -2636,7 +2636,15 @@ class Mesh(metaclass = MeshMeta):
|
||||
elif tgeo == "SOLID" or tgeo == "COMPSOLID":
|
||||
typ = VOLUME
|
||||
elif tgeo == "COMPOUND":
|
||||
sub = self.geompyD.SubShapeAll( shape, self.geompyD.ShapeType["SHAPE"])
|
||||
try:
|
||||
sub = self.geompyD.SubShapeAll( shape, self.geompyD.ShapeType["SHAPE"])
|
||||
except:
|
||||
# try to get the SHAPERSTUDY engine directly, because GetGen does not work because of
|
||||
# simplification of access in geomBuilder: omniORB.registerObjref
|
||||
from SHAPERSTUDY_utils import getEngine
|
||||
gen = getEngine()
|
||||
if gen:
|
||||
sub = gen.GetIShapesOperations().ExtractSubShapes(shape, self.geompyD.ShapeType["SHAPE"], False)
|
||||
if not sub:
|
||||
raise ValueError("_groupTypeFromShape(): empty geometric group or compound '%s'" % GetName(shape))
|
||||
return self._groupTypeFromShape( sub[0] )
|
||||
|
@ -340,9 +340,20 @@ class Mesh_Algorithm:
|
||||
if faces and isinstance( faces[0], geomBuilder.GEOM._objref_GEOM_Object ):
|
||||
faceIDs = []
|
||||
for shape in faces:
|
||||
ff = self.mesh.geompyD.SubShapeAll( shape, self.mesh.geompyD.ShapeType["FACE"] )
|
||||
for f in ff:
|
||||
try:
|
||||
ff = self.mesh.geompyD.SubShapeAll( shape, self.mesh.geompyD.ShapeType["FACE"] )
|
||||
for f in ff:
|
||||
faceIDs.append( self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f))
|
||||
except:
|
||||
# try to get the SHAPERSTUDY engine directly, because GetGen does not work because of
|
||||
# simplification of access in geomBuilder: omniORB.registerObjref
|
||||
from SHAPERSTUDY_utils import getEngine
|
||||
gen = getEngine()
|
||||
if gen:
|
||||
aShapeOp = gen.GetIShapesOperations()
|
||||
ff = aShapeOp.ExtractSubShapes( shape, self.mesh.geompyD.ShapeType["FACE"], False)
|
||||
for f in ff:
|
||||
faceIDs.append( aShapeOp.GetSubShapeIndex( self.mesh.geom, f ))
|
||||
faces = faceIDs
|
||||
hyp = self.Hypothesis("ViscousLayers",
|
||||
[thickness, numberOfLayers, stretchFactor, faces, isFacesToIgnore],
|
||||
@ -392,9 +403,20 @@ class Mesh_Algorithm:
|
||||
if edges and isinstance( edges[0], geomBuilder.GEOM._objref_GEOM_Object ):
|
||||
edgeIDs = []
|
||||
for shape in edges:
|
||||
try:
|
||||
ee = self.mesh.geompyD.SubShapeAll( shape, self.mesh.geompyD.ShapeType["EDGE"])
|
||||
for e in ee:
|
||||
edgeIDs.append( self.mesh.geompyD.GetSubShapeID( self.mesh.geom, e ))
|
||||
edgeIDs.append( self.mesh.geompyD.GetSubShapeID( self.mesh.geom, e ))
|
||||
except:
|
||||
# try to get the SHAPERSTUDY engine directly, because GetGen does not work because of
|
||||
# simplification of access in geomBuilder: omniORB.registerObjref
|
||||
from SHAPERSTUDY_utils import getEngine
|
||||
gen = getEngine()
|
||||
if gen:
|
||||
aShapeOp = gen.GetIShapesOperations()
|
||||
ee = aShapeOp.ExtractSubShapes( shape, self.mesh.geompyD.ShapeType["EDGE"], False)
|
||||
for e in ee:
|
||||
edgeIDs.append( aShapeOp.GetSubShapeIndex( self.mesh.geom, e ))
|
||||
edges = edgeIDs
|
||||
hyp = self.Hypothesis("ViscousLayers2D",
|
||||
[thickness, numberOfLayers, stretchFactor, edges, isEdgesToIgnore],
|
||||
|
Loading…
Reference in New Issue
Block a user