Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'OCCT780'
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_SelectionProxy.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_SelectionProxy.cxx
b/src/SMESHGUI/SMESHGUI_SelectionProxy.cxx
index 632350ef9f96c52d72454e351bd9b5a5bd1398bf..6d7afa4e3cc2ca98bc384b177aa35eb236105ea1 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_SelectionProxy.cxx
+++ b/
src/SMESHGUI/SMESHGUI_SelectionProxy.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-202
1 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-202
4 CEA, EDF
, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-276,7
+276,7
@@
SMESH::MeshInfo SMESH::SelectionProxy::meshInfo() const
SMESH::MeshInfo info;
if ( !isNull() )
{
SMESH::MeshInfo info;
if ( !isNull() )
{
- SMESH::
long
_array_var data = myObject->GetMeshInfo();
+ SMESH::
smIdType
_array_var data = myObject->GetMeshInfo();
for ( uint type = SMESH::Entity_Node; type < SMESH::Entity_Last; type++ )
{
if ( type < data->length() )
for ( uint type = SMESH::Entity_Node; type < SMESH::Entity_Last; type++ )
{
if ( type < data->length() )
@@
-494,7
+494,7
@@
bool SMESH::SelectionProxy::nodeConnectivity( int id, SMESH::Connectivity& conne
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) )
{
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) )
{
- SMESH::
long
_array_var elements = mesh->GetNodeInverseElements( id, SMESH::ALL );
+ SMESH::
smIdType
_array_var elements = mesh->GetNodeInverseElements( id, SMESH::ALL );
for ( int i = 0, n = elements->length(); i < n; i++ )
{
SMESH::ElementType type = mesh->GetElementType( elements[i], true );
for ( int i = 0, n = elements->length(); i < n; i++ )
{
SMESH::ElementType type = mesh->GetElementType( elements[i], true );
@@
-589,7
+589,7
@@
bool SMESH::SelectionProxy::hasElement( int id )
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) )
{
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) )
{
- SMESH::
long
_array_var nodes = mesh->GetElemNodes( id );
+ SMESH::
smIdType
_array_var nodes = mesh->GetElemNodes( id );
result = nodes->length() > 0;
}
}
result = nodes->length() > 0;
}
}
@@
-663,13
+663,13
@@
int SMESH::SelectionProxy::elementEntityType( int id ) const
\param connectivity Return element connectivity.
\return \c true if result is valid; \c false otherwise.
*/
\param connectivity Return element connectivity.
\return \c true if result is valid; \c false otherwise.
*/
-bool SMESH::SelectionProxy::elementConnectivity(
int
id, Connectivity& connectivity )
+bool SMESH::SelectionProxy::elementConnectivity(
SMESH::smIdType
id, Connectivity& connectivity )
{
bool result = false;
connectivity.clear();
if ( !isNull() )
{
{
bool result = false;
connectivity.clear();
if ( !isNull() )
{
- QSet<
int
> nodes; // order of nodes is important
+ QSet<
SMESH::smIdType
> nodes; // order of nodes is important
if ( actor() )
{
const SMDS_MeshElement* element = actor()->GetObject()->GetMesh()->FindElement( id );
if ( actor() )
{
const SMDS_MeshElement* element = actor()->GetObject()->GetMesh()->FindElement( id );
@@
-678,7
+678,7
@@
bool SMESH::SelectionProxy::elementConnectivity( int id, Connectivity& connectiv
{
while ( it->more() )
{
{
while ( it->more() )
{
-
int
n = it->next()->GetID();
+
SMESH::smIdType
n = it->next()->GetID();
if ( !nodes.contains( n ))
{
connectivity[ SMDSAbs_Node ] << n;
if ( !nodes.contains( n ))
{
connectivity[ SMDSAbs_Node ] << n;
@@
-693,7
+693,7
@@
bool SMESH::SelectionProxy::elementConnectivity( int id, Connectivity& connectiv
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) )
{
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) )
{
- SMESH::
long
_array_var nn = mesh->GetElemNodes( id );
+ SMESH::
smIdType
_array_var nn = mesh->GetElemNodes( id );
for ( int i = 0, nb = nn->length(); i < nb; i++ )
{
if ( !nodes.contains( nn[i] ))
for ( int i = 0, nb = nn->length(); i < nb; i++ )
{
if ( !nodes.contains( nn[i] ))
@@
-751,7
+751,7
@@
bool SMESH::SelectionProxy::perFaceConnectivity( int id, Connectivity& connectiv
CORBA::Long nbFaces = mesh->ElemNbFaces( id );
for ( CORBA::Long iF = 0; iF < nbFaces; ++iF )
{
CORBA::Long nbFaces = mesh->ElemNbFaces( id );
for ( CORBA::Long iF = 0; iF < nbFaces; ++iF )
{
- SMESH::
long
_array_var nodes = mesh->GetElemFaceNodes( id, iF );
+ SMESH::
smIdType
_array_var nodes = mesh->GetElemFaceNodes( id, iF );
for ( CORBA::ULong iN = 0; iN < nodes->length(); ++iN )
{
connectivity[ iF+1 ] << nodes[iN];
for ( CORBA::ULong iN = 0; iN < nodes->length(); ++iN )
{
connectivity[ iF+1 ] << nodes[iN];
@@
-825,7
+825,7
@@
bool SMESH::SelectionProxy::elementGravityCenter( int id, SMESH::XYZ& xyz )
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) )
{
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) )
{
- SMESH::
long
_array_var nodes = mesh->GetElemNodes( id );
+ SMESH::
smIdType
_array_var nodes = mesh->GetElemNodes( id );
for ( int i = 0, n = nodes->length(); i < n; i++ )
{
SMESH::double_array_var coords = mesh->GetNodeXYZ( nodes[i] );
for ( int i = 0, n = nodes->length(); i < n; i++ )
{
SMESH::double_array_var coords = mesh->GetNodeXYZ( nodes[i] );
@@
-908,6
+908,9
@@
bool SMESH::SelectionProxy::elementControl( int id, int control, double precisio
case SMESH::FT_Warping:
functor.reset( new SMESH::Controls::Warping() );
break;
case SMESH::FT_Warping:
functor.reset( new SMESH::Controls::Warping() );
break;
+ case SMESH::FT_Warping3D:
+ functor.reset(new SMESH::Controls::Warping3D());
+ break;
case SMESH::FT_MinimumAngle:
functor.reset( new SMESH::Controls::MinimumAngle() );
break;
case SMESH::FT_MinimumAngle:
functor.reset( new SMESH::Controls::MinimumAngle() );
break;
@@
-941,6
+944,9
@@
bool SMESH::SelectionProxy::elementControl( int id, int control, double precisio
case SMESH::FT_BallDiameter:
functor.reset( new SMESH::Controls::BallDiameter() );
break;
case SMESH::FT_BallDiameter:
functor.reset( new SMESH::Controls::BallDiameter() );
break;
+ case SMESH::FT_ScaledJacobian:
+ functor.reset( new SMESH::Controls::ScaledJacobian() );
+ break;
default:
break;
}
default:
break;
}
@@
-976,6
+982,9
@@
bool SMESH::SelectionProxy::elementControl( int id, int control, double precisio
case SMESH::FT_Warping:
functor = manager->CreateWarping();
break;
case SMESH::FT_Warping:
functor = manager->CreateWarping();
break;
+ case SMESH::FT_Warping3D:
+ functor = manager->CreateWarping3D();
+ break;
case SMESH::FT_MinimumAngle:
functor = manager->CreateMinimumAngle();
break;
case SMESH::FT_MinimumAngle:
functor = manager->CreateMinimumAngle();
break;
@@
-1009,6
+1018,9
@@
bool SMESH::SelectionProxy::elementControl( int id, int control, double precisio
case SMESH::FT_BallDiameter:
functor = manager->CreateBallDiameter();
break;
case SMESH::FT_BallDiameter:
functor = manager->CreateBallDiameter();
break;
+ case SMESH::FT_ScaledJacobian:
+ functor = manager->CreateScaledJacobian();
+ break;
default:
break;
}
default:
break;
}
@@
-1159,10
+1171,10
@@
QColor SMESH::SelectionProxy::color() const
\param autoCompute Compute size if it is unavailable. Defaults to \c false.
\return Group's size.
*/
\param autoCompute Compute size if it is unavailable. Defaults to \c false.
\return Group's size.
*/
-
int
SMESH::SelectionProxy::size( bool autoCompute ) const
+
SMESH::smIdType
SMESH::SelectionProxy::size( bool autoCompute ) const
{
// note: size is not computed for group on filter for performance reasons, see IPAL52831
{
// note: size is not computed for group on filter for performance reasons, see IPAL52831
-
int
result = -1;
+
SMESH::smIdType
result = -1;
if ( !isNull() )
{
SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject );
if ( !isNull() )
{
SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject );
@@
-1187,10
+1199,10
@@
int SMESH::SelectionProxy::size( bool autoCompute ) const
\param autoCompute Compute size if it is unavailable. Defaults to \c false.
\return Number of nodes contained in group.
*/
\param autoCompute Compute size if it is unavailable. Defaults to \c false.
\return Number of nodes contained in group.
*/
-
int
SMESH::SelectionProxy::nbNodes( bool autoCompute ) const
+
SMESH::smIdType
SMESH::SelectionProxy::nbNodes( bool autoCompute ) const
{
// note: nb of nodes is not computed automatically for performance reasons
{
// note: nb of nodes is not computed automatically for performance reasons
-
int
result = -1;
+
SMESH::smIdType
result = -1;
if ( !isNull() )
{
SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject );
if ( !isNull() )
{
SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject );
@@
-1220,7
+1232,7
@@
QSet<uint> SMESH::SelectionProxy::ids() const
SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject );
if ( !CORBA::is_nil( group ) )
{
SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject );
if ( !CORBA::is_nil( group ) )
{
- SMESH::
long
_array_var seq = group->GetListOfID();
+ SMESH::
smIdType
_array_var seq = group->GetListOfID();
for ( int i = 0, n = seq->length(); i < n; i++ )
result << (uint)seq[i];
}
for ( int i = 0, n = seq->length(); i < n; i++ )
result << (uint)seq[i];
}