mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 17:30:32 +05:00
fix indentation
This commit is contained in:
parent
d2c62e114d
commit
f55c997d2e
@ -143,7 +143,7 @@ SMESH_Mesh::SMESH_Mesh():
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
void deleteMeshDS(SMESHDS_Mesh* meshDS)
|
void deleteMeshDS(SMESHDS_Mesh* meshDS)
|
||||||
{
|
{
|
||||||
//cout << "deleteMeshDS( " << meshDS << endl;
|
//cout << "deleteMeshDS( " << meshDS << endl;
|
||||||
delete meshDS;
|
delete meshDS;
|
||||||
@ -152,18 +152,18 @@ namespace
|
|||||||
static void* deleteMeshDS(void* meshDS)
|
static void* deleteMeshDS(void* meshDS)
|
||||||
{
|
{
|
||||||
//cout << "deleteMeshDS( " << meshDS << endl;
|
//cout << "deleteMeshDS( " << meshDS << endl;
|
||||||
SMESHDS_Mesh* m = (SMESHDS_Mesh*)meshDS;
|
SMESHDS_Mesh* m = (SMESHDS_Mesh*)meshDS;
|
||||||
if(m) {
|
if(m) {
|
||||||
delete m;
|
delete m;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ SMESH_Mesh::~SMESH_Mesh()
|
|||||||
_myDocument = 0;
|
_myDocument = 0;
|
||||||
|
|
||||||
if ( _myMeshDS ) {
|
if ( _myMeshDS ) {
|
||||||
// delete _myMeshDS, in a thread in order not to block closing a study with large meshes
|
// delete _myMeshDS, in a thread in order not to block closing a study with large meshes
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
boost::thread aThread(boost::bind( & deleteMeshDS, _myMeshDS ));
|
boost::thread aThread(boost::bind( & deleteMeshDS, _myMeshDS ));
|
||||||
#else
|
#else
|
||||||
|
@ -762,22 +762,22 @@ void rotationToNormal ( double theRotation[2],
|
|||||||
switch ( theOrientation ) {
|
switch ( theOrientation ) {
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
theDir[0][1] = anU[0];
|
theDir[0][1] = anU[0];
|
||||||
theDir[0][2] = aV[0];
|
theDir[0][2] = aV[0];
|
||||||
theDir[1][0] = anU[1];
|
theDir[1][0] = anU[1];
|
||||||
theDir[1][2] = aV[1];
|
theDir[1][2] = aV[1];
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
theDir[0][2] = anU[0];
|
theDir[0][2] = anU[0];
|
||||||
theDir[0][0] = aV[0];
|
theDir[0][0] = aV[0];
|
||||||
theDir[1][1] = anU[1];
|
theDir[1][1] = anU[1];
|
||||||
theDir[1][0] = aV[1];
|
theDir[1][0] = aV[1];
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
theDir[0][0] = anU[0];
|
theDir[0][0] = anU[0];
|
||||||
theDir[0][1] = aV[0];
|
theDir[0][1] = aV[0];
|
||||||
theDir[1][2] = anU[1];
|
theDir[1][2] = anU[1];
|
||||||
theDir[1][1] = aV[1];
|
theDir[1][1] = aV[1];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -799,12 +799,12 @@ bool SMESHGUI_ClippingDlg::AddPlane ( SMESH::TActorList theActorList,
|
|||||||
|
|
||||||
int anOrientation;
|
int anOrientation;
|
||||||
if ( thePlane->PlaneMode == SMESH::Absolute )
|
if ( thePlane->PlaneMode == SMESH::Absolute )
|
||||||
anOrientation = thePlane->myAbsoluteOrientation;
|
anOrientation = thePlane->myAbsoluteOrientation;
|
||||||
else if ( thePlane->PlaneMode == SMESH::Relative )
|
else if ( thePlane->PlaneMode == SMESH::Relative )
|
||||||
anOrientation = thePlane->myRelativeOrientation + 1;
|
anOrientation = thePlane->myRelativeOrientation + 1;
|
||||||
|
|
||||||
if ( anOrientation == 0 ) {
|
if ( anOrientation == 0 ) {
|
||||||
// compute a direction for plane in absolute mode
|
// compute a direction for plane in absolute mode
|
||||||
double znam = sqrt( thePlane->Dx*thePlane->Dx + thePlane->Dy*thePlane->Dy + thePlane->Dz*thePlane->Dz );
|
double znam = sqrt( thePlane->Dx*thePlane->Dx + thePlane->Dy*thePlane->Dy + thePlane->Dz*thePlane->Dz );
|
||||||
double aRotation = acos( thePlane->Dy/znam )/aCoeff;
|
double aRotation = acos( thePlane->Dy/znam )/aCoeff;
|
||||||
if ( thePlane->Dy >= 0.0 && thePlane->Dz >= 0.0 ) thePlane->myAngle[0] = 90.0 + aRotation;
|
if ( thePlane->Dy >= 0.0 && thePlane->Dz >= 0.0 ) thePlane->myAngle[0] = 90.0 + aRotation;
|
||||||
@ -905,10 +905,10 @@ bool SMESHGUI_ClippingDlg::AddPlane ( SMESH::TActorList theActorList,
|
|||||||
for ( ; anIter != theActorList.end(); anIter++ )
|
for ( ; anIter != theActorList.end(); anIter++ )
|
||||||
if( vtkActor* aVTKActor = *anIter )
|
if( vtkActor* aVTKActor = *anIter )
|
||||||
if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) ) {
|
if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) ) {
|
||||||
if( thePlane->IsOpenGLClipping )
|
if( thePlane->IsOpenGLClipping )
|
||||||
anActor->AddOpenGLClippingPlane( thePlane->InvertPlane() );
|
anActor->AddOpenGLClippingPlane( thePlane->InvertPlane() );
|
||||||
else
|
else
|
||||||
anActor->AddClippingPlane( thePlane );
|
anActor->AddClippingPlane( thePlane );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -1169,7 +1169,7 @@ void SMESHGUI_ClippingDlg::updateActorItem( QListWidgetItem* theItem,
|
|||||||
|
|
||||||
SMESH::ComputeBounds( anActorList, myBounds );
|
SMESH::ComputeBounds( anActorList, myBounds );
|
||||||
myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
|
myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
|
||||||
myBounds[3], myBounds[4], myBounds[5] );
|
myBounds[3], myBounds[4], myBounds[5] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1367,7 +1367,7 @@ void SMESHGUI_ClippingDlg::onSelectPlane ( int theIndex )
|
|||||||
myIsSelectPlane = false;
|
myIsSelectPlane = false;
|
||||||
SMESH::ComputeBounds( aPlaneData.ActorList, myBounds );
|
SMESH::ComputeBounds( aPlaneData.ActorList, myBounds );
|
||||||
myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
|
myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
|
||||||
myBounds[3], myBounds[4], myBounds[5] );
|
myBounds[3], myBounds[4], myBounds[5] );
|
||||||
SetCurrentPlaneParam();
|
SetCurrentPlaneParam();
|
||||||
|
|
||||||
// Actors
|
// Actors
|
||||||
@ -1454,9 +1454,9 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam()
|
|||||||
double aRot[2] = { getRotation1(), getRotation2() };
|
double aRot[2] = { getRotation1(), getRotation2() };
|
||||||
int anOrient;
|
int anOrient;
|
||||||
if ( aPlane->PlaneMode == SMESH::Absolute )
|
if ( aPlane->PlaneMode == SMESH::Absolute )
|
||||||
anOrient = CBAbsoluteOrientation->currentIndex();
|
anOrient = CBAbsoluteOrientation->currentIndex();
|
||||||
else if ( aPlane->PlaneMode == SMESH::Relative )
|
else if ( aPlane->PlaneMode == SMESH::Relative )
|
||||||
anOrient = CBRelativeOrientation->currentIndex() + 1;
|
anOrient = CBRelativeOrientation->currentIndex() + 1;
|
||||||
|
|
||||||
if ( aPlane->PlaneMode == SMESH::Relative ) {
|
if ( aPlane->PlaneMode == SMESH::Relative ) {
|
||||||
aPlane->myAngle[0] = aRot[0];
|
aPlane->myAngle[0] = aRot[0];
|
||||||
@ -1466,7 +1466,7 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( anOrient == 0 ) {
|
if ( anOrient == 0 ) {
|
||||||
// compute a direction for plane in absolute mode
|
// compute a direction for plane in absolute mode
|
||||||
double znam = sqrt( aPlane->Dx*aPlane->Dx + aPlane->Dy*aPlane->Dy + aPlane->Dz*aPlane->Dz );
|
double znam = sqrt( aPlane->Dx*aPlane->Dx + aPlane->Dy*aPlane->Dy + aPlane->Dz*aPlane->Dz );
|
||||||
double aRotation = acos( aPlane->Dy/znam )/aCoeff;
|
double aRotation = acos( aPlane->Dy/znam )/aCoeff;
|
||||||
if ( aPlane->Dy >= 0.0 && aPlane->Dz >= 0.0 ) aRot[0] = 90.0 + aRotation;
|
if ( aPlane->Dy >= 0.0 && aPlane->Dz >= 0.0 ) aRot[0] = 90.0 + aRotation;
|
||||||
@ -1508,7 +1508,7 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam()
|
|||||||
anOrigin[1] = aPlane->Y;
|
anOrigin[1] = aPlane->Y;
|
||||||
anOrigin[2] = aPlane->Z;
|
anOrigin[2] = aPlane->Z;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( anIsOk ) {
|
if( anIsOk ) {
|
||||||
aPlane->SetNormal( aNormal );
|
aPlane->SetNormal( aNormal );
|
||||||
aPlane->SetOrigin( anOrigin );
|
aPlane->SetOrigin( anOrigin );
|
||||||
@ -1614,7 +1614,7 @@ void SMESHGUI_ClippingDlg::setBoundsForPreviewWidget()
|
|||||||
if( anOrigin[2] < aBounds[4] ) {
|
if( anOrigin[2] < aBounds[4] ) {
|
||||||
myBounds[4] = anOrigin[2]; isBoundsChanged = true; }
|
myBounds[4] = anOrigin[2]; isBoundsChanged = true; }
|
||||||
if( anOrigin[2] > aBounds[5] ) {
|
if( anOrigin[2] > aBounds[5] ) {
|
||||||
myBounds[5] = anOrigin[2]; isBoundsChanged = true; }
|
myBounds[5] = anOrigin[2]; isBoundsChanged = true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if( isBoundsChanged )
|
if( isBoundsChanged )
|
||||||
@ -1803,10 +1803,10 @@ void SMESHGUI_ClippingDlg::ClickOnApply()
|
|||||||
for( ; anIter3 != anActorList.end(); anIter3++ )
|
for( ; anIter3 != anActorList.end(); anIter3++ )
|
||||||
if( vtkActor* aVTKActor = *anIter3 )
|
if( vtkActor* aVTKActor = *anIter3 )
|
||||||
if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) ) {
|
if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) ) {
|
||||||
if( anOrientedPlane->IsOpenGLClipping )
|
if( anOrientedPlane->IsOpenGLClipping )
|
||||||
anActor->AddOpenGLClippingPlane( anOrientedPlane->InvertPlane() );
|
anActor->AddOpenGLClippingPlane( anOrientedPlane->InvertPlane() );
|
||||||
else
|
else
|
||||||
anActor->AddClippingPlane( anOrientedPlane );
|
anActor->AddClippingPlane( anOrientedPlane );
|
||||||
}
|
}
|
||||||
|
|
||||||
SMESH::ClippingPlaneInfo aClippingPlaneInfo;
|
SMESH::ClippingPlaneInfo aClippingPlaneInfo;
|
||||||
@ -1820,7 +1820,7 @@ void SMESHGUI_ClippingDlg::ClickOnApply()
|
|||||||
anAllActors->InitTraversal();
|
anAllActors->InitTraversal();
|
||||||
while( vtkActor* aVTKActor = anAllActors->GetNextActor() )
|
while( vtkActor* aVTKActor = anAllActors->GetNextActor() )
|
||||||
if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) ) {
|
if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) ) {
|
||||||
anSMESHActor = anActor;
|
anSMESHActor = anActor;
|
||||||
anActor->SetOpenGLClippingPlane();
|
anActor->SetOpenGLClippingPlane();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1392,13 +1392,13 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
|
|||||||
}
|
}
|
||||||
// check that tab enable, if algorithm building needed algo is one less than dimension
|
// check that tab enable, if algorithm building needed algo is one less than dimension
|
||||||
if ( algoData && myIsOnGeometry && !algoData->InputTypes.isEmpty() &&
|
if ( algoData && myIsOnGeometry && !algoData->InputTypes.isEmpty() &&
|
||||||
( aDim > SMESH::DIM_0D ) && !isAccessibleDim( aDim - 1 ) ){
|
( aDim > SMESH::DIM_0D ) && !isAccessibleDim( aDim - 1 ) ){
|
||||||
myDlg->enableTab( aDim - 1 );
|
myDlg->enableTab( aDim - 1 );
|
||||||
}
|
}
|
||||||
if ( (myDlg->currentMeshType() != MT_ANY) &&
|
if ( (myDlg->currentMeshType() != MT_ANY) &&
|
||||||
(( !algoData && ( aDim > SMESH::DIM_0D ) && isAccessibleDim( aDim - 1 )) ||
|
(( !algoData && ( aDim > SMESH::DIM_0D ) && isAccessibleDim( aDim - 1 )) ||
|
||||||
( algoData && myIsOnGeometry && algoData->InputTypes.isEmpty() &&
|
( algoData && myIsOnGeometry && algoData->InputTypes.isEmpty() &&
|
||||||
( aDim > SMESH::DIM_0D ) && isAccessibleDim( aDim - 1 ) ) ) ){
|
( aDim > SMESH::DIM_0D ) && isAccessibleDim( aDim - 1 ) ) ) ){
|
||||||
for (int i = aDim - 1; i >= SMESH::DIM_0D; i--){
|
for (int i = aDim - 1; i >= SMESH::DIM_0D; i--){
|
||||||
if ( isAccessibleDim( i ) ) myDlg->disableTab( i );
|
if ( isAccessibleDim( i ) ) myDlg->disableTab( i );
|
||||||
}
|
}
|
||||||
@ -1406,7 +1406,7 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
|
|||||||
// check that algorithms of other dimentions are compatible with
|
// check that algorithms of other dimentions are compatible with
|
||||||
// the selected one
|
// the selected one
|
||||||
|
|
||||||
// 2 loops: backward and forward from algo dimension
|
// 2 loops: backward and forward from algo dimension
|
||||||
for ( int forward = false; forward <= true; ++forward )
|
for ( int forward = false; forward <= true; ++forward )
|
||||||
{
|
{
|
||||||
int dim = aDim + 1, lastDim = SMESH::DIM_3D, dir = 1;
|
int dim = aDim + 1, lastDim = SMESH::DIM_3D, dir = 1;
|
||||||
|
@ -69,8 +69,8 @@ bool SMESHGUI_XmlHandler::startDocument()
|
|||||||
|
|
||||||
Reimplemented from QXmlDefaultHandler.
|
Reimplemented from QXmlDefaultHandler.
|
||||||
*/
|
*/
|
||||||
bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
|
bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
|
||||||
const QString& qName,
|
const QString& qName,
|
||||||
const QXmlAttributes& atts)
|
const QXmlAttributes& atts)
|
||||||
{
|
{
|
||||||
if (qName == "meshers")
|
if (qName == "meshers")
|
||||||
@ -80,22 +80,22 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
|
|||||||
}
|
}
|
||||||
else if (qName == "meshers-group") // group of hypotheses and algorithms
|
else if (qName == "meshers-group") // group of hypotheses and algorithms
|
||||||
{
|
{
|
||||||
// if (atts.value("server-lib") != "")
|
// if (atts.value("server-lib") != "")
|
||||||
{
|
{
|
||||||
myPluginName = atts.value("name");
|
myPluginName = atts.value("name");
|
||||||
myServerLib = atts.value("server-lib");
|
myServerLib = atts.value("server-lib");
|
||||||
myClientLib = atts.value("gui-lib");
|
myClientLib = atts.value("gui-lib");
|
||||||
/* It's Need to tranlate lib name for WIN32 or X platform
|
/* It's Need to tranlate lib name for WIN32 or X platform
|
||||||
* (only client lib, because server lib translates in SMESH_Gen_i::createHypothesis
|
* (only client lib, because server lib translates in SMESH_Gen_i::createHypothesis
|
||||||
* for normal work of *.py files )
|
* for normal work of *.py files )
|
||||||
*/
|
*/
|
||||||
if( !myClientLib.isEmpty() )
|
if( !myClientLib.isEmpty() )
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
//myServerLib += ".dll";
|
//myServerLib += ".dll";
|
||||||
myClientLib += ".dll";
|
myClientLib += ".dll";
|
||||||
#else
|
#else
|
||||||
//myServerLib = "lib" + myServerLib + ".so";
|
//myServerLib = "lib" + myServerLib + ".so";
|
||||||
myClientLib = "lib" + myClientLib + ".so";
|
myClientLib = "lib" + myClientLib + ".so";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -158,7 +158,7 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
|
|||||||
attr[ i ] = aStr.split( ',', QString::SkipEmptyParts );
|
attr[ i ] = aStr.split( ',', QString::SkipEmptyParts );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !aHypAlType.contains( BAD_HYP_FLAG ) ) {
|
if ( !aHypAlType.contains( BAD_HYP_FLAG ) ) {
|
||||||
HypothesisData* aHypData =
|
HypothesisData* aHypData =
|
||||||
new HypothesisData (aHypAlType, myPluginName, myServerLib, myClientLib,
|
new HypothesisData (aHypAlType, myPluginName, myServerLib, myClientLib,
|
||||||
@ -189,9 +189,9 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
|
|||||||
bool badSet = hypos.contains( BAD_HYP_FLAG ) || algos.contains( BAD_HYP_FLAG );
|
bool badSet = hypos.contains( BAD_HYP_FLAG ) || algos.contains( BAD_HYP_FLAG );
|
||||||
|
|
||||||
if ( !badSet )
|
if ( !badSet )
|
||||||
myListOfHypothesesSets.append( new HypothesesSet ( atts.value("name"),
|
myListOfHypothesesSets.append( new HypothesesSet ( atts.value("name"),
|
||||||
hypos.split( ',', QString::SkipEmptyParts ),
|
hypos.split( ',', QString::SkipEmptyParts ),
|
||||||
algos.split( ',', QString::SkipEmptyParts ) ) );
|
algos.split( ',', QString::SkipEmptyParts ) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( qName == "python-wrap" ||
|
else if ( qName == "python-wrap" ||
|
||||||
|
Loading…
Reference in New Issue
Block a user