From: eap Date: Tue, 3 Nov 2009 13:07:31 +0000 (+0000) Subject: intabify X-Git-Tag: V5_1_3rc2~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=44f1a50b52883d4f2d2a20db59b1cb8a5f09c69f;p=modules%2Fsmesh.git intabify --- diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index 572b51974..8d3cacc13 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -121,7 +121,7 @@ namespace { TCollection_AsciiString SMESH_2smeshpy::ConvertScript(const TCollection_AsciiString& theScript, Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod, - Resource_DataMapOfAsciiStringAsciiString& theObjectNames) + Resource_DataMapOfAsciiStringAsciiString& theObjectNames) { theGen = new _pyGen( theEntry2AccessorMethod, theObjectNames ); @@ -196,7 +196,7 @@ SMESH_2smeshpy::ConvertScript(const TCollection_AsciiString& theScript, //================================================================================ _pyGen::_pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod, - Resource_DataMapOfAsciiStringAsciiString& theObjectNames) + Resource_DataMapOfAsciiStringAsciiString& theObjectNames) : _pyObject( new _pyCommand( TPythonDump::SMESHGenName(), 0 )), myID2AccessorMethod( theEntry2AccessorMethod ), myObjectNames( theObjectNames ) @@ -541,7 +541,7 @@ Handle(_pyHypothesis) _pyGen::FindAlgo( const _pyID& theGeom, const _pyID& theMe if ( !hyp->IsNull() && (*hyp)->IsAlgo() && theHypothesis->CanBeCreatedBy( (*hyp)->GetAlgoType() ) && - (*hyp)->GetGeom() == theGeom && + (*hyp)->GetGeom() == theGeom && (*hyp)->GetMesh() == theMesh ) return *hyp; return 0; @@ -624,8 +624,8 @@ void _pyGen::SetCommandBefore( Handle(_pyCommand) theCmd, Handle(_pyCommand) the //================================================================================ void _pyGen::setNeighbourCommand( Handle(_pyCommand)& theCmd, - Handle(_pyCommand)& theOtherCmd, - const bool theIsAfter ) + Handle(_pyCommand)& theOtherCmd, + const bool theIsAfter ) { list< Handle(_pyCommand) >::iterator pos; pos = find( myCommands.begin(), myCommands.end(), theCmd ); @@ -680,8 +680,8 @@ _pyID _pyGen::GenerateNewID( const _pyID& theID ) while ( myObjectNames.IsBound( aNewID ) ); myObjectNames.Bind( aNewID, myObjectNames.IsBound( theID ) - ? (myObjectNames.Find( theID ) + _pyID( "_" ) + _pyID( index-1 )) - : _pyID( "A" ) + aNewID ); + ? (myObjectNames.Find( theID ) + _pyID( "_" ) + _pyID( index-1 )) + : _pyID( "A" ) + aNewID ); return aNewID; } @@ -952,21 +952,21 @@ void _pyMesh::Flush() if ( algo->IsWrapped() ) { _pyID localAlgoID = theGen->GenerateNewID( algoID ); TCollection_AsciiString aNewCmdStr = localAlgoID + - TCollection_AsciiString( " = " ) + theGen->GetID() + - TCollection_AsciiString( ".CreateHypothesis( \"" ) + algo->GetAlgoType() + - TCollection_AsciiString( "\" )" ); + TCollection_AsciiString( " = " ) + theGen->GetID() + + TCollection_AsciiString( ".CreateHypothesis( \"" ) + algo->GetAlgoType() + + TCollection_AsciiString( "\" )" ); Handle(_pyCommand) newCmd = theGen->AddCommand( aNewCmdStr ); Handle(_pyAlgorithm) newAlgo = Handle(_pyAlgorithm)::DownCast(theGen->FindHyp( localAlgoID )); if ( !newAlgo.IsNull() ) { - newAlgo->Assign( algo, this->GetID() ); - newAlgo->SetCreationCmd( newCmd ); - algo = newAlgo; - // set algorithm creation - theGen->SetCommandBefore( newCmd, addCmd ); + newAlgo->Assign( algo, this->GetID() ); + newAlgo->SetCreationCmd( newCmd ); + algo = newAlgo; + // set algorithm creation + theGen->SetCommandBefore( newCmd, addCmd ); } else - newCmd->Clear(); + newCmd->Clear(); } _pyID geom = addCmd->GetArg( 1 ); bool isLocalAlgo = ( geom != GetGeom() ); @@ -982,14 +982,14 @@ void _pyMesh::Flush() addCmd->SetArg( addCmd->GetNbArgs() + 1, TCollection_AsciiString( "geom=" ) + geom ); // sm = mesh.GetSubMesh(geom, name) --> sm = ALGO.GetSubMesh() - list < Handle(_pySubMesh) >::iterator smIt; + list < Handle(_pySubMesh) >::iterator smIt; for ( smIt = mySubmeshes.begin(); smIt != mySubmeshes.end(); ++smIt ) { - Handle(_pySubMesh) subMesh = *smIt; + Handle(_pySubMesh) subMesh = *smIt; Handle(_pyCommand) subCmd = subMesh->GetCreationCmd(); if ( geom == subCmd->GetArg( 1 )) { subCmd->SetObject( algo->GetID() ); subCmd->RemoveArgs(); - subMesh->SetCreator( algo ); + subMesh->SetCreator( algo ); } } } @@ -1275,7 +1275,7 @@ Handle(_pyHypothesis) _pyHypothesis::NewHypothesis( const Handle(_pyCommand)& th } else if ( hypType == "TrianglePreference" ) { hyp->SetConvMethodAndType( "TrianglePreference", "Quadrangle_2D"); - } + } // BLSURF ---------- else if ( hypType == "BLSURF" ) { algo->SetConvMethodAndType( "Triangle", hypType.ToCString()); @@ -1532,7 +1532,7 @@ void _pyHypothesis::ClearAllCommands() //================================================================================ void _pyHypothesis::Assign( const Handle(_pyHypothesis)& theOther, - const _pyID& theMesh ) + const _pyID& theMesh ) { myIsWrapped = false; myMesh = theMesh; @@ -1995,15 +1995,15 @@ const TCollection_AsciiString & _pyCommand::GetObject() int nb1 = 0; // number of ' character at the left of = int nb2 = 0; // number of " character at the left of = for ( int i = 1; i < begPos-1; i++ ) { - if ( myString.Value( i )=='\'' ) - nb1 += 1; - else if ( myString.Value( i )=='"' ) - nb2 += 1; + if ( myString.Value( i )=='\'' ) + nb1 += 1; + else if ( myString.Value( i )=='"' ) + nb2 += 1; } // if number of ' or " is not divisible by 2, // then get an object at the start of the command if ( nb1 % 2 != 0 || nb2 % 2 != 0 ) - begPos = 1; + begPos = 1; } myObj = GetWord( myString, begPos, true ); // check if object is complex, @@ -2073,16 +2073,16 @@ const TCollection_AsciiString & _pyCommand::GetArg( int index ) while ( begPos != EMPTY ) { begPos += prevLen; if( myString.Value( begPos ) == '(' ) - nbNestings++; + nbNestings++; // check if we are looking at the closing parenthesis while ( begPos <= Length() && isspace( myString.Value( begPos ))) ++begPos; if ( begPos > Length() ) break; if ( myString.Value( begPos ) == ')' ) { - nbNestings--; - if( nbNestings == 0 ) - break; + nbNestings--; + if( nbNestings == 0 ) + break; } myArgs.Append( GetWord( myString, begPos, true, true )); SetBegPos( ARG1_IND + i, begPos ); diff --git a/src/SMESH_I/SMESH_2smeshpy.hxx b/src/SMESH_I/SMESH_2smeshpy.hxx index 015d91bde..16926e54d 100644 --- a/src/SMESH_I/SMESH_2smeshpy.hxx +++ b/src/SMESH_I/SMESH_2smeshpy.hxx @@ -327,7 +327,7 @@ public: void Process( const Handle(_pyCommand)& theCommand); void Flush(); virtual void Assign( const Handle(_pyHypothesis)& theOther, - const _pyID& theMesh ); + const _pyID& theMesh ); DEFINE_STANDARD_RTTI (_pyHypothesis) }; diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index 711408f24..5b012b59c 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -66,8 +66,8 @@ namespace SMESH TCollection_AsciiString aCollection(Standard_CString(aString.c_str())); SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy(); if(!aStudy->_is_nil() && !aCollection.IsEmpty()){ - aSMESHGen->AddToPythonScript(aStudy->StudyId(),aCollection); - if(MYDEBUG) MESSAGE(aString); + aSMESHGen->AddToPythonScript(aStudy->StudyId(),aCollection); + if(MYDEBUG) MESSAGE(aString); } } } @@ -587,8 +587,8 @@ Handle(TColStd_HSequenceOfInteger) FindEntries (TCollection_AsciiString& theStri isFound = Standard_False; while((j < aLen) && ( isdigit(c) || c == ':' )) { //Check if it is an entry - c = (int)arr[j++]; - if(c == ':') isFound = Standard_True; + c = (int)arr[j++]; + if(c == ':') isFound = Standard_True; } if (isFound) { diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index c75d81e88..e9370beda 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -2436,13 +2436,13 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria pd << "aCriterion = SMESH.Filter.Criterion(" << aCriterion << "," << aCompare << "," << aThreshold << ",'" << aThresholdStr; if (aThresholdID && strlen(aThresholdID)) - //pd << "',salome.ObjectToID(" << aThresholdID + //pd << "',salome.ObjectToID(" << aThresholdID pd << "','" << aThresholdID - << "'," << aUnary << "," << aBinary << "," << aTolerance - << "," << aTypeOfElem << "," << aPrecision << ")"; + << "'," << aUnary << "," << aBinary << "," << aTolerance + << "," << aTypeOfElem << "," << aPrecision << ")"; else - pd << "',''," << aUnary << "," << aBinary << "," << aTolerance - << "," << aTypeOfElem << "," << aPrecision << ")"; + pd << "',''," << aUnary << "," << aBinary << "," << aTolerance + << "," << aTypeOfElem << "," << aPrecision << ")"; } SMESH::Predicate_ptr aPredicate = SMESH::Predicate::_nil(); @@ -2534,7 +2534,7 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria { SMESH::LyingOnGeom_ptr tmpPred = aFilterMgr->CreateLyingOnGeom(); tmpPred->SetElementType( aTypeOfElem ); - tmpPred->SetShape( aThresholdID, aThresholdStr ); + tmpPred->SetShape( aThresholdID, aThresholdStr ); tmpPred->SetTolerance( aTolerance ); aPredicate = tmpPred; } diff --git a/src/SMESH_I/SMESH_Filter_i.hxx b/src/SMESH_I/SMESH_Filter_i.hxx index 090705d05..44cc246bf 100644 --- a/src/SMESH_I/SMESH_Filter_i.hxx +++ b/src/SMESH_I/SMESH_Filter_i.hxx @@ -107,10 +107,10 @@ namespace SMESH double GetTolerance(); virtual bool Contains( const SMESHDS_Mesh* theMeshDS, - const TopoDS_Shape& theShape, - const SMDS_MeshElement* theElem, - TopAbs_ShapeEnum theFindShapeEnum, - TopAbs_ShapeEnum theAvoidShapeEnum = TopAbs_SHAPE ); + const TopoDS_Shape& theShape, + const SMDS_MeshElement* theElem, + TopAbs_ShapeEnum theFindShapeEnum, + TopAbs_ShapeEnum theAvoidShapeEnum = TopAbs_SHAPE ); private: virtual void init(); @@ -133,7 +133,7 @@ namespace SMESH Description : An abstact class for all functors */ class SMESH_I_EXPORT Functor_i: public virtual POA_SMESH::Functor, - public virtual SALOME::GenericObj_i + public virtual SALOME::GenericObj_i { public: void SetMesh( SMESH_Mesh_ptr theMesh ); @@ -152,7 +152,7 @@ namespace SMESH Description : Base class for numerical functors */ class SMESH_I_EXPORT NumericalFunctor_i: public virtual POA_SMESH::NumericalFunctor, - public virtual Functor_i + public virtual Functor_i { public: CORBA::Double GetValue( CORBA::Long theElementId ); @@ -170,7 +170,7 @@ namespace SMESH Description : Functor for calculation of minimum angle */ class SMESH_I_EXPORT MinimumAngle_i: public virtual POA_SMESH::MinimumAngle, - public virtual NumericalFunctor_i + public virtual NumericalFunctor_i { public: MinimumAngle_i(); @@ -183,7 +183,7 @@ namespace SMESH Description : Functor for calculating aspect ratio */ class SMESH_I_EXPORT AspectRatio_i: public virtual POA_SMESH::AspectRatio, - public virtual NumericalFunctor_i + public virtual NumericalFunctor_i { public: AspectRatio_i(); @@ -196,7 +196,7 @@ namespace SMESH Description : Functor for calculating aspect ratio for 3D */ class SMESH_I_EXPORT AspectRatio3D_i: public virtual POA_SMESH::AspectRatio3D, - public virtual NumericalFunctor_i + public virtual NumericalFunctor_i { public: AspectRatio3D_i(); @@ -209,7 +209,7 @@ namespace SMESH Description : Functor for calculating warping */ class SMESH_I_EXPORT Warping_i: public virtual POA_SMESH::Warping, - public virtual NumericalFunctor_i + public virtual NumericalFunctor_i { public: Warping_i(); @@ -222,7 +222,7 @@ namespace SMESH Description : Functor for calculating taper */ class SMESH_I_EXPORT Taper_i: public virtual POA_SMESH::Taper, - public virtual NumericalFunctor_i + public virtual NumericalFunctor_i { public: Taper_i(); @@ -235,7 +235,7 @@ namespace SMESH Description : Functor for calculating skew in degrees */ class SMESH_I_EXPORT Skew_i: public virtual POA_SMESH::Skew, - public virtual NumericalFunctor_i + public virtual NumericalFunctor_i { public: Skew_i(); @@ -248,7 +248,7 @@ namespace SMESH Description : Functor for calculating area */ class SMESH_I_EXPORT Area_i: public virtual POA_SMESH::Area, - public virtual NumericalFunctor_i + public virtual NumericalFunctor_i { public: Area_i(); @@ -274,7 +274,7 @@ namespace SMESH Description : Functor for calculating length of edge */ class SMESH_I_EXPORT Length_i: public virtual POA_SMESH::Length, - public virtual NumericalFunctor_i + public virtual NumericalFunctor_i { public: Length_i(); @@ -286,7 +286,7 @@ namespace SMESH Description : Functor for calculating length of edge */ class SMESH_I_EXPORT Length2D_i: public virtual POA_SMESH::Length2D, - public virtual NumericalFunctor_i + public virtual NumericalFunctor_i { public: Length2D_i(); @@ -303,7 +303,7 @@ namespace SMESH Description : Functor for calculating number of faces conneted to the edge */ class SMESH_I_EXPORT MultiConnection_i: public virtual POA_SMESH::MultiConnection, - public virtual NumericalFunctor_i + public virtual NumericalFunctor_i { public: MultiConnection_i(); @@ -315,7 +315,7 @@ namespace SMESH Description : Functor for calculating number of faces conneted to the edge */ class SMESH_I_EXPORT MultiConnection2D_i: public virtual POA_SMESH::MultiConnection2D, - public virtual NumericalFunctor_i + public virtual NumericalFunctor_i { public: MultiConnection2D_i(); @@ -335,7 +335,7 @@ namespace SMESH Description : Base class for all predicates */ class SMESH_I_EXPORT Predicate_i: public virtual POA_SMESH::Predicate, - public virtual Functor_i + public virtual Functor_i { public: CORBA::Boolean IsSatisfy( CORBA::Long theElementId ); @@ -352,7 +352,7 @@ namespace SMESH the point of view of MED convention */ class SMESH_I_EXPORT BadOrientedVolume_i: public virtual POA_SMESH::BadOrientedVolume, - public virtual Predicate_i + public virtual Predicate_i { public: BadOrientedVolume_i(); @@ -364,7 +364,7 @@ namespace SMESH Description : Predicate for selection on geometrical support */ class SMESH_I_EXPORT BelongToGeom_i: public virtual POA_SMESH::BelongToGeom, - public virtual Predicate_i + public virtual Predicate_i { public: BelongToGeom_i(); @@ -395,7 +395,7 @@ namespace SMESH Description : Verify whether mesh element lie in pointed Geom planar object */ class SMESH_I_EXPORT BelongToSurface_i: public virtual POA_SMESH::BelongToSurface, - public virtual Predicate_i + public virtual Predicate_i { public: BelongToSurface_i( const Handle(Standard_Type)& ); @@ -426,7 +426,7 @@ namespace SMESH Description : Verify whether mesh element lie in pointed Geom planar object */ class SMESH_I_EXPORT BelongToPlane_i: public virtual POA_SMESH::BelongToPlane, - public virtual BelongToSurface_i + public virtual BelongToSurface_i { public: BelongToPlane_i(); @@ -439,7 +439,7 @@ namespace SMESH Description : Verify whether mesh element lie in pointed Geom cylindrical object */ class SMESH_I_EXPORT BelongToCylinder_i: public virtual POA_SMESH::BelongToCylinder, - public virtual BelongToSurface_i + public virtual BelongToSurface_i { public: BelongToCylinder_i(); @@ -465,7 +465,7 @@ namespace SMESH Description : Predicate for selection on geometrical support(lying or partially lying) */ class SMESH_I_EXPORT LyingOnGeom_i: public virtual POA_SMESH::LyingOnGeom, - public virtual Predicate_i + public virtual Predicate_i { public: LyingOnGeom_i(); @@ -496,7 +496,7 @@ namespace SMESH Description : Predicate for free borders */ class SMESH_I_EXPORT FreeBorders_i: public virtual POA_SMESH::FreeBorders, - public virtual Predicate_i + public virtual Predicate_i { public: FreeBorders_i(); @@ -509,7 +509,7 @@ namespace SMESH Description : Predicate for free edges */ class SMESH_I_EXPORT FreeEdges_i: public virtual POA_SMESH::FreeEdges, - public virtual Predicate_i + public virtual Predicate_i { public: FreeEdges_i(); @@ -526,7 +526,7 @@ namespace SMESH Description : Predicate for free faces */ class SMESH_I_EXPORT FreeFaces_i: public virtual POA_SMESH::FreeFaces, - public virtual Predicate_i + public virtual Predicate_i { public: FreeFaces_i(); @@ -539,7 +539,7 @@ namespace SMESH Description : Predicate for free nodes */ class SMESH_I_EXPORT FreeNodes_i: public virtual POA_SMESH::FreeNodes, - public virtual Predicate_i + public virtual Predicate_i { public: FreeNodes_i(); @@ -552,7 +552,7 @@ namespace SMESH Description : Predicate for Range of Ids */ class SMESH_I_EXPORT RangeOfIds_i: public virtual POA_SMESH::RangeOfIds, - public virtual Predicate_i + public virtual Predicate_i { public: RangeOfIds_i(); @@ -572,7 +572,7 @@ namespace SMESH Description : Verify whether a mesh element is linear */ class SMESH_I_EXPORT LinearOrQuadratic_i: public virtual POA_SMESH::LinearOrQuadratic, - public virtual Predicate_i + public virtual Predicate_i { public: LinearOrQuadratic_i(); @@ -588,7 +588,7 @@ namespace SMESH Description : Functor for check color of group to whic mesh element belongs to */ class SMESH_I_EXPORT GroupColor_i: public virtual POA_SMESH::GroupColor, - public virtual Predicate_i + public virtual Predicate_i { public: GroupColor_i(); @@ -607,7 +607,7 @@ namespace SMESH Description : Functor for check element geometry type */ class SMESH_I_EXPORT ElemGeomType_i: public virtual POA_SMESH::ElemGeomType, - public virtual Predicate_i + public virtual Predicate_i { public: ElemGeomType_i(); @@ -626,7 +626,7 @@ namespace SMESH Description : Base class for comparators */ class SMESH_I_EXPORT Comparator_i: public virtual POA_SMESH::Comparator, - public virtual Predicate_i + public virtual Predicate_i { public: virtual ~Comparator_i(); @@ -651,7 +651,7 @@ namespace SMESH Description : Comparator "<" */ class SMESH_I_EXPORT LessThan_i: public virtual POA_SMESH::LessThan, - public virtual Comparator_i + public virtual Comparator_i { public: LessThan_i(); @@ -664,7 +664,7 @@ namespace SMESH Description : Comparator ">" */ class SMESH_I_EXPORT MoreThan_i: public virtual POA_SMESH::MoreThan, - public virtual Comparator_i + public virtual Comparator_i { public: MoreThan_i(); @@ -677,7 +677,7 @@ namespace SMESH Description : Comparator "=" */ class SMESH_I_EXPORT EqualTo_i: public virtual POA_SMESH::EqualTo, - public virtual Comparator_i + public virtual Comparator_i { public: EqualTo_i(); @@ -695,7 +695,7 @@ namespace SMESH Description : Logical NOT predicate */ class SMESH_I_EXPORT LogicalNOT_i: public virtual POA_SMESH::LogicalNOT, - public virtual Predicate_i + public virtual Predicate_i { public: LogicalNOT_i(); @@ -716,7 +716,7 @@ namespace SMESH Description : Base class for binary logical predicate */ class SMESH_I_EXPORT LogicalBinary_i: public virtual POA_SMESH::LogicalBinary, - public virtual Predicate_i + public virtual Predicate_i { public: virtual ~LogicalBinary_i(); @@ -742,7 +742,7 @@ namespace SMESH Description : Logical AND */ class SMESH_I_EXPORT LogicalAND_i: public virtual POA_SMESH::LogicalAND, - public virtual LogicalBinary_i + public virtual LogicalBinary_i { public: LogicalAND_i(); @@ -755,7 +755,7 @@ namespace SMESH Description : Logical OR */ class SMESH_I_EXPORT LogicalOR_i: public virtual POA_SMESH::LogicalOR, - public virtual LogicalBinary_i + public virtual LogicalBinary_i { public: LogicalOR_i(); @@ -767,7 +767,7 @@ namespace SMESH FILTER */ class SMESH_I_EXPORT Filter_i: public virtual POA_SMESH::Filter, - public virtual SALOME::GenericObj_i + public virtual SALOME::GenericObj_i { public: Filter_i(); @@ -792,13 +792,13 @@ namespace SMESH static void GetElementsId( Predicate_i*, - const SMDS_Mesh*, - Controls::Filter::TIdSequence& ); + const SMDS_Mesh*, + Controls::Filter::TIdSequence& ); static void GetElementsId( Predicate_i*, - SMESH_Mesh_ptr, - Controls::Filter::TIdSequence& ); + SMESH_Mesh_ptr, + Controls::Filter::TIdSequence& ); virtual long_array* @@ -833,7 +833,7 @@ namespace SMESH FILTER LIBRARY */ class SMESH_I_EXPORT FilterLibrary_i: public virtual POA_SMESH::FilterLibrary, - public virtual SALOME::GenericObj_i + public virtual SALOME::GenericObj_i { public: FilterLibrary_i( const char* theFileName ); @@ -846,8 +846,8 @@ namespace SMESH CORBA::Boolean AddEmpty( const char* theFilterName, ElementType theType ); CORBA::Boolean Delete ( const char* theFilterName ); CORBA::Boolean Replace ( const char* theFilterName, - const char* theNewName, - Filter_ptr theFilter ); + const char* theNewName, + Filter_ptr theFilter ); CORBA::Boolean Save(); CORBA::Boolean SaveAs( const char* aFileName ); @@ -871,7 +871,7 @@ namespace SMESH */ class SMESH_I_EXPORT FilterManager_i: public virtual POA_SMESH::FilterManager, - public virtual SALOME::GenericObj_i + public virtual SALOME::GenericObj_i { public: FilterManager_i(); diff --git a/src/SMESH_I/SMESH_Gen_i.hxx b/src/SMESH_I/SMESH_Gen_i.hxx index 0a6e01061..13bca294a 100644 --- a/src/SMESH_I/SMESH_Gen_i.hxx +++ b/src/SMESH_I/SMESH_Gen_i.hxx @@ -176,7 +176,7 @@ public: // ***************************************** // Set a new Mesh object name void SetName(const char* theIOR, - const char* theName); + const char* theName); //GEOM::GEOM_Gen_ptr SetGeomEngine( const char* containerLoc ); void SetGeomEngine( GEOM::GEOM_Gen_ptr geomcompo ); @@ -266,9 +266,9 @@ public: * Return mesh preview structure */ SMESH::MeshPreviewStruct* Precompute( SMESH::SMESH_Mesh_ptr theMesh, - GEOM::GEOM_Object_ptr theSubObject, - SMESH::Dimension theDimension, - SMESH::long_array& theShapesId ) + GEOM::GEOM_Object_ptr theSubObject, + SMESH::Dimension theDimension, + SMESH::long_array& theShapesId ) throw ( SALOME::SALOME_Exception ); // Returns errors of hypotheses definintion @@ -294,30 +294,30 @@ public: // Return geometrical object the given element is built on. Don't publish it in study. GEOM::GEOM_Object_ptr FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh, - CORBA::Long theElementID) + CORBA::Long theElementID) throw ( SALOME::SALOME_Exception ); // Concatenate the given meshes into one mesh SMESH::SMESH_Mesh_ptr ConcatenateCommon(const SMESH::mesh_array& theMeshesArray, - CORBA::Boolean theUniteIdenticalGroups, - CORBA::Boolean theMergeNodesAndElements, - CORBA::Double theMergeTolerance, - CORBA::Boolean theCommonGroups) + CORBA::Boolean theUniteIdenticalGroups, + CORBA::Boolean theMergeNodesAndElements, + CORBA::Double theMergeTolerance, + CORBA::Boolean theCommonGroups) throw ( SALOME::SALOME_Exception ); // Concatenate the given meshes into one mesh SMESH::SMESH_Mesh_ptr Concatenate(const SMESH::mesh_array& theMeshesArray, - CORBA::Boolean theUniteIdenticalGroups, - CORBA::Boolean theMergeNodesAndElements, - CORBA::Double theMergeTolerance) + CORBA::Boolean theUniteIdenticalGroups, + CORBA::Boolean theMergeNodesAndElements, + CORBA::Double theMergeTolerance) throw ( SALOME::SALOME_Exception ); // Concatenate the given meshes into one mesh // Create the groups of all elements from initial meshes SMESH::SMESH_Mesh_ptr ConcatenateWithGroups(const SMESH::mesh_array& theMeshesArray, - CORBA::Boolean theUniteIdenticalGroups, - CORBA::Boolean theMergeNodesAndElements, - CORBA::Double theMergeTolerance) + CORBA::Boolean theUniteIdenticalGroups, + CORBA::Boolean theMergeNodesAndElements, + CORBA::Double theMergeTolerance) throw ( SALOME::SALOME_Exception ); // **************************************************** @@ -326,22 +326,22 @@ public: // Save SMESH data SALOMEDS::TMPFile* Save( SALOMEDS::SComponent_ptr theComponent, - const char* theURL, - bool isMultiFile ); + const char* theURL, + bool isMultiFile ); // Load SMESH data bool Load( SALOMEDS::SComponent_ptr theComponent, - const SALOMEDS::TMPFile& theStream, - const char* theURL, - bool isMultiFile ); + const SALOMEDS::TMPFile& theStream, + const char* theURL, + bool isMultiFile ); // Save SMESH data in ASCII format SALOMEDS::TMPFile* SaveASCII( SALOMEDS::SComponent_ptr theComponent, - const char* theURL, - bool isMultiFile ); + const char* theURL, + bool isMultiFile ); // Load SMESH data in ASCII format bool LoadASCII( SALOMEDS::SComponent_ptr theComponent, - const SALOMEDS::TMPFile& theStream, - const char* theURL, - bool isMultiFile ); + const SALOMEDS::TMPFile& theStream, + const char* theURL, + bool isMultiFile ); // Create filter manager SMESH::FilterManager_ptr CreateFilterManager(); @@ -357,22 +357,22 @@ public: // Transform data from transient form to persistent char* IORToLocalPersistentID( SALOMEDS::SObject_ptr theSObject, - const char* IORString, - CORBA::Boolean isMultiFile, - CORBA::Boolean isASCII ); + const char* IORString, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII ); // Transform data from persistent form to transient char* LocalPersistentIDToIOR( SALOMEDS::SObject_ptr theSObject, - const char* aLocalPersistentID, - CORBA::Boolean isMultiFile, - CORBA::Boolean isASCII ); + const char* aLocalPersistentID, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII ); // Returns true if object can be published in the study bool CanPublishInStudy( CORBA::Object_ptr theIOR ); // Publish object in the study SALOMEDS::SObject_ptr PublishInStudy( SALOMEDS::Study_ptr theStudy, - SALOMEDS::SObject_ptr theSObject, - CORBA::Object_ptr theObject, - const char* theName ) + SALOMEDS::SObject_ptr theSObject, + CORBA::Object_ptr theObject, + const char* theName ) throw ( SALOME::SALOME_Exception ); // Copy-paste methods - returns true if object can be copied to the clipboard @@ -383,8 +383,8 @@ public: CORBA::Boolean CanPaste( const char* theComponentName, CORBA::Long theObjectID ) { return false; } // Copy-paste methods - paste object from the clipboard SALOMEDS::SObject_ptr PasteInto( const SALOMEDS::TMPFile& theStream, - CORBA::Long theObjectID, - SALOMEDS::SObject_ptr theObject ) { + CORBA::Long theObjectID, + SALOMEDS::SObject_ptr theObject ) { SALOMEDS::SObject_var aResultSO; return aResultSO._retn(); } @@ -394,8 +394,8 @@ public: // ============ virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, - CORBA::Boolean isPublished, - CORBA::Boolean& isValidScript); + CORBA::Boolean isPublished, + CORBA::Boolean& isValidScript); void AddToPythonScript (int theStudyID, const TCollection_AsciiString& theString); @@ -452,7 +452,7 @@ public: SMESH::SMESH_Mesh_ptr theMesh, SMESH::SMESH_subMesh_ptr theSubMesh, GEOM::GEOM_Object_ptr theShapeObject, - const char* theName = 0); + const char* theName = 0); SALOMEDS::SObject_ptr PublishGroup (SALOMEDS::Study_ptr theStudy, SMESH::SMESH_Mesh_ptr theMesh, SMESH::SMESH_GroupBase_ptr theGroup, diff --git a/src/SMESH_I/SMESH_Group_i.cxx b/src/SMESH_I/SMESH_Group_i.cxx index 2f9a7f775..7502c5409 100644 --- a/src/SMESH_I/SMESH_Group_i.cxx +++ b/src/SMESH_I/SMESH_Group_i.cxx @@ -305,8 +305,8 @@ typedef bool (SMESHDS_Group::*TFunChangeGroup)(const int); CORBA::Long ChangeByPredicate( SMESH::Predicate_i* thePredicate, - SMESHDS_GroupBase* theGroupBase, - TFunChangeGroup theFun) + SMESHDS_GroupBase* theGroupBase, + TFunChangeGroup theFun) { CORBA::Long aNb = 0; if(SMESHDS_Group* aGroupDS = dynamic_cast(theGroupBase)){ @@ -317,7 +317,7 @@ ChangeByPredicate( SMESH::Predicate_i* thePredicate, CORBA::Long i = 0, iEnd = aSequence.size(); for(; i < iEnd; i++) if((aGroupDS->*theFun)(aSequence[i])) - aNb++; + aNb++; return aNb; } return aNb; diff --git a/src/SMESH_I/SMESH_MEDFamily_i.cxx b/src/SMESH_I/SMESH_MEDFamily_i.cxx index 35bacddc3..393e49c42 100644 --- a/src/SMESH_I/SMESH_MEDFamily_i.cxx +++ b/src/SMESH_I/SMESH_MEDFamily_i.cxx @@ -77,7 +77,7 @@ SMESH_MEDFamily_i::~SMESH_MEDFamily_i() */ //============================================================================= SMESH_MEDFamily_i::SMESH_MEDFamily_i(int identifier, SMESH_subMesh_i* sm, - string name, string description, SALOME_MED::medEntityMesh entity): + string name, string description, SALOME_MED::medEntityMesh entity): SMESH_MEDSupport_i( sm, name, description, entity ), _subMesh_i(sm), @@ -103,7 +103,7 @@ throw (SALOME::SALOME_Exception) { if (_subMeshDS==NULL) THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ - SALOME::INTERNAL_ERROR); + SALOME::INTERNAL_ERROR); return _identifier; } @@ -117,7 +117,7 @@ throw (SALOME::SALOME_Exception) { if (_subMeshDS==NULL) THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ - SALOME::INTERNAL_ERROR); + SALOME::INTERNAL_ERROR); return _numberOfAttribute; } //============================================================================= @@ -130,12 +130,12 @@ throw (SALOME::SALOME_Exception) { if (_subMeshDS==NULL) THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ - SALOME::INTERNAL_ERROR); + SALOME::INTERNAL_ERROR); if (_numberOfAttribute == 0) { MESSAGE("Les familles SMESH n ont pas d attribut"); THROW_SALOME_CORBA_EXCEPTION("No attributes"\ - ,SALOME::BAD_PARAM); + ,SALOME::BAD_PARAM); }; SALOME_MED::long_array_var myseq= new SALOME_MED::long_array; @@ -157,15 +157,15 @@ CORBA::Long SMESH_MEDFamily_i::getAttributeIdentifier(CORBA::Long i) { if (_subMeshDS==NULL) THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ - SALOME::INTERNAL_ERROR); + SALOME::INTERNAL_ERROR); MESSAGE("Les familles SMESH n ont pas d attribut"); THROW_SALOME_CORBA_EXCEPTION("No attributes"\ - ,SALOME::BAD_PARAM); + ,SALOME::BAD_PARAM); if (_numberOfAttribute == 0) { MESSAGE("Les familles SMESH n ont pas d attribut"); THROW_SALOME_CORBA_EXCEPTION("No attributes"\ - ,SALOME::BAD_PARAM); + ,SALOME::BAD_PARAM); }; ASSERT (i <= _numberOfAttribute); return _attributeIdentifier[i]; @@ -180,13 +180,13 @@ SALOME_MED::long_array* SMESH_MEDFamily_i::getAttributesValues() { if (_subMeshDS==NULL) THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ - SALOME::INTERNAL_ERROR); + SALOME::INTERNAL_ERROR); if (_numberOfAttribute == 0) { MESSAGE("Les familles SMESH n ont pas d attribut"); THROW_SALOME_CORBA_EXCEPTION("No attributes"\ - ,SALOME::BAD_PARAM); + ,SALOME::BAD_PARAM); }; SALOME_MED::long_array_var myseq= new SALOME_MED::long_array; @@ -207,12 +207,12 @@ CORBA::Long SMESH_MEDFamily_i::getAttributeValue(CORBA::Long i) { if (_subMeshDS==NULL) THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ - SALOME::INTERNAL_ERROR); + SALOME::INTERNAL_ERROR); if (_numberOfAttribute == 0) { MESSAGE("Les familles SMESH n ont pas d attribut"); THROW_SALOME_CORBA_EXCEPTION("No attributes"\ - ,SALOME::BAD_PARAM); + ,SALOME::BAD_PARAM); } ASSERT (i <= _numberOfAttribute); @@ -228,12 +228,12 @@ SALOME_MED::string_array * SMESH_MEDFamily_i::getAttributesDescriptions() { if (_subMeshDS==NULL) THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ - SALOME::INTERNAL_ERROR); + SALOME::INTERNAL_ERROR); if (_numberOfAttribute == 0) { MESSAGE("Les familles SMESH n ont pas d attribut"); THROW_SALOME_CORBA_EXCEPTION("No attributes"\ - ,SALOME::BAD_PARAM); + ,SALOME::BAD_PARAM); } SALOME_MED::string_array_var myseq = new SALOME_MED::string_array; for (int i=0;i<_numberOfAttribute;i++) @@ -252,12 +252,12 @@ char * SMESH_MEDFamily_i::getAttributeDescription( CORBA::Long i) { if (_subMeshDS==NULL) THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ - SALOME::INTERNAL_ERROR); + SALOME::INTERNAL_ERROR); if (_numberOfAttribute == 0) { MESSAGE("Les familles SMESH n ont pas d attribut"); THROW_SALOME_CORBA_EXCEPTION("No attributes"\ - ,SALOME::BAD_PARAM); + ,SALOME::BAD_PARAM); } ASSERT (i <= _numberOfAttribute); return CORBA::string_dup(_attributeDescription[i].c_str()); diff --git a/src/SMESH_I/SMESH_MEDFamily_i.hxx b/src/SMESH_I/SMESH_MEDFamily_i.hxx index 2b850fc8a..e6af38067 100644 --- a/src/SMESH_I/SMESH_MEDFamily_i.hxx +++ b/src/SMESH_I/SMESH_MEDFamily_i.hxx @@ -56,7 +56,7 @@ public : // Constructors and associated internal methods SMESH_MEDFamily_i(int identifier, SMESH_subMesh_i* sm, - std::string name, std::string description, SALOME_MED::medEntityMesh entity ); + std::string name, std::string description, SALOME_MED::medEntityMesh entity ); SMESH_MEDFamily_i(const SMESH_MEDFamily_i & f); // IDL Methods diff --git a/src/SMESH_I/SMESH_MEDMesh_i.cxx b/src/SMESH_I/SMESH_MEDMesh_i.cxx index ec71b0b0b..ec26217b9 100644 --- a/src/SMESH_I/SMESH_MEDMesh_i.cxx +++ b/src/SMESH_I/SMESH_MEDMesh_i.cxx @@ -240,8 +240,8 @@ char *SMESH_MEDMesh_i::getCoordinatesSystem() throw(SALOME::SALOME_Exception) * CORBA: Accessor for Coordinates */ //============================================================================= -SALOME_MED::double_array * SMESH_MEDMesh_i::getCoordinates( - SALOME_MED::medModeSwitch typeSwitch) throw(SALOME::SALOME_Exception) +SALOME_MED::double_array * SMESH_MEDMesh_i::getCoordinates +(SALOME_MED::medModeSwitch typeSwitch) throw(SALOME::SALOME_Exception) { if (_mesh_i == 0) THROW_SALOME_CORBA_EXCEPTION("No associated Mesh", diff --git a/src/SMESH_I/SMESH_MEDSupport_i.cxx b/src/SMESH_I/SMESH_MEDSupport_i.cxx index 56f3b73eb..4b1e66ddf 100644 --- a/src/SMESH_I/SMESH_MEDSupport_i.cxx +++ b/src/SMESH_I/SMESH_MEDSupport_i.cxx @@ -45,8 +45,8 @@ using namespace std; //============================================================================= SMESH_MEDSupport_i::SMESH_MEDSupport_i() { - BEGIN_OF("Default Constructor SMESH_MEDSupport_i"); - END_OF("Default Constructor SMESH_MEDSupport_i"); + BEGIN_OF("Default Constructor SMESH_MEDSupport_i"); + END_OF("Default Constructor SMESH_MEDSupport_i"); } //============================================================================= @@ -55,40 +55,40 @@ SMESH_MEDSupport_i::SMESH_MEDSupport_i() */ //============================================================================= SMESH_MEDSupport_i::SMESH_MEDSupport_i(SMESH_subMesh_i * sm, string name, - string description, SALOME_MED::medEntityMesh entity) - :_subMesh_i(sm), _name(name), _description(description), _entity(entity), - _seqNumber(false), _seqLength(0) + string description, SALOME_MED::medEntityMesh entity) + :_subMesh_i(sm), _name(name), _description(description), _entity(entity), + _seqNumber(false), _seqLength(0) { - BEGIN_OF("Constructor SMESH_MEDSupport_i"); - - _meshDS = _subMesh_i->_mesh_i->GetImpl().GetMeshDS(); - - int subMeshId = _subMesh_i->GetId(); - - MESSAGE(" subMeshId " << subMeshId) - - if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) != - _subMesh_i->_mesh_i->_mapSubMesh.end()) - { - ::SMESH_subMesh * subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId]; - _subMeshDS = subMesh->GetSubMeshDS(); - } - - if (_entity == SALOME_MED::MED_NODE) - { - _numberOfGeometricType = 1; - _geometricType = new SALOME_MED::medGeometryElement[1]; - _geometricType[0] = SALOME_MED::MED_NONE; - } - else - { - MESSAGE("Pas implemente dans cette version"); - THROW_SALOME_CORBA_EXCEPTION - ("Seules les familles de noeuds sont implementees ", - SALOME::BAD_PARAM); - } - - END_OF("Constructor SMESH_MEDSupport_i"); + BEGIN_OF("Constructor SMESH_MEDSupport_i"); + + _meshDS = _subMesh_i->_mesh_i->GetImpl().GetMeshDS(); + + int subMeshId = _subMesh_i->GetId(); + + MESSAGE(" subMeshId " << subMeshId) + + if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) != + _subMesh_i->_mesh_i->_mapSubMesh.end()) + { + ::SMESH_subMesh * subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId]; + _subMeshDS = subMesh->GetSubMeshDS(); + } + + if (_entity == SALOME_MED::MED_NODE) + { + _numberOfGeometricType = 1; + _geometricType = new SALOME_MED::medGeometryElement[1]; + _geometricType[0] = SALOME_MED::MED_NONE; + } + else + { + MESSAGE("Pas implemente dans cette version"); + THROW_SALOME_CORBA_EXCEPTION + ("Seules les familles de noeuds sont implementees ", + SALOME::BAD_PARAM); + } + + END_OF("Constructor SMESH_MEDSupport_i"); } //============================================================================= @@ -101,19 +101,19 @@ SMESH_MEDSupport_i(const SMESH_MEDSupport_i & s):_subMesh_i(s._subMesh_i), _name(s._name), _description(s._description), _entity(s._entity), _seqNumber(false), _seqLength(0) { - BEGIN_OF("Constructor SMESH_MEDSupport_i"); + BEGIN_OF("Constructor SMESH_MEDSupport_i"); - _meshDS = _subMesh_i->_mesh_i->GetImpl().GetMeshDS(); + _meshDS = _subMesh_i->_mesh_i->GetImpl().GetMeshDS(); - int subMeshId = _subMesh_i->GetId(); - if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) != - _subMesh_i->_mesh_i->_mapSubMesh.end()) - { - ::SMESH_subMesh * subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId]; - _subMeshDS = subMesh->GetSubMeshDS(); - } + int subMeshId = _subMesh_i->GetId(); + if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) != + _subMesh_i->_mesh_i->_mapSubMesh.end()) + { + ::SMESH_subMesh * subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId]; + _subMeshDS = subMesh->GetSubMeshDS(); + } - END_OF("Constructor SMESH_MEDSupport_i"); + END_OF("Constructor SMESH_MEDSupport_i"); } //============================================================================= @@ -134,11 +134,11 @@ SMESH_MEDSupport_i::~SMESH_MEDSupport_i() CORBA::Long SMESH_MEDSupport_i::getCorbaIndex()throw(SALOME::SALOME_Exception) { - if (_subMeshDS == NULL) - THROW_SALOME_CORBA_EXCEPTION("No associated Support", - SALOME::INTERNAL_ERROR); - MESSAGE("Not implemented for SMESH_i"); - THROW_SALOME_CORBA_EXCEPTION("Not Implemented ", SALOME::BAD_PARAM); + if (_subMeshDS == NULL) + THROW_SALOME_CORBA_EXCEPTION("No associated Support", + SALOME::INTERNAL_ERROR); + MESSAGE("Not implemented for SMESH_i"); + THROW_SALOME_CORBA_EXCEPTION("Not Implemented ", SALOME::BAD_PARAM); } @@ -150,10 +150,10 @@ CORBA::Long SMESH_MEDSupport_i::getCorbaIndex()throw(SALOME::SALOME_Exception) char *SMESH_MEDSupport_i::getName() throw(SALOME::SALOME_Exception) { - if (_subMeshDS==NULL) - THROW_SALOME_CORBA_EXCEPTION("No associated Support", - SALOME::INTERNAL_ERROR); - return CORBA::string_dup(_name.c_str()); + if (_subMeshDS==NULL) + THROW_SALOME_CORBA_EXCEPTION("No associated Support", + SALOME::INTERNAL_ERROR); + return CORBA::string_dup(_name.c_str()); } @@ -165,10 +165,10 @@ char *SMESH_MEDSupport_i::getName() throw(SALOME::SALOME_Exception) char *SMESH_MEDSupport_i::getDescription() throw(SALOME::SALOME_Exception) { - if (_subMeshDS==NULL) - THROW_SALOME_CORBA_EXCEPTION("No associated Support", - SALOME::INTERNAL_ERROR); - return CORBA::string_dup(_description.c_str()); + if (_subMeshDS==NULL) + THROW_SALOME_CORBA_EXCEPTION("No associated Support", + SALOME::INTERNAL_ERROR); + return CORBA::string_dup(_description.c_str()); } //============================================================================= @@ -178,13 +178,13 @@ char *SMESH_MEDSupport_i::getDescription() throw(SALOME::SALOME_Exception) //============================================================================= SALOME_MED::MESH_ptr SMESH_MEDSupport_i::getMesh()throw(SALOME:: - SALOME_Exception) + SALOME_Exception) { - if (_subMeshDS==NULL) - THROW_SALOME_CORBA_EXCEPTION("No associated Support", - SALOME::INTERNAL_ERROR); + if (_subMeshDS==NULL) + THROW_SALOME_CORBA_EXCEPTION("No associated Support", + SALOME::INTERNAL_ERROR); - return _subMesh_i->_mesh_i->GetMEDMesh(); + return _subMesh_i->_mesh_i->GetMEDMesh(); } //============================================================================= @@ -194,36 +194,36 @@ SALOME_MED::MESH_ptr SMESH_MEDSupport_i::getMesh()throw(SALOME:: //============================================================================= CORBA::Boolean SMESH_MEDSupport_i::isOnAllElements()throw(SALOME:: - SALOME_Exception) + SALOME_Exception) { - if (_subMeshDS==NULL) - THROW_SALOME_CORBA_EXCEPTION("No associated Support", - SALOME::INTERNAL_ERROR); - if (_seqNumber == false) - { - if (_entity != SALOME_MED::MED_NONE) - { - _seqLength = _subMeshDS->NbNodes(); - _seqNumber = true; - } - else - { - MESSAGE("Only Node Families are implemented "); - THROW_SALOME_CORBA_EXCEPTION("Not implemented Yet ", - SALOME::BAD_PARAM); - } - } - try - { - _isOnAllElements = (_seqLength == _meshDS->NbNodes()); - } - catch(...) - { - MESSAGE("unable to acces related Mesh"); - THROW_SALOME_CORBA_EXCEPTION("No associated Mesh", - SALOME::INTERNAL_ERROR); - }; - return _isOnAllElements; + if (_subMeshDS==NULL) + THROW_SALOME_CORBA_EXCEPTION("No associated Support", + SALOME::INTERNAL_ERROR); + if (_seqNumber == false) + { + if (_entity != SALOME_MED::MED_NONE) + { + _seqLength = _subMeshDS->NbNodes(); + _seqNumber = true; + } + else + { + MESSAGE("Only Node Families are implemented "); + THROW_SALOME_CORBA_EXCEPTION("Not implemented Yet ", + SALOME::BAD_PARAM); + } + } + try + { + _isOnAllElements = (_seqLength == _meshDS->NbNodes()); + } + catch(...) + { + MESSAGE("unable to acces related Mesh"); + THROW_SALOME_CORBA_EXCEPTION("No associated Mesh", + SALOME::INTERNAL_ERROR); + }; + return _isOnAllElements; } //============================================================================= @@ -233,12 +233,12 @@ CORBA::Boolean SMESH_MEDSupport_i::isOnAllElements()throw(SALOME:: //============================================================================= SALOME_MED::medEntityMesh SMESH_MEDSupport_i::getEntity()throw(SALOME:: - SALOME_Exception) + SALOME_Exception) { - if (_subMeshDS==NULL) - THROW_SALOME_CORBA_EXCEPTION("No associated Support", - SALOME::INTERNAL_ERROR); - return _entity; + if (_subMeshDS==NULL) + THROW_SALOME_CORBA_EXCEPTION("No associated Support", + SALOME::INTERNAL_ERROR); + return _entity; } //============================================================================= @@ -248,29 +248,29 @@ SALOME_MED::medEntityMesh SMESH_MEDSupport_i::getEntity()throw(SALOME:: //============================================================================= SALOME_MED::medGeometryElement_array * - SMESH_MEDSupport_i::getTypes()throw(SALOME::SALOME_Exception) + SMESH_MEDSupport_i::getTypes()throw(SALOME::SALOME_Exception) { - if (_subMeshDS==NULL) - THROW_SALOME_CORBA_EXCEPTION("No associated Support", - SALOME::INTERNAL_ERROR); - SALOME_MED::medGeometryElement_array_var myseq = - new SALOME_MED::medGeometryElement_array; - try - { - int mySeqLength = _numberOfGeometricType; - myseq->length(mySeqLength); - for (int i = 0; i < mySeqLength; i++) - { - myseq[i] = _geometricType[i]; - } - } - catch(...) - { - MESSAGE("Exception lors de la recherche des differents types"); - THROW_SALOME_CORBA_EXCEPTION("Unable to acces Support Types", - SALOME::INTERNAL_ERROR); - } - return myseq._retn(); + if (_subMeshDS==NULL) + THROW_SALOME_CORBA_EXCEPTION("No associated Support", + SALOME::INTERNAL_ERROR); + SALOME_MED::medGeometryElement_array_var myseq = + new SALOME_MED::medGeometryElement_array; + try + { + int mySeqLength = _numberOfGeometricType; + myseq->length(mySeqLength); + for (int i = 0; i < mySeqLength; i++) + { + myseq[i] = _geometricType[i]; + } + } + catch(...) + { + MESSAGE("Exception lors de la recherche des differents types"); + THROW_SALOME_CORBA_EXCEPTION("Unable to acces Support Types", + SALOME::INTERNAL_ERROR); + } + return myseq._retn(); } //============================================================================= @@ -280,12 +280,12 @@ SALOME_MED::medGeometryElement_array * */ //============================================================================= CORBA::Long SMESH_MEDSupport_i::getNumberOfElements(SALOME_MED:: - medGeometryElement geomElement) throw(SALOME::SALOME_Exception) + medGeometryElement geomElement) throw(SALOME::SALOME_Exception) { - if (_subMeshDS==NULL) - THROW_SALOME_CORBA_EXCEPTION("No associated Support", - SALOME::INTERNAL_ERROR); - return _numberOfGeometricType; + if (_subMeshDS==NULL) + THROW_SALOME_CORBA_EXCEPTION("No associated Support", + SALOME::INTERNAL_ERROR); + return _numberOfGeometricType; } @@ -296,32 +296,32 @@ CORBA::Long SMESH_MEDSupport_i::getNumberOfElements(SALOME_MED:: //============================================================================= SALOME_MED::long_array * SMESH_MEDSupport_i::getNumber( - SALOME_MED::medGeometryElement geomElement) throw(SALOME::SALOME_Exception) + SALOME_MED::medGeometryElement geomElement) throw(SALOME::SALOME_Exception) { Unexpect aCatch(SALOME_SalomeException); - if (_subMeshDS==NULL) - THROW_SALOME_CORBA_EXCEPTION("No associated Support", - SALOME::INTERNAL_ERROR); + if (_subMeshDS==NULL) + THROW_SALOME_CORBA_EXCEPTION("No associated Support", + SALOME::INTERNAL_ERROR); - // A changer s'il ne s agit plus seulement de famille de noeuds - if (geomElement != SALOME_MED::MED_NONE) - THROW_SALOME_CORBA_EXCEPTION("Not implemented", SALOME::BAD_PARAM); + // A changer s'il ne s agit plus seulement de famille de noeuds + if (geomElement != SALOME_MED::MED_NONE) + THROW_SALOME_CORBA_EXCEPTION("Not implemented", SALOME::BAD_PARAM); - SALOME_MED::long_array_var myseq = new SALOME_MED::long_array; + SALOME_MED::long_array_var myseq = new SALOME_MED::long_array; - int i = 0; - myseq->length(_subMeshDS->NbNodes()); + int i = 0; + myseq->length(_subMeshDS->NbNodes()); - SMDS_NodeIteratorPtr it = _subMeshDS->GetNodes(); - while(it->more()) - { - myseq[i] = it->next()->GetID(); - i++; - }; + SMDS_NodeIteratorPtr it = _subMeshDS->GetNodes(); + while(it->more()) + { + myseq[i] = it->next()->GetID(); + i++; + }; - SCRUTE(myseq->length()); - MESSAGE("End of SMESH_MEDSupport_i::getNumber"); - return myseq._retn(); + SCRUTE(myseq->length()); + MESSAGE("End of SMESH_MEDSupport_i::getNumber"); + return myseq._retn(); } @@ -332,7 +332,7 @@ SALOME_MED::long_array * SMESH_MEDSupport_i::getNumber( //============================================================================= SALOME_MED::long_array * SMESH_MEDSupport_i::getNumberFromFile( - SALOME_MED::medGeometryElement geomElement) throw(SALOME::SALOME_Exception) + SALOME_MED::medGeometryElement geomElement) throw(SALOME::SALOME_Exception) { return getNumber(geomElement); } @@ -345,11 +345,11 @@ SALOME_MED::long_array * SMESH_MEDSupport_i::getNumberFromFile( //============================================================================= SALOME_MED::long_array * - SMESH_MEDSupport_i::getNumberIndex()throw(SALOME::SALOME_Exception) + SMESH_MEDSupport_i::getNumberIndex()throw(SALOME::SALOME_Exception) { - MESSAGE("Not implemented for SMESH_i"); - THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM); - return NULL; + MESSAGE("Not implemented for SMESH_i"); + THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM); + return NULL; } //============================================================================= /*! @@ -358,10 +358,10 @@ SALOME_MED::long_array * //============================================================================= CORBA::Long SMESH_MEDSupport_i::getNumberOfGaussPoint(SALOME_MED:: - medGeometryElement geomElement) throw(SALOME::SALOME_Exception) + medGeometryElement geomElement) throw(SALOME::SALOME_Exception) { - MESSAGE("Not implemented for SMESH_i"); - return 0; + MESSAGE("Not implemented for SMESH_i"); + return 0; } //============================================================================= /*! diff --git a/src/SMESH_I/SMESH_MEDSupport_i.hxx b/src/SMESH_I/SMESH_MEDSupport_i.hxx index 15cf3b8f4..56c36a881 100644 --- a/src/SMESH_I/SMESH_MEDSupport_i.hxx +++ b/src/SMESH_I/SMESH_MEDSupport_i.hxx @@ -42,78 +42,78 @@ class SMESH_subMesh_i; class SMESH_I_EXPORT SMESH_MEDSupport_i: - public virtual POA_SALOME_MED::SUPPORT, public virtual SALOME::GenericObj_i + public virtual POA_SALOME_MED::SUPPORT, public virtual SALOME::GenericObj_i { public: // Constructors and associated internal methods - SMESH_MEDSupport_i(SMESH_subMesh_i * sm, - std::string name, std::string description, SALOME_MED::medEntityMesh entity); - SMESH_MEDSupport_i(const SMESH_MEDSupport_i & s); + SMESH_MEDSupport_i(SMESH_subMesh_i * sm, + std::string name, std::string description, SALOME_MED::medEntityMesh entity); + SMESH_MEDSupport_i(const SMESH_MEDSupport_i & s); // IDL Methods - char *getName() throw(SALOME::SALOME_Exception); - char *getDescription() throw(SALOME::SALOME_Exception); - SALOME_MED::MESH_ptr getMesh() throw(SALOME::SALOME_Exception); - CORBA::Boolean isOnAllElements() throw(SALOME::SALOME_Exception); - SALOME_MED::medEntityMesh getEntity() throw(SALOME::SALOME_Exception); + char *getName() throw(SALOME::SALOME_Exception); + char *getDescription() throw(SALOME::SALOME_Exception); + SALOME_MED::MESH_ptr getMesh() throw(SALOME::SALOME_Exception); + CORBA::Boolean isOnAllElements() throw(SALOME::SALOME_Exception); + SALOME_MED::medEntityMesh getEntity() throw(SALOME::SALOME_Exception); CORBA::Long - getNumberOfElements(SALOME_MED::medGeometryElement geomElement) - throw(SALOME::SALOME_Exception); + getNumberOfElements(SALOME_MED::medGeometryElement geomElement) + throw(SALOME::SALOME_Exception); CORBA::Long getNumberOfTypes() throw (SALOME::SALOME_Exception); - SALOME_MED::long_array * - getNumber(SALOME_MED::medGeometryElement geomElement) - throw(SALOME::SALOME_Exception); + SALOME_MED::long_array * + getNumber(SALOME_MED::medGeometryElement geomElement) + throw(SALOME::SALOME_Exception); /*! * Same function as getNumber. */ - SALOME_MED::long_array * - getNumberFromFile(SALOME_MED::medGeometryElement geomElement) - throw(SALOME::SALOME_Exception); + SALOME_MED::long_array * + getNumberFromFile(SALOME_MED::medGeometryElement geomElement) + throw(SALOME::SALOME_Exception); - SALOME_MED::long_array * getNumberIndex() - throw(SALOME::SALOME_Exception); + SALOME_MED::long_array * getNumberIndex() + throw(SALOME::SALOME_Exception); CORBA::Long - getNumberOfGaussPoint(SALOME_MED::medGeometryElement geomElement) - throw(SALOME::SALOME_Exception); + getNumberOfGaussPoint(SALOME_MED::medGeometryElement geomElement) + throw(SALOME::SALOME_Exception); SALOME_MED::long_array* getNumbersOfGaussPoint() - throw (SALOME::SALOME_Exception); + throw (SALOME::SALOME_Exception); - SALOME_MED::medGeometryElement_array *getTypes() - throw(SALOME::SALOME_Exception); + SALOME_MED::medGeometryElement_array *getTypes() + throw(SALOME::SALOME_Exception); void getBoundaryElements() throw (SALOME::SALOME_Exception); - CORBA::Long getCorbaIndex() throw(SALOME::SALOME_Exception); + CORBA::Long getCorbaIndex() throw(SALOME::SALOME_Exception); SALOME_MED::SUPPORT::supportInfos * getSupportGlobal() - throw (SALOME::SALOME_Exception); + throw (SALOME::SALOME_Exception); - void createSeq() throw(SALOME::SALOME_Exception); + void createSeq() throw(SALOME::SALOME_Exception); public: //public field - const SMESHDS_SubMesh * _subMeshDS; - ::SMESH_subMesh_i * _subMesh_i; + const SMESHDS_SubMesh * _subMeshDS; + ::SMESH_subMesh_i * _subMesh_i; - SMESHDS_Mesh * _meshDS; - std::string _name; + SMESHDS_Mesh * _meshDS; + std::string _name; std::string _description; - bool _isOnAllElements; - bool _seqNumber; - int _seqLength; + bool _isOnAllElements; + bool _seqNumber; + int _seqLength; - SALOME_MED::medEntityMesh _entity; - SALOME_MED::medGeometryElement * _geometricType; - int _numberOfGeometricType; + SALOME_MED::medEntityMesh _entity; + SALOME_MED::medGeometryElement * _geometricType; + int _numberOfGeometricType; protected: - SMESH_MEDSupport_i(); - ~SMESH_MEDSupport_i(); + SMESH_MEDSupport_i(); + ~SMESH_MEDSupport_i(); }; #endif /* _MED_MEDSUPPORT_I_HXX_ */ diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 0b19c1bd1..959c09c67 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -2568,7 +2568,7 @@ ExtrusionAlongPathObjX(SMESH::SMESH_IDSource_ptr Object, << ( HasRefPoint ? RefPoint.x : 0 ) << ", " << ( HasRefPoint ? RefPoint.y : 0 ) << ", " << ( HasRefPoint ? RefPoint.z : 0 ) << " ), " - << MakeGroups << ", " + << MakeGroups << ", " << ElemType << " )"; } return aGroups; diff --git a/src/SMESH_I/SMESH_NoteBook.cxx b/src/SMESH_I/SMESH_NoteBook.cxx index bd7268049..2345a4279 100644 --- a/src/SMESH_I/SMESH_NoteBook.cxx +++ b/src/SMESH_I/SMESH_NoteBook.cxx @@ -239,19 +239,19 @@ void SMESH_NoteBook::ReplaceVariables() TMeshEditorMap::const_iterator meIt = myMeshEditors.find(aObject); if(meIt != myMeshEditors.end()) { TCollection_AsciiString aMesh = (*meIt).second; - it = _objectMap.find(aMesh); + it = _objectMap.find(aMesh); } } if(it == _objectMap.end()) { // additional check for pattern mapping if(aMethod.IsEqual("ApplyToMeshFaces") || - aMethod.IsEqual("ApplyToHexahedrons")) - it = _objectMap.find(aCmd->GetArg(1)); + aMethod.IsEqual("ApplyToHexahedrons")) + it = _objectMap.find(aCmd->GetArg(1)); } if(it != _objectMap.end()) { if(MYDEBUG) - cout << "Found object : " << (*it).first << endl; + cout << "Found object : " << (*it).first << endl; ObjectStates *aStates = (*it).second; // Case for LocalLength hypothesis if(aStates->GetObjectType().IsEqual("LocalLength") && aStates->GetCurrectState().size() >= 2) { @@ -402,9 +402,9 @@ void SMESH_NoteBook::ReplaceVariables() } else if(aStates->GetObjectType().IsEqual("Mesh")) { - TState aCurrentState = aStates->GetCurrectState(); + TState aCurrentState = aStates->GetCurrectState(); int aCurrentStateSize = aCurrentState.size(); - if(aMethod.IsEqual("Translate") || + if(aMethod.IsEqual("Translate") || aMethod.IsEqual("TranslateMakeGroups") || aMethod.IsEqual("TranslateMakeMesh") || aMethod.IsEqual("TranslateObject") || @@ -419,211 +419,211 @@ void SMESH_NoteBook::ReplaceVariables() } } if(anArgIndex > 0) { - if(aCurrentStateSize == 3) { // translation by dx, dy, dz - for(int j = 0; j < aCurrentStateSize; j++) { - if(!aCurrentState.at(j).IsEmpty()) { - isVariableFound = true; - aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); - } - } - } - else if(aCurrentStateSize == 6) { // translation by x1, x2, y1, y2, z1, z2 - // TODO: limitation until operations on the variables will be introduced - /* - isVariableFound = true; - for(int j = 0; j < 3; j++) { - TCollection_AsciiString anArg = aCmd->GetArg(anArgIndex+j); - TCollection_AsciiString aValue1 = aCurrentState.at(2*j), aValue2 = aCurrentState.at(2*j+1); - bool aV1 = !aValue1.IsEmpty(); - bool aV2 = !aValue2.IsEmpty(); - double aValue, aCurrentValue = anArg.IsRealValue() ? anArg.RealValue() : 0; - if(aV1 && !aV2) { - if(!GetReal(aValue1, aValue)) - aValue = 0; - aValue2 = TCollection_AsciiString( aValue + aCurrentValue ); - } - else if(!aV1 && aV2) { - if(!GetReal(aValue2, aValue)) - aValue = 0; - aValue1 = TCollection_AsciiString( aValue - aCurrentValue ); - } - else if(!aV1 && !aV2) { - aValue1 = TCollection_AsciiString( 0 ); - aValue2 = TCollection_AsciiString( aCurrentValue ); - } - aCmd->SetArg(anArgIndex+j, aValue1 + ", " + aValue2 ); - } - */ - } + if(aCurrentStateSize == 3) { // translation by dx, dy, dz + for(int j = 0; j < aCurrentStateSize; j++) { + if(!aCurrentState.at(j).IsEmpty()) { + isVariableFound = true; + aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); + } + } + } + else if(aCurrentStateSize == 6) { // translation by x1, x2, y1, y2, z1, z2 + // TODO: limitation until operations on the variables will be introduced + /* + isVariableFound = true; + for(int j = 0; j < 3; j++) { + TCollection_AsciiString anArg = aCmd->GetArg(anArgIndex+j); + TCollection_AsciiString aValue1 = aCurrentState.at(2*j), aValue2 = aCurrentState.at(2*j+1); + bool aV1 = !aValue1.IsEmpty(); + bool aV2 = !aValue2.IsEmpty(); + double aValue, aCurrentValue = anArg.IsRealValue() ? anArg.RealValue() : 0; + if(aV1 && !aV2) { + if(!GetReal(aValue1, aValue)) + aValue = 0; + aValue2 = TCollection_AsciiString( aValue + aCurrentValue ); + } + else if(!aV1 && aV2) { + if(!GetReal(aValue2, aValue)) + aValue = 0; + aValue1 = TCollection_AsciiString( aValue - aCurrentValue ); + } + else if(!aV1 && !aV2) { + aValue1 = TCollection_AsciiString( 0 ); + aValue2 = TCollection_AsciiString( aCurrentValue ); + } + aCmd->SetArg(anArgIndex+j, aValue1 + ", " + aValue2 ); + } + */ + } } if(isVariableFound) { TCollection_AsciiString aDim; - if(aCurrentStateSize == 6) - aDim = "6"; + if(aCurrentStateSize == 6) + aDim = "6"; aCmd->SetArg(anArgIndex - 1, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".PointStructStr"+aDim); aCmd->SetArg(anArgIndex - 2, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".DirStructStr"); } aStates->IncrementState(); } - else if(aMethod.IsEqual("Rotate") || - aMethod.IsEqual("RotateMakeGroups") || - aMethod.IsEqual("RotateMakeMesh") || + else if(aMethod.IsEqual("Rotate") || + aMethod.IsEqual("RotateMakeGroups") || + aMethod.IsEqual("RotateMakeMesh") || aMethod.IsEqual("RotateObject") || aMethod.IsEqual("RotateObjectMakeGroups") || aMethod.IsEqual("RotateObjectMakeMesh") || - aMethod.IsEqual("RotationSweep") || - aMethod.IsEqual("RotationSweepObject") || - aMethod.IsEqual("RotationSweepObject1D") || - aMethod.IsEqual("RotationSweepObject2D") || - aMethod.IsEqual("RotationSweepMakeGroups") || - aMethod.IsEqual("RotationSweepObjectMakeGroups") || - aMethod.IsEqual("RotationSweepObject1DMakeGroups") || - aMethod.IsEqual("RotationSweepObject2DMakeGroups") || - aMethod.IsEqual("Mirror") || - aMethod.IsEqual("MirrorMakeMesh") || + aMethod.IsEqual("RotationSweep") || + aMethod.IsEqual("RotationSweepObject") || + aMethod.IsEqual("RotationSweepObject1D") || + aMethod.IsEqual("RotationSweepObject2D") || + aMethod.IsEqual("RotationSweepMakeGroups") || + aMethod.IsEqual("RotationSweepObjectMakeGroups") || + aMethod.IsEqual("RotationSweepObject1DMakeGroups") || + aMethod.IsEqual("RotationSweepObject2DMakeGroups") || + aMethod.IsEqual("Mirror") || + aMethod.IsEqual("MirrorMakeMesh") || aMethod.IsEqual("MirrorMakeGroups") || aMethod.IsEqual("MirrorObject") || aMethod.IsEqual("MirrorObjectMakeMesh") || aMethod.IsEqual("MirrorObjectMakeGroups")) { - bool isSubstitute = false; - int anArgIndex = 0; - for(int i = 1, n = aCmd->GetNbArgs(); i <= n; i++) { - if(aCmd->GetArg(i).IsEqual("SMESH.AxisStruct")) { - anArgIndex = i+1; - break; - } - } - if(anArgIndex > 0) { - for(int j = 0; j < aCurrentStateSize; j++) { - if(!aCurrentState.at(j).IsEmpty()) { - if(j < 6) // 0-5 - axis struct, 6 - angle (rotation & sweep), 7-8 - nbSteps and tolerance (sweep) - isSubstitute = true; - aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); - } - } - } - if(isSubstitute) - aCmd->SetArg(anArgIndex - 1, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".AxisStructStr"); - aStates->IncrementState(); - } - else if(aMethod.IsEqual("AddNode") || - aMethod.IsEqual("MoveClosestNodeToPoint")) { - for(int j = 0; j < aCurrentStateSize; j++) { - if(!aCurrentState.at(j).IsEmpty()) - aCmd->SetArg(j+1, aCurrentState.at(j)); - } - aStates->IncrementState(); - } - else if(aMethod.IsEqual("MoveNode")) { - for(int j = 0; j < aCurrentStateSize; j++) { - if(!aCurrentState.at(j).IsEmpty()) - aCmd->SetArg(j+2, aCurrentState.at(j)); - } - aStates->IncrementState(); - } - else if(aMethod.IsEqual("ExtrusionSweep") || - aMethod.IsEqual("ExtrusionSweepObject") || - aMethod.IsEqual("ExtrusionSweepObject1D") || - aMethod.IsEqual("ExtrusionSweepObject2D") || - aMethod.IsEqual("ExtrusionSweepMakeGroups") || - aMethod.IsEqual("ExtrusionSweepObjectMakeGroups") || - aMethod.IsEqual("ExtrusionSweepObject1DMakeGroups") || - aMethod.IsEqual("ExtrusionSweepObject2DMakeGroups")) { - bool isSubstitute = false; - int anArgIndex = 0; - for(int i = 1, n = aCmd->GetNbArgs(); i <= n; i++) { - if(aCmd->GetArg(i).IsEqual("SMESH.PointStruct")) { - anArgIndex = i+1; - break; - } - } - if(anArgIndex > 0) { - for(int j = 0; j < aCurrentStateSize; j++) { - if(!aCurrentState.at(j).IsEmpty()) { - if(j < 3) // 0-2 - dir struct, 3 - number of steps - isSubstitute = true; - aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); - } - } - } - if(isSubstitute) { + bool isSubstitute = false; + int anArgIndex = 0; + for(int i = 1, n = aCmd->GetNbArgs(); i <= n; i++) { + if(aCmd->GetArg(i).IsEqual("SMESH.AxisStruct")) { + anArgIndex = i+1; + break; + } + } + if(anArgIndex > 0) { + for(int j = 0; j < aCurrentStateSize; j++) { + if(!aCurrentState.at(j).IsEmpty()) { + if(j < 6) // 0-5 - axis struct, 6 - angle (rotation & sweep), 7-8 - nbSteps and tolerance (sweep) + isSubstitute = true; + aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); + } + } + } + if(isSubstitute) + aCmd->SetArg(anArgIndex - 1, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".AxisStructStr"); + aStates->IncrementState(); + } + else if(aMethod.IsEqual("AddNode") || + aMethod.IsEqual("MoveClosestNodeToPoint")) { + for(int j = 0; j < aCurrentStateSize; j++) { + if(!aCurrentState.at(j).IsEmpty()) + aCmd->SetArg(j+1, aCurrentState.at(j)); + } + aStates->IncrementState(); + } + else if(aMethod.IsEqual("MoveNode")) { + for(int j = 0; j < aCurrentStateSize; j++) { + if(!aCurrentState.at(j).IsEmpty()) + aCmd->SetArg(j+2, aCurrentState.at(j)); + } + aStates->IncrementState(); + } + else if(aMethod.IsEqual("ExtrusionSweep") || + aMethod.IsEqual("ExtrusionSweepObject") || + aMethod.IsEqual("ExtrusionSweepObject1D") || + aMethod.IsEqual("ExtrusionSweepObject2D") || + aMethod.IsEqual("ExtrusionSweepMakeGroups") || + aMethod.IsEqual("ExtrusionSweepObjectMakeGroups") || + aMethod.IsEqual("ExtrusionSweepObject1DMakeGroups") || + aMethod.IsEqual("ExtrusionSweepObject2DMakeGroups")) { + bool isSubstitute = false; + int anArgIndex = 0; + for(int i = 1, n = aCmd->GetNbArgs(); i <= n; i++) { + if(aCmd->GetArg(i).IsEqual("SMESH.PointStruct")) { + anArgIndex = i+1; + break; + } + } + if(anArgIndex > 0) { + for(int j = 0; j < aCurrentStateSize; j++) { + if(!aCurrentState.at(j).IsEmpty()) { + if(j < 3) // 0-2 - dir struct, 3 - number of steps + isSubstitute = true; + aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); + } + } + } + if(isSubstitute) { aCmd->SetArg(anArgIndex - 1, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".PointStructStr"); aCmd->SetArg(anArgIndex - 2, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".DirStructStr"); - } - aStates->IncrementState(); - } - else if(aMethod.IsEqual("ExtrusionAlongPath") || - aMethod.IsEqual("ExtrusionAlongPathObject") || - aMethod.IsEqual("ExtrusionAlongPathObject1D") || - aMethod.IsEqual("ExtrusionAlongPathObject2D") || - aMethod.IsEqual("ExtrusionAlongPathMakeGroups") || - aMethod.IsEqual("ExtrusionAlongPathObjectMakeGroups") || - aMethod.IsEqual("ExtrusionAlongPathObject1DMakeGroups") || - aMethod.IsEqual("ExtrusionAlongPathObject2DMakeGroups") || - /* workaround for a bug in the command parsing algorithm */ - aCmd->GetString().Search("ExtrusionAlongPathMakeGroups") != -1 || - aCmd->GetString().Search("ExtrusionAlongPathObjectMakeGroups") != -1 || - aCmd->GetString().Search("ExtrusionAlongPathObject1DMakeGroups") != -1 || - aCmd->GetString().Search("ExtrusionAlongPathObject2DMakeGroups") != -1 ) { - int aNbAngles = aCurrentStateSize-3; // State looks like "Angle1:...:AngleN:X:Y:Z" - bool isSubstitute = false; - int anArgIndex = 0; - for(int i = 1, n = aCmd->GetNbArgs(); i <= n; i++) { - if(aCmd->GetArg(i).IsEqual("SMESH.PointStruct")) { - anArgIndex = i-1-aNbAngles; - break; - } - } - if(anArgIndex > 0) { - int j = 0; - for(; j < aNbAngles; j++) { - if(!aCurrentState.at(j).IsEmpty()) { - aCmd->SetArg(anArgIndex+j-1, aCurrentState.at(j)); - } - } - for(; j < aNbAngles+3; j++) { - if(!aCurrentState.at(j).IsEmpty()) { - isSubstitute = true; - aCmd->SetArg(anArgIndex+j+2, aCurrentState.at(j)); - } - } - } - if(isSubstitute) - aCmd->SetArg(anArgIndex + aNbAngles + 1, - TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".PointStructStr"); - aStates->IncrementState(); - } - else if(aMethod.IsEqual("TriToQuad") || - aMethod.IsEqual("Concatenate") || - aMethod.IsEqual("ConcatenateWithGroups")) { - if(aCurrentStateSize && !aCurrentState.at(0).IsEmpty()) - aCmd->SetArg(aCmd->GetNbArgs(), aCurrentState.at(0)); - aStates->IncrementState(); - } - else if(aMethod.IsEqual("Smooth") || - aMethod.IsEqual("SmoothObject") || - aMethod.IsEqual("SmoothParametric") || - aMethod.IsEqual("SmoothParametricObject")) { - int anArgIndex = aCmd->GetNbArgs() - 2; - for(int j = 0; j < aCurrentStateSize; j++) { - if(!aCurrentState.at(j).IsEmpty()) - aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); - } - aStates->IncrementState(); - } - else if(aMethod.IsEqual("ApplyToMeshFaces") || - aMethod.IsEqual("ApplyToHexahedrons")) { - int anArgIndex = aCmd->GetNbArgs()-1; - for(int j = 0; j < aCurrentStateSize; j++) - if(!aCurrentState.at(j).IsEmpty()) - aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); - aStates->IncrementState(); - } + } + aStates->IncrementState(); + } + else if(aMethod.IsEqual("ExtrusionAlongPath") || + aMethod.IsEqual("ExtrusionAlongPathObject") || + aMethod.IsEqual("ExtrusionAlongPathObject1D") || + aMethod.IsEqual("ExtrusionAlongPathObject2D") || + aMethod.IsEqual("ExtrusionAlongPathMakeGroups") || + aMethod.IsEqual("ExtrusionAlongPathObjectMakeGroups") || + aMethod.IsEqual("ExtrusionAlongPathObject1DMakeGroups") || + aMethod.IsEqual("ExtrusionAlongPathObject2DMakeGroups") || + /* workaround for a bug in the command parsing algorithm */ + aCmd->GetString().Search("ExtrusionAlongPathMakeGroups") != -1 || + aCmd->GetString().Search("ExtrusionAlongPathObjectMakeGroups") != -1 || + aCmd->GetString().Search("ExtrusionAlongPathObject1DMakeGroups") != -1 || + aCmd->GetString().Search("ExtrusionAlongPathObject2DMakeGroups") != -1 ) { + int aNbAngles = aCurrentStateSize-3; // State looks like "Angle1:...:AngleN:X:Y:Z" + bool isSubstitute = false; + int anArgIndex = 0; + for(int i = 1, n = aCmd->GetNbArgs(); i <= n; i++) { + if(aCmd->GetArg(i).IsEqual("SMESH.PointStruct")) { + anArgIndex = i-1-aNbAngles; + break; + } + } + if(anArgIndex > 0) { + int j = 0; + for(; j < aNbAngles; j++) { + if(!aCurrentState.at(j).IsEmpty()) { + aCmd->SetArg(anArgIndex+j-1, aCurrentState.at(j)); + } + } + for(; j < aNbAngles+3; j++) { + if(!aCurrentState.at(j).IsEmpty()) { + isSubstitute = true; + aCmd->SetArg(anArgIndex+j+2, aCurrentState.at(j)); + } + } + } + if(isSubstitute) + aCmd->SetArg(anArgIndex + aNbAngles + 1, + TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".PointStructStr"); + aStates->IncrementState(); + } + else if(aMethod.IsEqual("TriToQuad") || + aMethod.IsEqual("Concatenate") || + aMethod.IsEqual("ConcatenateWithGroups")) { + if(aCurrentStateSize && !aCurrentState.at(0).IsEmpty()) + aCmd->SetArg(aCmd->GetNbArgs(), aCurrentState.at(0)); + aStates->IncrementState(); + } + else if(aMethod.IsEqual("Smooth") || + aMethod.IsEqual("SmoothObject") || + aMethod.IsEqual("SmoothParametric") || + aMethod.IsEqual("SmoothParametricObject")) { + int anArgIndex = aCmd->GetNbArgs() - 2; + for(int j = 0; j < aCurrentStateSize; j++) { + if(!aCurrentState.at(j).IsEmpty()) + aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); + } + aStates->IncrementState(); + } + else if(aMethod.IsEqual("ApplyToMeshFaces") || + aMethod.IsEqual("ApplyToHexahedrons")) { + int anArgIndex = aCmd->GetNbArgs()-1; + for(int j = 0; j < aCurrentStateSize; j++) + if(!aCurrentState.at(j).IsEmpty()) + aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); + aStates->IncrementState(); + } } } else { if(MYDEBUG) - cout << "Object not found" << endl; + cout << "Object not found" << endl; } if(MYDEBUG) { cout<<"Command after: "<< aCmd->GetString()<GetMethod() == "GetMeshEditor" ) { // MeshEditor creation myMeshEditors.insert( make_pair( aCommand->GetResultValue(), - aCommand->GetObject() ) ); + aCommand->GetObject() ) ); } } diff --git a/src/SMESH_I/SMESH_PythonDump.hxx b/src/SMESH_I/SMESH_PythonDump.hxx index bee3cbb83..10d6dd85c 100644 --- a/src/SMESH_I/SMESH_PythonDump.hxx +++ b/src/SMESH_I/SMESH_PythonDump.hxx @@ -56,7 +56,7 @@ public: static TCollection_AsciiString ConvertScript(const TCollection_AsciiString& theScript, Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod, - Resource_DataMapOfAsciiStringAsciiString& theObjectNames); + Resource_DataMapOfAsciiStringAsciiString& theObjectNames); /*! * \brief Return the name of the python file wrapping IDL API diff --git a/src/SMESH_I/SMESH_subMesh_i.cxx b/src/SMESH_I/SMESH_subMesh_i.cxx index 7d342969a..2720de2c7 100644 --- a/src/SMESH_I/SMESH_subMesh_i.cxx +++ b/src/SMESH_I/SMESH_subMesh_i.cxx @@ -59,9 +59,9 @@ SMESH_subMesh_i::SMESH_subMesh_i() //============================================================================= SMESH_subMesh_i::SMESH_subMesh_i( PortableServer::POA_ptr thePOA, - SMESH_Gen_i* gen_i, - SMESH_Mesh_i* mesh_i, - int localId ) + SMESH_Gen_i* gen_i, + SMESH_Mesh_i* mesh_i, + int localId ) : SALOME::GenericObj_i( thePOA ) { MESSAGE("SMESH_subMesh_i::SMESH_subMesh_i"); @@ -458,11 +458,11 @@ GEOM::GEOM_Object_ptr SMESH_subMesh_i::GetSubShape() TopoDS_Shape S = _mesh_i->_mapSubMesh[ _localId ]->GetSubShape(); if ( !S.IsNull() ) { aShapeObj = _gen_i->ShapeToGeomObject( S ); - //mzn: N7PAL16232, N7PAL16233 - //In some cases it's possible that GEOM_Client contains the shape same to S, but - //with another orientation. - if (aShapeObj->_is_nil()) - aShapeObj = _gen_i->ShapeToGeomObject( S.Reversed() ); + //mzn: N7PAL16232, N7PAL16233 + //In some cases it's possible that GEOM_Client contains the shape same to S, but + //with another orientation. + if (aShapeObj->_is_nil()) + aShapeObj = _gen_i->ShapeToGeomObject( S.Reversed() ); } } } diff --git a/src/SMESH_I/SMESH_subMesh_i.hxx b/src/SMESH_I/SMESH_subMesh_i.hxx index 26b37a753..5a6eb8bd8 100644 --- a/src/SMESH_I/SMESH_subMesh_i.hxx +++ b/src/SMESH_I/SMESH_subMesh_i.hxx @@ -48,8 +48,8 @@ public: SMESH_subMesh_i(); SMESH_subMesh_i( PortableServer::POA_ptr thePOA, SMESH_Gen_i* gen_i, - SMESH_Mesh_i* mesh_i, - int localId ); + SMESH_Mesh_i* mesh_i, + int localId ); ~SMESH_subMesh_i(); CORBA::Long GetNumberOfElements()