This commit is contained in:
eap 2009-11-03 13:07:31 +00:00
parent 56bab2329c
commit 44f1a50b52
17 changed files with 538 additions and 538 deletions

View File

@ -121,7 +121,7 @@ namespace {
TCollection_AsciiString TCollection_AsciiString
SMESH_2smeshpy::ConvertScript(const TCollection_AsciiString& theScript, SMESH_2smeshpy::ConvertScript(const TCollection_AsciiString& theScript,
Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod, Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
Resource_DataMapOfAsciiStringAsciiString& theObjectNames) Resource_DataMapOfAsciiStringAsciiString& theObjectNames)
{ {
theGen = new _pyGen( theEntry2AccessorMethod, theObjectNames ); theGen = new _pyGen( theEntry2AccessorMethod, theObjectNames );
@ -196,7 +196,7 @@ SMESH_2smeshpy::ConvertScript(const TCollection_AsciiString& theScript,
//================================================================================ //================================================================================
_pyGen::_pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod, _pyGen::_pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
Resource_DataMapOfAsciiStringAsciiString& theObjectNames) Resource_DataMapOfAsciiStringAsciiString& theObjectNames)
: _pyObject( new _pyCommand( TPythonDump::SMESHGenName(), 0 )), : _pyObject( new _pyCommand( TPythonDump::SMESHGenName(), 0 )),
myID2AccessorMethod( theEntry2AccessorMethod ), myID2AccessorMethod( theEntry2AccessorMethod ),
myObjectNames( theObjectNames ) myObjectNames( theObjectNames )
@ -541,7 +541,7 @@ Handle(_pyHypothesis) _pyGen::FindAlgo( const _pyID& theGeom, const _pyID& theMe
if ( !hyp->IsNull() && if ( !hyp->IsNull() &&
(*hyp)->IsAlgo() && (*hyp)->IsAlgo() &&
theHypothesis->CanBeCreatedBy( (*hyp)->GetAlgoType() ) && theHypothesis->CanBeCreatedBy( (*hyp)->GetAlgoType() ) &&
(*hyp)->GetGeom() == theGeom && (*hyp)->GetGeom() == theGeom &&
(*hyp)->GetMesh() == theMesh ) (*hyp)->GetMesh() == theMesh )
return *hyp; return *hyp;
return 0; return 0;
@ -624,8 +624,8 @@ void _pyGen::SetCommandBefore( Handle(_pyCommand) theCmd, Handle(_pyCommand) the
//================================================================================ //================================================================================
void _pyGen::setNeighbourCommand( Handle(_pyCommand)& theCmd, void _pyGen::setNeighbourCommand( Handle(_pyCommand)& theCmd,
Handle(_pyCommand)& theOtherCmd, Handle(_pyCommand)& theOtherCmd,
const bool theIsAfter ) const bool theIsAfter )
{ {
list< Handle(_pyCommand) >::iterator pos; list< Handle(_pyCommand) >::iterator pos;
pos = find( myCommands.begin(), myCommands.end(), theCmd ); pos = find( myCommands.begin(), myCommands.end(), theCmd );
@ -680,8 +680,8 @@ _pyID _pyGen::GenerateNewID( const _pyID& theID )
while ( myObjectNames.IsBound( aNewID ) ); while ( myObjectNames.IsBound( aNewID ) );
myObjectNames.Bind( aNewID, myObjectNames.IsBound( theID ) myObjectNames.Bind( aNewID, myObjectNames.IsBound( theID )
? (myObjectNames.Find( theID ) + _pyID( "_" ) + _pyID( index-1 )) ? (myObjectNames.Find( theID ) + _pyID( "_" ) + _pyID( index-1 ))
: _pyID( "A" ) + aNewID ); : _pyID( "A" ) + aNewID );
return aNewID; return aNewID;
} }
@ -952,21 +952,21 @@ void _pyMesh::Flush()
if ( algo->IsWrapped() ) { if ( algo->IsWrapped() ) {
_pyID localAlgoID = theGen->GenerateNewID( algoID ); _pyID localAlgoID = theGen->GenerateNewID( algoID );
TCollection_AsciiString aNewCmdStr = localAlgoID + TCollection_AsciiString aNewCmdStr = localAlgoID +
TCollection_AsciiString( " = " ) + theGen->GetID() + TCollection_AsciiString( " = " ) + theGen->GetID() +
TCollection_AsciiString( ".CreateHypothesis( \"" ) + algo->GetAlgoType() + TCollection_AsciiString( ".CreateHypothesis( \"" ) + algo->GetAlgoType() +
TCollection_AsciiString( "\" )" ); TCollection_AsciiString( "\" )" );
Handle(_pyCommand) newCmd = theGen->AddCommand( aNewCmdStr ); Handle(_pyCommand) newCmd = theGen->AddCommand( aNewCmdStr );
Handle(_pyAlgorithm) newAlgo = Handle(_pyAlgorithm)::DownCast(theGen->FindHyp( localAlgoID )); Handle(_pyAlgorithm) newAlgo = Handle(_pyAlgorithm)::DownCast(theGen->FindHyp( localAlgoID ));
if ( !newAlgo.IsNull() ) { if ( !newAlgo.IsNull() ) {
newAlgo->Assign( algo, this->GetID() ); newAlgo->Assign( algo, this->GetID() );
newAlgo->SetCreationCmd( newCmd ); newAlgo->SetCreationCmd( newCmd );
algo = newAlgo; algo = newAlgo;
// set algorithm creation // set algorithm creation
theGen->SetCommandBefore( newCmd, addCmd ); theGen->SetCommandBefore( newCmd, addCmd );
} }
else else
newCmd->Clear(); newCmd->Clear();
} }
_pyID geom = addCmd->GetArg( 1 ); _pyID geom = addCmd->GetArg( 1 );
bool isLocalAlgo = ( geom != GetGeom() ); bool isLocalAlgo = ( geom != GetGeom() );
@ -982,14 +982,14 @@ void _pyMesh::Flush()
addCmd->SetArg( addCmd->GetNbArgs() + 1, addCmd->SetArg( addCmd->GetNbArgs() + 1,
TCollection_AsciiString( "geom=" ) + geom ); TCollection_AsciiString( "geom=" ) + geom );
// sm = mesh.GetSubMesh(geom, name) --> sm = ALGO.GetSubMesh() // 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 ) { for ( smIt = mySubmeshes.begin(); smIt != mySubmeshes.end(); ++smIt ) {
Handle(_pySubMesh) subMesh = *smIt; Handle(_pySubMesh) subMesh = *smIt;
Handle(_pyCommand) subCmd = subMesh->GetCreationCmd(); Handle(_pyCommand) subCmd = subMesh->GetCreationCmd();
if ( geom == subCmd->GetArg( 1 )) { if ( geom == subCmd->GetArg( 1 )) {
subCmd->SetObject( algo->GetID() ); subCmd->SetObject( algo->GetID() );
subCmd->RemoveArgs(); subCmd->RemoveArgs();
subMesh->SetCreator( algo ); subMesh->SetCreator( algo );
} }
} }
} }
@ -1275,7 +1275,7 @@ Handle(_pyHypothesis) _pyHypothesis::NewHypothesis( const Handle(_pyCommand)& th
} }
else if ( hypType == "TrianglePreference" ) { else if ( hypType == "TrianglePreference" ) {
hyp->SetConvMethodAndType( "TrianglePreference", "Quadrangle_2D"); hyp->SetConvMethodAndType( "TrianglePreference", "Quadrangle_2D");
} }
// BLSURF ---------- // BLSURF ----------
else if ( hypType == "BLSURF" ) { else if ( hypType == "BLSURF" ) {
algo->SetConvMethodAndType( "Triangle", hypType.ToCString()); algo->SetConvMethodAndType( "Triangle", hypType.ToCString());
@ -1532,7 +1532,7 @@ void _pyHypothesis::ClearAllCommands()
//================================================================================ //================================================================================
void _pyHypothesis::Assign( const Handle(_pyHypothesis)& theOther, void _pyHypothesis::Assign( const Handle(_pyHypothesis)& theOther,
const _pyID& theMesh ) const _pyID& theMesh )
{ {
myIsWrapped = false; myIsWrapped = false;
myMesh = theMesh; myMesh = theMesh;
@ -1995,15 +1995,15 @@ const TCollection_AsciiString & _pyCommand::GetObject()
int nb1 = 0; // number of ' character at the left of = int nb1 = 0; // number of ' character at the left of =
int nb2 = 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++ ) { for ( int i = 1; i < begPos-1; i++ ) {
if ( myString.Value( i )=='\'' ) if ( myString.Value( i )=='\'' )
nb1 += 1; nb1 += 1;
else if ( myString.Value( i )=='"' ) else if ( myString.Value( i )=='"' )
nb2 += 1; nb2 += 1;
} }
// if number of ' or " is not divisible by 2, // if number of ' or " is not divisible by 2,
// then get an object at the start of the command // then get an object at the start of the command
if ( nb1 % 2 != 0 || nb2 % 2 != 0 ) if ( nb1 % 2 != 0 || nb2 % 2 != 0 )
begPos = 1; begPos = 1;
} }
myObj = GetWord( myString, begPos, true ); myObj = GetWord( myString, begPos, true );
// check if object is complex, // check if object is complex,
@ -2073,16 +2073,16 @@ const TCollection_AsciiString & _pyCommand::GetArg( int index )
while ( begPos != EMPTY ) { while ( begPos != EMPTY ) {
begPos += prevLen; begPos += prevLen;
if( myString.Value( begPos ) == '(' ) if( myString.Value( begPos ) == '(' )
nbNestings++; nbNestings++;
// check if we are looking at the closing parenthesis // check if we are looking at the closing parenthesis
while ( begPos <= Length() && isspace( myString.Value( begPos ))) while ( begPos <= Length() && isspace( myString.Value( begPos )))
++begPos; ++begPos;
if ( begPos > Length() ) if ( begPos > Length() )
break; break;
if ( myString.Value( begPos ) == ')' ) { if ( myString.Value( begPos ) == ')' ) {
nbNestings--; nbNestings--;
if( nbNestings == 0 ) if( nbNestings == 0 )
break; break;
} }
myArgs.Append( GetWord( myString, begPos, true, true )); myArgs.Append( GetWord( myString, begPos, true, true ));
SetBegPos( ARG1_IND + i, begPos ); SetBegPos( ARG1_IND + i, begPos );

View File

@ -327,7 +327,7 @@ public:
void Process( const Handle(_pyCommand)& theCommand); void Process( const Handle(_pyCommand)& theCommand);
void Flush(); void Flush();
virtual void Assign( const Handle(_pyHypothesis)& theOther, virtual void Assign( const Handle(_pyHypothesis)& theOther,
const _pyID& theMesh ); const _pyID& theMesh );
DEFINE_STANDARD_RTTI (_pyHypothesis) DEFINE_STANDARD_RTTI (_pyHypothesis)
}; };

View File

@ -66,8 +66,8 @@ namespace SMESH
TCollection_AsciiString aCollection(Standard_CString(aString.c_str())); TCollection_AsciiString aCollection(Standard_CString(aString.c_str()));
SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy(); SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy();
if(!aStudy->_is_nil() && !aCollection.IsEmpty()){ if(!aStudy->_is_nil() && !aCollection.IsEmpty()){
aSMESHGen->AddToPythonScript(aStudy->StudyId(),aCollection); aSMESHGen->AddToPythonScript(aStudy->StudyId(),aCollection);
if(MYDEBUG) MESSAGE(aString); if(MYDEBUG) MESSAGE(aString);
} }
} }
} }
@ -587,8 +587,8 @@ Handle(TColStd_HSequenceOfInteger) FindEntries (TCollection_AsciiString& theStri
isFound = Standard_False; isFound = Standard_False;
while((j < aLen) && ( isdigit(c) || c == ':' )) { //Check if it is an entry while((j < aLen) && ( isdigit(c) || c == ':' )) { //Check if it is an entry
c = (int)arr[j++]; c = (int)arr[j++];
if(c == ':') isFound = Standard_True; if(c == ':') isFound = Standard_True;
} }
if (isFound) { if (isFound) {

View File

@ -2436,13 +2436,13 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria
pd << "aCriterion = SMESH.Filter.Criterion(" << aCriterion << "," << aCompare pd << "aCriterion = SMESH.Filter.Criterion(" << aCriterion << "," << aCompare
<< "," << aThreshold << ",'" << aThresholdStr; << "," << aThreshold << ",'" << aThresholdStr;
if (aThresholdID && strlen(aThresholdID)) if (aThresholdID && strlen(aThresholdID))
//pd << "',salome.ObjectToID(" << aThresholdID //pd << "',salome.ObjectToID(" << aThresholdID
pd << "','" << aThresholdID pd << "','" << aThresholdID
<< "'," << aUnary << "," << aBinary << "," << aTolerance << "'," << aUnary << "," << aBinary << "," << aTolerance
<< "," << aTypeOfElem << "," << aPrecision << ")"; << "," << aTypeOfElem << "," << aPrecision << ")";
else else
pd << "',''," << aUnary << "," << aBinary << "," << aTolerance pd << "',''," << aUnary << "," << aBinary << "," << aTolerance
<< "," << aTypeOfElem << "," << aPrecision << ")"; << "," << aTypeOfElem << "," << aPrecision << ")";
} }
SMESH::Predicate_ptr aPredicate = SMESH::Predicate::_nil(); 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(); SMESH::LyingOnGeom_ptr tmpPred = aFilterMgr->CreateLyingOnGeom();
tmpPred->SetElementType( aTypeOfElem ); tmpPred->SetElementType( aTypeOfElem );
tmpPred->SetShape( aThresholdID, aThresholdStr ); tmpPred->SetShape( aThresholdID, aThresholdStr );
tmpPred->SetTolerance( aTolerance ); tmpPred->SetTolerance( aTolerance );
aPredicate = tmpPred; aPredicate = tmpPred;
} }

View File

@ -107,10 +107,10 @@ namespace SMESH
double GetTolerance(); double GetTolerance();
virtual bool Contains( const SMESHDS_Mesh* theMeshDS, virtual bool Contains( const SMESHDS_Mesh* theMeshDS,
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
const SMDS_MeshElement* theElem, const SMDS_MeshElement* theElem,
TopAbs_ShapeEnum theFindShapeEnum, TopAbs_ShapeEnum theFindShapeEnum,
TopAbs_ShapeEnum theAvoidShapeEnum = TopAbs_SHAPE ); TopAbs_ShapeEnum theAvoidShapeEnum = TopAbs_SHAPE );
private: private:
virtual void init(); virtual void init();
@ -133,7 +133,7 @@ namespace SMESH
Description : An abstact class for all functors Description : An abstact class for all functors
*/ */
class SMESH_I_EXPORT Functor_i: public virtual POA_SMESH::Functor, class SMESH_I_EXPORT Functor_i: public virtual POA_SMESH::Functor,
public virtual SALOME::GenericObj_i public virtual SALOME::GenericObj_i
{ {
public: public:
void SetMesh( SMESH_Mesh_ptr theMesh ); void SetMesh( SMESH_Mesh_ptr theMesh );
@ -152,7 +152,7 @@ namespace SMESH
Description : Base class for numerical functors Description : Base class for numerical functors
*/ */
class SMESH_I_EXPORT NumericalFunctor_i: public virtual POA_SMESH::NumericalFunctor, class SMESH_I_EXPORT NumericalFunctor_i: public virtual POA_SMESH::NumericalFunctor,
public virtual Functor_i public virtual Functor_i
{ {
public: public:
CORBA::Double GetValue( CORBA::Long theElementId ); CORBA::Double GetValue( CORBA::Long theElementId );
@ -170,7 +170,7 @@ namespace SMESH
Description : Functor for calculation of minimum angle Description : Functor for calculation of minimum angle
*/ */
class SMESH_I_EXPORT MinimumAngle_i: public virtual POA_SMESH::MinimumAngle, class SMESH_I_EXPORT MinimumAngle_i: public virtual POA_SMESH::MinimumAngle,
public virtual NumericalFunctor_i public virtual NumericalFunctor_i
{ {
public: public:
MinimumAngle_i(); MinimumAngle_i();
@ -183,7 +183,7 @@ namespace SMESH
Description : Functor for calculating aspect ratio Description : Functor for calculating aspect ratio
*/ */
class SMESH_I_EXPORT AspectRatio_i: public virtual POA_SMESH::AspectRatio, class SMESH_I_EXPORT AspectRatio_i: public virtual POA_SMESH::AspectRatio,
public virtual NumericalFunctor_i public virtual NumericalFunctor_i
{ {
public: public:
AspectRatio_i(); AspectRatio_i();
@ -196,7 +196,7 @@ namespace SMESH
Description : Functor for calculating aspect ratio for 3D Description : Functor for calculating aspect ratio for 3D
*/ */
class SMESH_I_EXPORT AspectRatio3D_i: public virtual POA_SMESH::AspectRatio3D, class SMESH_I_EXPORT AspectRatio3D_i: public virtual POA_SMESH::AspectRatio3D,
public virtual NumericalFunctor_i public virtual NumericalFunctor_i
{ {
public: public:
AspectRatio3D_i(); AspectRatio3D_i();
@ -209,7 +209,7 @@ namespace SMESH
Description : Functor for calculating warping Description : Functor for calculating warping
*/ */
class SMESH_I_EXPORT Warping_i: public virtual POA_SMESH::Warping, class SMESH_I_EXPORT Warping_i: public virtual POA_SMESH::Warping,
public virtual NumericalFunctor_i public virtual NumericalFunctor_i
{ {
public: public:
Warping_i(); Warping_i();
@ -222,7 +222,7 @@ namespace SMESH
Description : Functor for calculating taper Description : Functor for calculating taper
*/ */
class SMESH_I_EXPORT Taper_i: public virtual POA_SMESH::Taper, class SMESH_I_EXPORT Taper_i: public virtual POA_SMESH::Taper,
public virtual NumericalFunctor_i public virtual NumericalFunctor_i
{ {
public: public:
Taper_i(); Taper_i();
@ -235,7 +235,7 @@ namespace SMESH
Description : Functor for calculating skew in degrees Description : Functor for calculating skew in degrees
*/ */
class SMESH_I_EXPORT Skew_i: public virtual POA_SMESH::Skew, class SMESH_I_EXPORT Skew_i: public virtual POA_SMESH::Skew,
public virtual NumericalFunctor_i public virtual NumericalFunctor_i
{ {
public: public:
Skew_i(); Skew_i();
@ -248,7 +248,7 @@ namespace SMESH
Description : Functor for calculating area Description : Functor for calculating area
*/ */
class SMESH_I_EXPORT Area_i: public virtual POA_SMESH::Area, class SMESH_I_EXPORT Area_i: public virtual POA_SMESH::Area,
public virtual NumericalFunctor_i public virtual NumericalFunctor_i
{ {
public: public:
Area_i(); Area_i();
@ -274,7 +274,7 @@ namespace SMESH
Description : Functor for calculating length of edge Description : Functor for calculating length of edge
*/ */
class SMESH_I_EXPORT Length_i: public virtual POA_SMESH::Length, class SMESH_I_EXPORT Length_i: public virtual POA_SMESH::Length,
public virtual NumericalFunctor_i public virtual NumericalFunctor_i
{ {
public: public:
Length_i(); Length_i();
@ -286,7 +286,7 @@ namespace SMESH
Description : Functor for calculating length of edge Description : Functor for calculating length of edge
*/ */
class SMESH_I_EXPORT Length2D_i: public virtual POA_SMESH::Length2D, class SMESH_I_EXPORT Length2D_i: public virtual POA_SMESH::Length2D,
public virtual NumericalFunctor_i public virtual NumericalFunctor_i
{ {
public: public:
Length2D_i(); Length2D_i();
@ -303,7 +303,7 @@ namespace SMESH
Description : Functor for calculating number of faces conneted to the edge Description : Functor for calculating number of faces conneted to the edge
*/ */
class SMESH_I_EXPORT MultiConnection_i: public virtual POA_SMESH::MultiConnection, class SMESH_I_EXPORT MultiConnection_i: public virtual POA_SMESH::MultiConnection,
public virtual NumericalFunctor_i public virtual NumericalFunctor_i
{ {
public: public:
MultiConnection_i(); MultiConnection_i();
@ -315,7 +315,7 @@ namespace SMESH
Description : Functor for calculating number of faces conneted to the edge Description : Functor for calculating number of faces conneted to the edge
*/ */
class SMESH_I_EXPORT MultiConnection2D_i: public virtual POA_SMESH::MultiConnection2D, class SMESH_I_EXPORT MultiConnection2D_i: public virtual POA_SMESH::MultiConnection2D,
public virtual NumericalFunctor_i public virtual NumericalFunctor_i
{ {
public: public:
MultiConnection2D_i(); MultiConnection2D_i();
@ -335,7 +335,7 @@ namespace SMESH
Description : Base class for all predicates Description : Base class for all predicates
*/ */
class SMESH_I_EXPORT Predicate_i: public virtual POA_SMESH::Predicate, class SMESH_I_EXPORT Predicate_i: public virtual POA_SMESH::Predicate,
public virtual Functor_i public virtual Functor_i
{ {
public: public:
CORBA::Boolean IsSatisfy( CORBA::Long theElementId ); CORBA::Boolean IsSatisfy( CORBA::Long theElementId );
@ -352,7 +352,7 @@ namespace SMESH
the point of view of MED convention the point of view of MED convention
*/ */
class SMESH_I_EXPORT BadOrientedVolume_i: public virtual POA_SMESH::BadOrientedVolume, class SMESH_I_EXPORT BadOrientedVolume_i: public virtual POA_SMESH::BadOrientedVolume,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
BadOrientedVolume_i(); BadOrientedVolume_i();
@ -364,7 +364,7 @@ namespace SMESH
Description : Predicate for selection on geometrical support Description : Predicate for selection on geometrical support
*/ */
class SMESH_I_EXPORT BelongToGeom_i: public virtual POA_SMESH::BelongToGeom, class SMESH_I_EXPORT BelongToGeom_i: public virtual POA_SMESH::BelongToGeom,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
BelongToGeom_i(); BelongToGeom_i();
@ -395,7 +395,7 @@ namespace SMESH
Description : Verify whether mesh element lie in pointed Geom planar object Description : Verify whether mesh element lie in pointed Geom planar object
*/ */
class SMESH_I_EXPORT BelongToSurface_i: public virtual POA_SMESH::BelongToSurface, class SMESH_I_EXPORT BelongToSurface_i: public virtual POA_SMESH::BelongToSurface,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
BelongToSurface_i( const Handle(Standard_Type)& ); BelongToSurface_i( const Handle(Standard_Type)& );
@ -426,7 +426,7 @@ namespace SMESH
Description : Verify whether mesh element lie in pointed Geom planar object Description : Verify whether mesh element lie in pointed Geom planar object
*/ */
class SMESH_I_EXPORT BelongToPlane_i: public virtual POA_SMESH::BelongToPlane, class SMESH_I_EXPORT BelongToPlane_i: public virtual POA_SMESH::BelongToPlane,
public virtual BelongToSurface_i public virtual BelongToSurface_i
{ {
public: public:
BelongToPlane_i(); BelongToPlane_i();
@ -439,7 +439,7 @@ namespace SMESH
Description : Verify whether mesh element lie in pointed Geom cylindrical object Description : Verify whether mesh element lie in pointed Geom cylindrical object
*/ */
class SMESH_I_EXPORT BelongToCylinder_i: public virtual POA_SMESH::BelongToCylinder, class SMESH_I_EXPORT BelongToCylinder_i: public virtual POA_SMESH::BelongToCylinder,
public virtual BelongToSurface_i public virtual BelongToSurface_i
{ {
public: public:
BelongToCylinder_i(); BelongToCylinder_i();
@ -465,7 +465,7 @@ namespace SMESH
Description : Predicate for selection on geometrical support(lying or partially lying) Description : Predicate for selection on geometrical support(lying or partially lying)
*/ */
class SMESH_I_EXPORT LyingOnGeom_i: public virtual POA_SMESH::LyingOnGeom, class SMESH_I_EXPORT LyingOnGeom_i: public virtual POA_SMESH::LyingOnGeom,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
LyingOnGeom_i(); LyingOnGeom_i();
@ -496,7 +496,7 @@ namespace SMESH
Description : Predicate for free borders Description : Predicate for free borders
*/ */
class SMESH_I_EXPORT FreeBorders_i: public virtual POA_SMESH::FreeBorders, class SMESH_I_EXPORT FreeBorders_i: public virtual POA_SMESH::FreeBorders,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
FreeBorders_i(); FreeBorders_i();
@ -509,7 +509,7 @@ namespace SMESH
Description : Predicate for free edges Description : Predicate for free edges
*/ */
class SMESH_I_EXPORT FreeEdges_i: public virtual POA_SMESH::FreeEdges, class SMESH_I_EXPORT FreeEdges_i: public virtual POA_SMESH::FreeEdges,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
FreeEdges_i(); FreeEdges_i();
@ -526,7 +526,7 @@ namespace SMESH
Description : Predicate for free faces Description : Predicate for free faces
*/ */
class SMESH_I_EXPORT FreeFaces_i: public virtual POA_SMESH::FreeFaces, class SMESH_I_EXPORT FreeFaces_i: public virtual POA_SMESH::FreeFaces,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
FreeFaces_i(); FreeFaces_i();
@ -539,7 +539,7 @@ namespace SMESH
Description : Predicate for free nodes Description : Predicate for free nodes
*/ */
class SMESH_I_EXPORT FreeNodes_i: public virtual POA_SMESH::FreeNodes, class SMESH_I_EXPORT FreeNodes_i: public virtual POA_SMESH::FreeNodes,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
FreeNodes_i(); FreeNodes_i();
@ -552,7 +552,7 @@ namespace SMESH
Description : Predicate for Range of Ids Description : Predicate for Range of Ids
*/ */
class SMESH_I_EXPORT RangeOfIds_i: public virtual POA_SMESH::RangeOfIds, class SMESH_I_EXPORT RangeOfIds_i: public virtual POA_SMESH::RangeOfIds,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
RangeOfIds_i(); RangeOfIds_i();
@ -572,7 +572,7 @@ namespace SMESH
Description : Verify whether a mesh element is linear Description : Verify whether a mesh element is linear
*/ */
class SMESH_I_EXPORT LinearOrQuadratic_i: public virtual POA_SMESH::LinearOrQuadratic, class SMESH_I_EXPORT LinearOrQuadratic_i: public virtual POA_SMESH::LinearOrQuadratic,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
LinearOrQuadratic_i(); LinearOrQuadratic_i();
@ -588,7 +588,7 @@ namespace SMESH
Description : Functor for check color of group to whic mesh element belongs to Description : Functor for check color of group to whic mesh element belongs to
*/ */
class SMESH_I_EXPORT GroupColor_i: public virtual POA_SMESH::GroupColor, class SMESH_I_EXPORT GroupColor_i: public virtual POA_SMESH::GroupColor,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
GroupColor_i(); GroupColor_i();
@ -607,7 +607,7 @@ namespace SMESH
Description : Functor for check element geometry type Description : Functor for check element geometry type
*/ */
class SMESH_I_EXPORT ElemGeomType_i: public virtual POA_SMESH::ElemGeomType, class SMESH_I_EXPORT ElemGeomType_i: public virtual POA_SMESH::ElemGeomType,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
ElemGeomType_i(); ElemGeomType_i();
@ -626,7 +626,7 @@ namespace SMESH
Description : Base class for comparators Description : Base class for comparators
*/ */
class SMESH_I_EXPORT Comparator_i: public virtual POA_SMESH::Comparator, class SMESH_I_EXPORT Comparator_i: public virtual POA_SMESH::Comparator,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
virtual ~Comparator_i(); virtual ~Comparator_i();
@ -651,7 +651,7 @@ namespace SMESH
Description : Comparator "<" Description : Comparator "<"
*/ */
class SMESH_I_EXPORT LessThan_i: public virtual POA_SMESH::LessThan, class SMESH_I_EXPORT LessThan_i: public virtual POA_SMESH::LessThan,
public virtual Comparator_i public virtual Comparator_i
{ {
public: public:
LessThan_i(); LessThan_i();
@ -664,7 +664,7 @@ namespace SMESH
Description : Comparator ">" Description : Comparator ">"
*/ */
class SMESH_I_EXPORT MoreThan_i: public virtual POA_SMESH::MoreThan, class SMESH_I_EXPORT MoreThan_i: public virtual POA_SMESH::MoreThan,
public virtual Comparator_i public virtual Comparator_i
{ {
public: public:
MoreThan_i(); MoreThan_i();
@ -677,7 +677,7 @@ namespace SMESH
Description : Comparator "=" Description : Comparator "="
*/ */
class SMESH_I_EXPORT EqualTo_i: public virtual POA_SMESH::EqualTo, class SMESH_I_EXPORT EqualTo_i: public virtual POA_SMESH::EqualTo,
public virtual Comparator_i public virtual Comparator_i
{ {
public: public:
EqualTo_i(); EqualTo_i();
@ -695,7 +695,7 @@ namespace SMESH
Description : Logical NOT predicate Description : Logical NOT predicate
*/ */
class SMESH_I_EXPORT LogicalNOT_i: public virtual POA_SMESH::LogicalNOT, class SMESH_I_EXPORT LogicalNOT_i: public virtual POA_SMESH::LogicalNOT,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
LogicalNOT_i(); LogicalNOT_i();
@ -716,7 +716,7 @@ namespace SMESH
Description : Base class for binary logical predicate Description : Base class for binary logical predicate
*/ */
class SMESH_I_EXPORT LogicalBinary_i: public virtual POA_SMESH::LogicalBinary, class SMESH_I_EXPORT LogicalBinary_i: public virtual POA_SMESH::LogicalBinary,
public virtual Predicate_i public virtual Predicate_i
{ {
public: public:
virtual ~LogicalBinary_i(); virtual ~LogicalBinary_i();
@ -742,7 +742,7 @@ namespace SMESH
Description : Logical AND Description : Logical AND
*/ */
class SMESH_I_EXPORT LogicalAND_i: public virtual POA_SMESH::LogicalAND, class SMESH_I_EXPORT LogicalAND_i: public virtual POA_SMESH::LogicalAND,
public virtual LogicalBinary_i public virtual LogicalBinary_i
{ {
public: public:
LogicalAND_i(); LogicalAND_i();
@ -755,7 +755,7 @@ namespace SMESH
Description : Logical OR Description : Logical OR
*/ */
class SMESH_I_EXPORT LogicalOR_i: public virtual POA_SMESH::LogicalOR, class SMESH_I_EXPORT LogicalOR_i: public virtual POA_SMESH::LogicalOR,
public virtual LogicalBinary_i public virtual LogicalBinary_i
{ {
public: public:
LogicalOR_i(); LogicalOR_i();
@ -767,7 +767,7 @@ namespace SMESH
FILTER FILTER
*/ */
class SMESH_I_EXPORT Filter_i: public virtual POA_SMESH::Filter, class SMESH_I_EXPORT Filter_i: public virtual POA_SMESH::Filter,
public virtual SALOME::GenericObj_i public virtual SALOME::GenericObj_i
{ {
public: public:
Filter_i(); Filter_i();
@ -792,13 +792,13 @@ namespace SMESH
static static
void void
GetElementsId( Predicate_i*, GetElementsId( Predicate_i*,
const SMDS_Mesh*, const SMDS_Mesh*,
Controls::Filter::TIdSequence& ); Controls::Filter::TIdSequence& );
static static
void void
GetElementsId( Predicate_i*, GetElementsId( Predicate_i*,
SMESH_Mesh_ptr, SMESH_Mesh_ptr,
Controls::Filter::TIdSequence& ); Controls::Filter::TIdSequence& );
virtual virtual
long_array* long_array*
@ -833,7 +833,7 @@ namespace SMESH
FILTER LIBRARY FILTER LIBRARY
*/ */
class SMESH_I_EXPORT FilterLibrary_i: public virtual POA_SMESH::FilterLibrary, class SMESH_I_EXPORT FilterLibrary_i: public virtual POA_SMESH::FilterLibrary,
public virtual SALOME::GenericObj_i public virtual SALOME::GenericObj_i
{ {
public: public:
FilterLibrary_i( const char* theFileName ); FilterLibrary_i( const char* theFileName );
@ -846,8 +846,8 @@ namespace SMESH
CORBA::Boolean AddEmpty( const char* theFilterName, ElementType theType ); CORBA::Boolean AddEmpty( const char* theFilterName, ElementType theType );
CORBA::Boolean Delete ( const char* theFilterName ); CORBA::Boolean Delete ( const char* theFilterName );
CORBA::Boolean Replace ( const char* theFilterName, CORBA::Boolean Replace ( const char* theFilterName,
const char* theNewName, const char* theNewName,
Filter_ptr theFilter ); Filter_ptr theFilter );
CORBA::Boolean Save(); CORBA::Boolean Save();
CORBA::Boolean SaveAs( const char* aFileName ); CORBA::Boolean SaveAs( const char* aFileName );
@ -871,7 +871,7 @@ namespace SMESH
*/ */
class SMESH_I_EXPORT FilterManager_i: public virtual POA_SMESH::FilterManager, class SMESH_I_EXPORT FilterManager_i: public virtual POA_SMESH::FilterManager,
public virtual SALOME::GenericObj_i public virtual SALOME::GenericObj_i
{ {
public: public:
FilterManager_i(); FilterManager_i();

View File

@ -176,7 +176,7 @@ public:
// ***************************************** // *****************************************
// Set a new Mesh object name // Set a new Mesh object name
void SetName(const char* theIOR, void SetName(const char* theIOR,
const char* theName); const char* theName);
//GEOM::GEOM_Gen_ptr SetGeomEngine( const char* containerLoc ); //GEOM::GEOM_Gen_ptr SetGeomEngine( const char* containerLoc );
void SetGeomEngine( GEOM::GEOM_Gen_ptr geomcompo ); void SetGeomEngine( GEOM::GEOM_Gen_ptr geomcompo );
@ -266,9 +266,9 @@ public:
* Return mesh preview structure * Return mesh preview structure
*/ */
SMESH::MeshPreviewStruct* Precompute( SMESH::SMESH_Mesh_ptr theMesh, SMESH::MeshPreviewStruct* Precompute( SMESH::SMESH_Mesh_ptr theMesh,
GEOM::GEOM_Object_ptr theSubObject, GEOM::GEOM_Object_ptr theSubObject,
SMESH::Dimension theDimension, SMESH::Dimension theDimension,
SMESH::long_array& theShapesId ) SMESH::long_array& theShapesId )
throw ( SALOME::SALOME_Exception ); throw ( SALOME::SALOME_Exception );
// Returns errors of hypotheses definintion // 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. // 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, GEOM::GEOM_Object_ptr FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
CORBA::Long theElementID) CORBA::Long theElementID)
throw ( SALOME::SALOME_Exception ); throw ( SALOME::SALOME_Exception );
// Concatenate the given meshes into one mesh // Concatenate the given meshes into one mesh
SMESH::SMESH_Mesh_ptr ConcatenateCommon(const SMESH::mesh_array& theMeshesArray, SMESH::SMESH_Mesh_ptr ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
CORBA::Boolean theUniteIdenticalGroups, CORBA::Boolean theUniteIdenticalGroups,
CORBA::Boolean theMergeNodesAndElements, CORBA::Boolean theMergeNodesAndElements,
CORBA::Double theMergeTolerance, CORBA::Double theMergeTolerance,
CORBA::Boolean theCommonGroups) CORBA::Boolean theCommonGroups)
throw ( SALOME::SALOME_Exception ); throw ( SALOME::SALOME_Exception );
// Concatenate the given meshes into one mesh // Concatenate the given meshes into one mesh
SMESH::SMESH_Mesh_ptr Concatenate(const SMESH::mesh_array& theMeshesArray, SMESH::SMESH_Mesh_ptr Concatenate(const SMESH::mesh_array& theMeshesArray,
CORBA::Boolean theUniteIdenticalGroups, CORBA::Boolean theUniteIdenticalGroups,
CORBA::Boolean theMergeNodesAndElements, CORBA::Boolean theMergeNodesAndElements,
CORBA::Double theMergeTolerance) CORBA::Double theMergeTolerance)
throw ( SALOME::SALOME_Exception ); throw ( SALOME::SALOME_Exception );
// Concatenate the given meshes into one mesh // Concatenate the given meshes into one mesh
// Create the groups of all elements from initial meshes // Create the groups of all elements from initial meshes
SMESH::SMESH_Mesh_ptr ConcatenateWithGroups(const SMESH::mesh_array& theMeshesArray, SMESH::SMESH_Mesh_ptr ConcatenateWithGroups(const SMESH::mesh_array& theMeshesArray,
CORBA::Boolean theUniteIdenticalGroups, CORBA::Boolean theUniteIdenticalGroups,
CORBA::Boolean theMergeNodesAndElements, CORBA::Boolean theMergeNodesAndElements,
CORBA::Double theMergeTolerance) CORBA::Double theMergeTolerance)
throw ( SALOME::SALOME_Exception ); throw ( SALOME::SALOME_Exception );
// **************************************************** // ****************************************************
@ -326,22 +326,22 @@ public:
// Save SMESH data // Save SMESH data
SALOMEDS::TMPFile* Save( SALOMEDS::SComponent_ptr theComponent, SALOMEDS::TMPFile* Save( SALOMEDS::SComponent_ptr theComponent,
const char* theURL, const char* theURL,
bool isMultiFile ); bool isMultiFile );
// Load SMESH data // Load SMESH data
bool Load( SALOMEDS::SComponent_ptr theComponent, bool Load( SALOMEDS::SComponent_ptr theComponent,
const SALOMEDS::TMPFile& theStream, const SALOMEDS::TMPFile& theStream,
const char* theURL, const char* theURL,
bool isMultiFile ); bool isMultiFile );
// Save SMESH data in ASCII format // Save SMESH data in ASCII format
SALOMEDS::TMPFile* SaveASCII( SALOMEDS::SComponent_ptr theComponent, SALOMEDS::TMPFile* SaveASCII( SALOMEDS::SComponent_ptr theComponent,
const char* theURL, const char* theURL,
bool isMultiFile ); bool isMultiFile );
// Load SMESH data in ASCII format // Load SMESH data in ASCII format
bool LoadASCII( SALOMEDS::SComponent_ptr theComponent, bool LoadASCII( SALOMEDS::SComponent_ptr theComponent,
const SALOMEDS::TMPFile& theStream, const SALOMEDS::TMPFile& theStream,
const char* theURL, const char* theURL,
bool isMultiFile ); bool isMultiFile );
// Create filter manager // Create filter manager
SMESH::FilterManager_ptr CreateFilterManager(); SMESH::FilterManager_ptr CreateFilterManager();
@ -357,22 +357,22 @@ public:
// Transform data from transient form to persistent // Transform data from transient form to persistent
char* IORToLocalPersistentID( SALOMEDS::SObject_ptr theSObject, char* IORToLocalPersistentID( SALOMEDS::SObject_ptr theSObject,
const char* IORString, const char* IORString,
CORBA::Boolean isMultiFile, CORBA::Boolean isMultiFile,
CORBA::Boolean isASCII ); CORBA::Boolean isASCII );
// Transform data from persistent form to transient // Transform data from persistent form to transient
char* LocalPersistentIDToIOR( SALOMEDS::SObject_ptr theSObject, char* LocalPersistentIDToIOR( SALOMEDS::SObject_ptr theSObject,
const char* aLocalPersistentID, const char* aLocalPersistentID,
CORBA::Boolean isMultiFile, CORBA::Boolean isMultiFile,
CORBA::Boolean isASCII ); CORBA::Boolean isASCII );
// Returns true if object can be published in the study // Returns true if object can be published in the study
bool CanPublishInStudy( CORBA::Object_ptr theIOR ); bool CanPublishInStudy( CORBA::Object_ptr theIOR );
// Publish object in the study // Publish object in the study
SALOMEDS::SObject_ptr PublishInStudy( SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr PublishInStudy( SALOMEDS::Study_ptr theStudy,
SALOMEDS::SObject_ptr theSObject, SALOMEDS::SObject_ptr theSObject,
CORBA::Object_ptr theObject, CORBA::Object_ptr theObject,
const char* theName ) const char* theName )
throw ( SALOME::SALOME_Exception ); throw ( SALOME::SALOME_Exception );
// Copy-paste methods - returns true if object can be copied to the clipboard // 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; } CORBA::Boolean CanPaste( const char* theComponentName, CORBA::Long theObjectID ) { return false; }
// Copy-paste methods - paste object from the clipboard // Copy-paste methods - paste object from the clipboard
SALOMEDS::SObject_ptr PasteInto( const SALOMEDS::TMPFile& theStream, SALOMEDS::SObject_ptr PasteInto( const SALOMEDS::TMPFile& theStream,
CORBA::Long theObjectID, CORBA::Long theObjectID,
SALOMEDS::SObject_ptr theObject ) { SALOMEDS::SObject_ptr theObject ) {
SALOMEDS::SObject_var aResultSO; SALOMEDS::SObject_var aResultSO;
return aResultSO._retn(); return aResultSO._retn();
} }
@ -394,8 +394,8 @@ public:
// ============ // ============
virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
CORBA::Boolean isPublished, CORBA::Boolean isPublished,
CORBA::Boolean& isValidScript); CORBA::Boolean& isValidScript);
void AddToPythonScript (int theStudyID, const TCollection_AsciiString& theString); void AddToPythonScript (int theStudyID, const TCollection_AsciiString& theString);
@ -452,7 +452,7 @@ public:
SMESH::SMESH_Mesh_ptr theMesh, SMESH::SMESH_Mesh_ptr theMesh,
SMESH::SMESH_subMesh_ptr theSubMesh, SMESH::SMESH_subMesh_ptr theSubMesh,
GEOM::GEOM_Object_ptr theShapeObject, GEOM::GEOM_Object_ptr theShapeObject,
const char* theName = 0); const char* theName = 0);
SALOMEDS::SObject_ptr PublishGroup (SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr PublishGroup (SALOMEDS::Study_ptr theStudy,
SMESH::SMESH_Mesh_ptr theMesh, SMESH::SMESH_Mesh_ptr theMesh,
SMESH::SMESH_GroupBase_ptr theGroup, SMESH::SMESH_GroupBase_ptr theGroup,

View File

@ -305,8 +305,8 @@ typedef bool (SMESHDS_Group::*TFunChangeGroup)(const int);
CORBA::Long CORBA::Long
ChangeByPredicate( SMESH::Predicate_i* thePredicate, ChangeByPredicate( SMESH::Predicate_i* thePredicate,
SMESHDS_GroupBase* theGroupBase, SMESHDS_GroupBase* theGroupBase,
TFunChangeGroup theFun) TFunChangeGroup theFun)
{ {
CORBA::Long aNb = 0; CORBA::Long aNb = 0;
if(SMESHDS_Group* aGroupDS = dynamic_cast<SMESHDS_Group*>(theGroupBase)){ if(SMESHDS_Group* aGroupDS = dynamic_cast<SMESHDS_Group*>(theGroupBase)){
@ -317,7 +317,7 @@ ChangeByPredicate( SMESH::Predicate_i* thePredicate,
CORBA::Long i = 0, iEnd = aSequence.size(); CORBA::Long i = 0, iEnd = aSequence.size();
for(; i < iEnd; i++) for(; i < iEnd; i++)
if((aGroupDS->*theFun)(aSequence[i])) if((aGroupDS->*theFun)(aSequence[i]))
aNb++; aNb++;
return aNb; return aNb;
} }
return aNb; return aNb;

View File

@ -77,7 +77,7 @@ SMESH_MEDFamily_i::~SMESH_MEDFamily_i()
*/ */
//============================================================================= //=============================================================================
SMESH_MEDFamily_i::SMESH_MEDFamily_i(int identifier, SMESH_subMesh_i* sm, 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 ), SMESH_MEDSupport_i( sm, name, description, entity ),
_subMesh_i(sm), _subMesh_i(sm),
@ -103,7 +103,7 @@ throw (SALOME::SALOME_Exception)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ THROW_SALOME_CORBA_EXCEPTION("No associated Family",\
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
return _identifier; return _identifier;
} }
@ -117,7 +117,7 @@ throw (SALOME::SALOME_Exception)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ THROW_SALOME_CORBA_EXCEPTION("No associated Family",\
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
return _numberOfAttribute; return _numberOfAttribute;
} }
//============================================================================= //=============================================================================
@ -130,12 +130,12 @@ throw (SALOME::SALOME_Exception)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ THROW_SALOME_CORBA_EXCEPTION("No associated Family",\
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
if (_numberOfAttribute == 0) if (_numberOfAttribute == 0)
{ {
MESSAGE("Les familles SMESH n ont pas d attribut"); MESSAGE("Les familles SMESH n ont pas d attribut");
THROW_SALOME_CORBA_EXCEPTION("No attributes"\ THROW_SALOME_CORBA_EXCEPTION("No attributes"\
,SALOME::BAD_PARAM); ,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;
@ -157,15 +157,15 @@ CORBA::Long SMESH_MEDFamily_i::getAttributeIdentifier(CORBA::Long i)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ THROW_SALOME_CORBA_EXCEPTION("No associated Family",\
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
MESSAGE("Les familles SMESH n ont pas d attribut"); MESSAGE("Les familles SMESH n ont pas d attribut");
THROW_SALOME_CORBA_EXCEPTION("No attributes"\ THROW_SALOME_CORBA_EXCEPTION("No attributes"\
,SALOME::BAD_PARAM); ,SALOME::BAD_PARAM);
if (_numberOfAttribute == 0) if (_numberOfAttribute == 0)
{ {
MESSAGE("Les familles SMESH n ont pas d attribut"); MESSAGE("Les familles SMESH n ont pas d attribut");
THROW_SALOME_CORBA_EXCEPTION("No attributes"\ THROW_SALOME_CORBA_EXCEPTION("No attributes"\
,SALOME::BAD_PARAM); ,SALOME::BAD_PARAM);
}; };
ASSERT (i <= _numberOfAttribute); ASSERT (i <= _numberOfAttribute);
return _attributeIdentifier[i]; return _attributeIdentifier[i];
@ -180,13 +180,13 @@ SALOME_MED::long_array* SMESH_MEDFamily_i::getAttributesValues()
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ THROW_SALOME_CORBA_EXCEPTION("No associated Family",\
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
if (_numberOfAttribute == 0) if (_numberOfAttribute == 0)
{ {
MESSAGE("Les familles SMESH n ont pas d attribut"); MESSAGE("Les familles SMESH n ont pas d attribut");
THROW_SALOME_CORBA_EXCEPTION("No attributes"\ THROW_SALOME_CORBA_EXCEPTION("No attributes"\
,SALOME::BAD_PARAM); ,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;
@ -207,12 +207,12 @@ CORBA::Long SMESH_MEDFamily_i::getAttributeValue(CORBA::Long i)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ THROW_SALOME_CORBA_EXCEPTION("No associated Family",\
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
if (_numberOfAttribute == 0) if (_numberOfAttribute == 0)
{ {
MESSAGE("Les familles SMESH n ont pas d attribut"); MESSAGE("Les familles SMESH n ont pas d attribut");
THROW_SALOME_CORBA_EXCEPTION("No attributes"\ THROW_SALOME_CORBA_EXCEPTION("No attributes"\
,SALOME::BAD_PARAM); ,SALOME::BAD_PARAM);
} }
ASSERT (i <= _numberOfAttribute); ASSERT (i <= _numberOfAttribute);
@ -228,12 +228,12 @@ SALOME_MED::string_array * SMESH_MEDFamily_i::getAttributesDescriptions()
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ THROW_SALOME_CORBA_EXCEPTION("No associated Family",\
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
if (_numberOfAttribute == 0) if (_numberOfAttribute == 0)
{ {
MESSAGE("Les familles SMESH n ont pas d attribut"); MESSAGE("Les familles SMESH n ont pas d attribut");
THROW_SALOME_CORBA_EXCEPTION("No attributes"\ THROW_SALOME_CORBA_EXCEPTION("No attributes"\
,SALOME::BAD_PARAM); ,SALOME::BAD_PARAM);
} }
SALOME_MED::string_array_var myseq = new SALOME_MED::string_array; SALOME_MED::string_array_var myseq = new SALOME_MED::string_array;
for (int i=0;i<_numberOfAttribute;i++) for (int i=0;i<_numberOfAttribute;i++)
@ -252,12 +252,12 @@ char * SMESH_MEDFamily_i::getAttributeDescription( CORBA::Long i)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Family",\ THROW_SALOME_CORBA_EXCEPTION("No associated Family",\
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
if (_numberOfAttribute == 0) if (_numberOfAttribute == 0)
{ {
MESSAGE("Les familles SMESH n ont pas d attribut"); MESSAGE("Les familles SMESH n ont pas d attribut");
THROW_SALOME_CORBA_EXCEPTION("No attributes"\ THROW_SALOME_CORBA_EXCEPTION("No attributes"\
,SALOME::BAD_PARAM); ,SALOME::BAD_PARAM);
} }
ASSERT (i <= _numberOfAttribute); ASSERT (i <= _numberOfAttribute);
return CORBA::string_dup(_attributeDescription[i].c_str()); return CORBA::string_dup(_attributeDescription[i].c_str());

View File

@ -56,7 +56,7 @@ public :
// Constructors and associated internal methods // Constructors and associated internal methods
SMESH_MEDFamily_i(int identifier, SMESH_subMesh_i* sm, 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); SMESH_MEDFamily_i(const SMESH_MEDFamily_i & f);
// IDL Methods // IDL Methods

View File

@ -240,8 +240,8 @@ char *SMESH_MEDMesh_i::getCoordinatesSystem() throw(SALOME::SALOME_Exception)
* CORBA: Accessor for Coordinates * CORBA: Accessor for Coordinates
*/ */
//============================================================================= //=============================================================================
SALOME_MED::double_array * SMESH_MEDMesh_i::getCoordinates( SALOME_MED::double_array * SMESH_MEDMesh_i::getCoordinates
SALOME_MED::medModeSwitch typeSwitch) throw(SALOME::SALOME_Exception) (SALOME_MED::medModeSwitch typeSwitch) throw(SALOME::SALOME_Exception)
{ {
if (_mesh_i == 0) if (_mesh_i == 0)
THROW_SALOME_CORBA_EXCEPTION("No associated Mesh", THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",

View File

@ -45,8 +45,8 @@ using namespace std;
//============================================================================= //=============================================================================
SMESH_MEDSupport_i::SMESH_MEDSupport_i() SMESH_MEDSupport_i::SMESH_MEDSupport_i()
{ {
BEGIN_OF("Default Constructor SMESH_MEDSupport_i"); BEGIN_OF("Default Constructor SMESH_MEDSupport_i");
END_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, SMESH_MEDSupport_i::SMESH_MEDSupport_i(SMESH_subMesh_i * sm, string name,
string description, SALOME_MED::medEntityMesh entity) string description, SALOME_MED::medEntityMesh entity)
:_subMesh_i(sm), _name(name), _description(description), _entity(entity), :_subMesh_i(sm), _name(name), _description(description), _entity(entity),
_seqNumber(false), _seqLength(0) _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(); int subMeshId = _subMesh_i->GetId();
MESSAGE(" subMeshId " << subMeshId) MESSAGE(" subMeshId " << subMeshId)
if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) != if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) !=
_subMesh_i->_mesh_i->_mapSubMesh.end()) _subMesh_i->_mesh_i->_mapSubMesh.end())
{ {
::SMESH_subMesh * subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId]; ::SMESH_subMesh * subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId];
_subMeshDS = subMesh->GetSubMeshDS(); _subMeshDS = subMesh->GetSubMeshDS();
} }
if (_entity == SALOME_MED::MED_NODE) if (_entity == SALOME_MED::MED_NODE)
{ {
_numberOfGeometricType = 1; _numberOfGeometricType = 1;
_geometricType = new SALOME_MED::medGeometryElement[1]; _geometricType = new SALOME_MED::medGeometryElement[1];
_geometricType[0] = SALOME_MED::MED_NONE; _geometricType[0] = SALOME_MED::MED_NONE;
} }
else else
{ {
MESSAGE("Pas implemente dans cette version"); MESSAGE("Pas implemente dans cette version");
THROW_SALOME_CORBA_EXCEPTION THROW_SALOME_CORBA_EXCEPTION
("Seules les familles de noeuds sont implementees ", ("Seules les familles de noeuds sont implementees ",
SALOME::BAD_PARAM); SALOME::BAD_PARAM);
} }
END_OF("Constructor SMESH_MEDSupport_i"); 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), _name(s._name), _description(s._description), _entity(s._entity),
_seqNumber(false), _seqLength(0) _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(); int subMeshId = _subMesh_i->GetId();
if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) != if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) !=
_subMesh_i->_mesh_i->_mapSubMesh.end()) _subMesh_i->_mesh_i->_mapSubMesh.end())
{ {
::SMESH_subMesh * subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId]; ::SMESH_subMesh * subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId];
_subMeshDS = subMesh->GetSubMeshDS(); _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) CORBA::Long SMESH_MEDSupport_i::getCorbaIndex()throw(SALOME::SALOME_Exception)
{ {
if (_subMeshDS == NULL) if (_subMeshDS == NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
MESSAGE("Not implemented for SMESH_i"); MESSAGE("Not implemented for SMESH_i");
THROW_SALOME_CORBA_EXCEPTION("Not Implemented ", SALOME::BAD_PARAM); 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) char *SMESH_MEDSupport_i::getName() throw(SALOME::SALOME_Exception)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
return CORBA::string_dup(_name.c_str()); 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) char *SMESH_MEDSupport_i::getDescription() throw(SALOME::SALOME_Exception)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
return CORBA::string_dup(_description.c_str()); 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_MED::MESH_ptr SMESH_MEDSupport_i::getMesh()throw(SALOME::
SALOME_Exception) SALOME_Exception)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); 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:: CORBA::Boolean SMESH_MEDSupport_i::isOnAllElements()throw(SALOME::
SALOME_Exception) SALOME_Exception)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
if (_seqNumber == false) if (_seqNumber == false)
{ {
if (_entity != SALOME_MED::MED_NONE) if (_entity != SALOME_MED::MED_NONE)
{ {
_seqLength = _subMeshDS->NbNodes(); _seqLength = _subMeshDS->NbNodes();
_seqNumber = true; _seqNumber = true;
} }
else else
{ {
MESSAGE("Only Node Families are implemented "); MESSAGE("Only Node Families are implemented ");
THROW_SALOME_CORBA_EXCEPTION("Not implemented Yet ", THROW_SALOME_CORBA_EXCEPTION("Not implemented Yet ",
SALOME::BAD_PARAM); SALOME::BAD_PARAM);
} }
} }
try try
{ {
_isOnAllElements = (_seqLength == _meshDS->NbNodes()); _isOnAllElements = (_seqLength == _meshDS->NbNodes());
} }
catch(...) catch(...)
{ {
MESSAGE("unable to acces related Mesh"); MESSAGE("unable to acces related Mesh");
THROW_SALOME_CORBA_EXCEPTION("No associated Mesh", THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
}; };
return _isOnAllElements; return _isOnAllElements;
} }
//============================================================================= //=============================================================================
@ -233,12 +233,12 @@ CORBA::Boolean SMESH_MEDSupport_i::isOnAllElements()throw(SALOME::
//============================================================================= //=============================================================================
SALOME_MED::medEntityMesh SMESH_MEDSupport_i::getEntity()throw(SALOME:: SALOME_MED::medEntityMesh SMESH_MEDSupport_i::getEntity()throw(SALOME::
SALOME_Exception) SALOME_Exception)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
return _entity; return _entity;
} }
//============================================================================= //=============================================================================
@ -248,29 +248,29 @@ SALOME_MED::medEntityMesh SMESH_MEDSupport_i::getEntity()throw(SALOME::
//============================================================================= //=============================================================================
SALOME_MED::medGeometryElement_array * SALOME_MED::medGeometryElement_array *
SMESH_MEDSupport_i::getTypes()throw(SALOME::SALOME_Exception) SMESH_MEDSupport_i::getTypes()throw(SALOME::SALOME_Exception)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
SALOME_MED::medGeometryElement_array_var myseq = SALOME_MED::medGeometryElement_array_var myseq =
new SALOME_MED::medGeometryElement_array; new SALOME_MED::medGeometryElement_array;
try try
{ {
int mySeqLength = _numberOfGeometricType; int mySeqLength = _numberOfGeometricType;
myseq->length(mySeqLength); myseq->length(mySeqLength);
for (int i = 0; i < mySeqLength; i++) for (int i = 0; i < mySeqLength; i++)
{ {
myseq[i] = _geometricType[i]; myseq[i] = _geometricType[i];
} }
} }
catch(...) catch(...)
{ {
MESSAGE("Exception lors de la recherche des differents types"); MESSAGE("Exception lors de la recherche des differents types");
THROW_SALOME_CORBA_EXCEPTION("Unable to acces Support Types", THROW_SALOME_CORBA_EXCEPTION("Unable to acces Support Types",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
} }
return myseq._retn(); return myseq._retn();
} }
//============================================================================= //=============================================================================
@ -280,12 +280,12 @@ SALOME_MED::medGeometryElement_array *
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_MEDSupport_i::getNumberOfElements(SALOME_MED:: CORBA::Long SMESH_MEDSupport_i::getNumberOfElements(SALOME_MED::
medGeometryElement geomElement) throw(SALOME::SALOME_Exception) medGeometryElement geomElement) throw(SALOME::SALOME_Exception)
{ {
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
return _numberOfGeometricType; return _numberOfGeometricType;
} }
@ -296,32 +296,32 @@ CORBA::Long SMESH_MEDSupport_i::getNumberOfElements(SALOME_MED::
//============================================================================= //=============================================================================
SALOME_MED::long_array * SMESH_MEDSupport_i::getNumber( 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); Unexpect aCatch(SALOME_SalomeException);
if (_subMeshDS==NULL) if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Support", THROW_SALOME_CORBA_EXCEPTION("No associated Support",
SALOME::INTERNAL_ERROR); SALOME::INTERNAL_ERROR);
// A changer s'il ne s agit plus seulement de famille de noeuds // A changer s'il ne s agit plus seulement de famille de noeuds
if (geomElement != SALOME_MED::MED_NONE) if (geomElement != SALOME_MED::MED_NONE)
THROW_SALOME_CORBA_EXCEPTION("Not implemented", SALOME::BAD_PARAM); 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; int i = 0;
myseq->length(_subMeshDS->NbNodes()); myseq->length(_subMeshDS->NbNodes());
SMDS_NodeIteratorPtr it = _subMeshDS->GetNodes(); SMDS_NodeIteratorPtr it = _subMeshDS->GetNodes();
while(it->more()) while(it->more())
{ {
myseq[i] = it->next()->GetID(); myseq[i] = it->next()->GetID();
i++; i++;
}; };
SCRUTE(myseq->length()); SCRUTE(myseq->length());
MESSAGE("End of SMESH_MEDSupport_i::getNumber"); MESSAGE("End of SMESH_MEDSupport_i::getNumber");
return myseq._retn(); 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::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); return getNumber(geomElement);
} }
@ -345,11 +345,11 @@ SALOME_MED::long_array * SMESH_MEDSupport_i::getNumberFromFile(
//============================================================================= //=============================================================================
SALOME_MED::long_array * 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"); MESSAGE("Not implemented for SMESH_i");
THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM); THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
return NULL; return NULL;
} }
//============================================================================= //=============================================================================
/*! /*!
@ -358,10 +358,10 @@ SALOME_MED::long_array *
//============================================================================= //=============================================================================
CORBA::Long SMESH_MEDSupport_i::getNumberOfGaussPoint(SALOME_MED:: 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"); MESSAGE("Not implemented for SMESH_i");
return 0; return 0;
} }
//============================================================================= //=============================================================================
/*! /*!

View File

@ -42,78 +42,78 @@
class SMESH_subMesh_i; class SMESH_subMesh_i;
class SMESH_I_EXPORT SMESH_MEDSupport_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: public:
// Constructors and associated internal methods // Constructors and associated internal methods
SMESH_MEDSupport_i(SMESH_subMesh_i * sm, SMESH_MEDSupport_i(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_MEDSupport_i(const SMESH_MEDSupport_i & s); SMESH_MEDSupport_i(const SMESH_MEDSupport_i & s);
// IDL Methods // IDL Methods
char *getName() throw(SALOME::SALOME_Exception); char *getName() throw(SALOME::SALOME_Exception);
char *getDescription() throw(SALOME::SALOME_Exception); char *getDescription() throw(SALOME::SALOME_Exception);
SALOME_MED::MESH_ptr getMesh() throw(SALOME::SALOME_Exception); SALOME_MED::MESH_ptr getMesh() throw(SALOME::SALOME_Exception);
CORBA::Boolean isOnAllElements() throw(SALOME::SALOME_Exception); CORBA::Boolean isOnAllElements() throw(SALOME::SALOME_Exception);
SALOME_MED::medEntityMesh getEntity() throw(SALOME::SALOME_Exception); SALOME_MED::medEntityMesh getEntity() throw(SALOME::SALOME_Exception);
CORBA::Long CORBA::Long
getNumberOfElements(SALOME_MED::medGeometryElement geomElement) getNumberOfElements(SALOME_MED::medGeometryElement geomElement)
throw(SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
CORBA::Long getNumberOfTypes() throw (SALOME::SALOME_Exception); CORBA::Long getNumberOfTypes() throw (SALOME::SALOME_Exception);
SALOME_MED::long_array * SALOME_MED::long_array *
getNumber(SALOME_MED::medGeometryElement geomElement) getNumber(SALOME_MED::medGeometryElement geomElement)
throw(SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
/*! /*!
* Same function as getNumber. * Same function as getNumber.
*/ */
SALOME_MED::long_array * SALOME_MED::long_array *
getNumberFromFile(SALOME_MED::medGeometryElement geomElement) getNumberFromFile(SALOME_MED::medGeometryElement geomElement)
throw(SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
SALOME_MED::long_array * getNumberIndex() SALOME_MED::long_array * getNumberIndex()
throw(SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
CORBA::Long CORBA::Long
getNumberOfGaussPoint(SALOME_MED::medGeometryElement geomElement) getNumberOfGaussPoint(SALOME_MED::medGeometryElement geomElement)
throw(SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
SALOME_MED::long_array* getNumbersOfGaussPoint() SALOME_MED::long_array* getNumbersOfGaussPoint()
throw (SALOME::SALOME_Exception); throw (SALOME::SALOME_Exception);
SALOME_MED::medGeometryElement_array *getTypes() SALOME_MED::medGeometryElement_array *getTypes()
throw(SALOME::SALOME_Exception); throw(SALOME::SALOME_Exception);
void getBoundaryElements() 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() 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 public: //public field
const SMESHDS_SubMesh * _subMeshDS; const SMESHDS_SubMesh * _subMeshDS;
::SMESH_subMesh_i * _subMesh_i; ::SMESH_subMesh_i * _subMesh_i;
SMESHDS_Mesh * _meshDS; SMESHDS_Mesh * _meshDS;
std::string _name; std::string _name;
std::string _description; std::string _description;
bool _isOnAllElements; bool _isOnAllElements;
bool _seqNumber; bool _seqNumber;
int _seqLength; int _seqLength;
SALOME_MED::medEntityMesh _entity; SALOME_MED::medEntityMesh _entity;
SALOME_MED::medGeometryElement * _geometricType; SALOME_MED::medGeometryElement * _geometricType;
int _numberOfGeometricType; int _numberOfGeometricType;
protected: protected:
SMESH_MEDSupport_i(); SMESH_MEDSupport_i();
~SMESH_MEDSupport_i(); ~SMESH_MEDSupport_i();
}; };
#endif /* _MED_MEDSUPPORT_I_HXX_ */ #endif /* _MED_MEDSUPPORT_I_HXX_ */

View File

@ -2568,7 +2568,7 @@ ExtrusionAlongPathObjX(SMESH::SMESH_IDSource_ptr Object,
<< ( HasRefPoint ? RefPoint.x : 0 ) << ", " << ( HasRefPoint ? RefPoint.x : 0 ) << ", "
<< ( HasRefPoint ? RefPoint.y : 0 ) << ", " << ( HasRefPoint ? RefPoint.y : 0 ) << ", "
<< ( HasRefPoint ? RefPoint.z : 0 ) << " ), " << ( HasRefPoint ? RefPoint.z : 0 ) << " ), "
<< MakeGroups << ", " << MakeGroups << ", "
<< ElemType << " )"; << ElemType << " )";
} }
return aGroups; return aGroups;

View File

@ -239,19 +239,19 @@ void SMESH_NoteBook::ReplaceVariables()
TMeshEditorMap::const_iterator meIt = myMeshEditors.find(aObject); TMeshEditorMap::const_iterator meIt = myMeshEditors.find(aObject);
if(meIt != myMeshEditors.end()) { if(meIt != myMeshEditors.end()) {
TCollection_AsciiString aMesh = (*meIt).second; TCollection_AsciiString aMesh = (*meIt).second;
it = _objectMap.find(aMesh); it = _objectMap.find(aMesh);
} }
} }
if(it == _objectMap.end()) { // additional check for pattern mapping if(it == _objectMap.end()) { // additional check for pattern mapping
if(aMethod.IsEqual("ApplyToMeshFaces") || if(aMethod.IsEqual("ApplyToMeshFaces") ||
aMethod.IsEqual("ApplyToHexahedrons")) aMethod.IsEqual("ApplyToHexahedrons"))
it = _objectMap.find(aCmd->GetArg(1)); it = _objectMap.find(aCmd->GetArg(1));
} }
if(it != _objectMap.end()) { if(it != _objectMap.end()) {
if(MYDEBUG) if(MYDEBUG)
cout << "Found object : " << (*it).first << endl; cout << "Found object : " << (*it).first << endl;
ObjectStates *aStates = (*it).second; ObjectStates *aStates = (*it).second;
// Case for LocalLength hypothesis // Case for LocalLength hypothesis
if(aStates->GetObjectType().IsEqual("LocalLength") && aStates->GetCurrectState().size() >= 2) { if(aStates->GetObjectType().IsEqual("LocalLength") && aStates->GetCurrectState().size() >= 2) {
@ -402,9 +402,9 @@ void SMESH_NoteBook::ReplaceVariables()
} }
else if(aStates->GetObjectType().IsEqual("Mesh")) { else if(aStates->GetObjectType().IsEqual("Mesh")) {
TState aCurrentState = aStates->GetCurrectState(); TState aCurrentState = aStates->GetCurrectState();
int aCurrentStateSize = aCurrentState.size(); int aCurrentStateSize = aCurrentState.size();
if(aMethod.IsEqual("Translate") || if(aMethod.IsEqual("Translate") ||
aMethod.IsEqual("TranslateMakeGroups") || aMethod.IsEqual("TranslateMakeGroups") ||
aMethod.IsEqual("TranslateMakeMesh") || aMethod.IsEqual("TranslateMakeMesh") ||
aMethod.IsEqual("TranslateObject") || aMethod.IsEqual("TranslateObject") ||
@ -419,211 +419,211 @@ void SMESH_NoteBook::ReplaceVariables()
} }
} }
if(anArgIndex > 0) { if(anArgIndex > 0) {
if(aCurrentStateSize == 3) { // translation by dx, dy, dz if(aCurrentStateSize == 3) { // translation by dx, dy, dz
for(int j = 0; j < aCurrentStateSize; j++) { for(int j = 0; j < aCurrentStateSize; j++) {
if(!aCurrentState.at(j).IsEmpty()) { if(!aCurrentState.at(j).IsEmpty()) {
isVariableFound = true; isVariableFound = true;
aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); aCmd->SetArg(anArgIndex+j, aCurrentState.at(j));
} }
} }
} }
else if(aCurrentStateSize == 6) { // translation by x1, x2, y1, y2, z1, z2 else if(aCurrentStateSize == 6) { // translation by x1, x2, y1, y2, z1, z2
// TODO: limitation until operations on the variables will be introduced // TODO: limitation until operations on the variables will be introduced
/* /*
isVariableFound = true; isVariableFound = true;
for(int j = 0; j < 3; j++) { for(int j = 0; j < 3; j++) {
TCollection_AsciiString anArg = aCmd->GetArg(anArgIndex+j); TCollection_AsciiString anArg = aCmd->GetArg(anArgIndex+j);
TCollection_AsciiString aValue1 = aCurrentState.at(2*j), aValue2 = aCurrentState.at(2*j+1); TCollection_AsciiString aValue1 = aCurrentState.at(2*j), aValue2 = aCurrentState.at(2*j+1);
bool aV1 = !aValue1.IsEmpty(); bool aV1 = !aValue1.IsEmpty();
bool aV2 = !aValue2.IsEmpty(); bool aV2 = !aValue2.IsEmpty();
double aValue, aCurrentValue = anArg.IsRealValue() ? anArg.RealValue() : 0; double aValue, aCurrentValue = anArg.IsRealValue() ? anArg.RealValue() : 0;
if(aV1 && !aV2) { if(aV1 && !aV2) {
if(!GetReal(aValue1, aValue)) if(!GetReal(aValue1, aValue))
aValue = 0; aValue = 0;
aValue2 = TCollection_AsciiString( aValue + aCurrentValue ); aValue2 = TCollection_AsciiString( aValue + aCurrentValue );
} }
else if(!aV1 && aV2) { else if(!aV1 && aV2) {
if(!GetReal(aValue2, aValue)) if(!GetReal(aValue2, aValue))
aValue = 0; aValue = 0;
aValue1 = TCollection_AsciiString( aValue - aCurrentValue ); aValue1 = TCollection_AsciiString( aValue - aCurrentValue );
} }
else if(!aV1 && !aV2) { else if(!aV1 && !aV2) {
aValue1 = TCollection_AsciiString( 0 ); aValue1 = TCollection_AsciiString( 0 );
aValue2 = TCollection_AsciiString( aCurrentValue ); aValue2 = TCollection_AsciiString( aCurrentValue );
} }
aCmd->SetArg(anArgIndex+j, aValue1 + ", " + aValue2 ); aCmd->SetArg(anArgIndex+j, aValue1 + ", " + aValue2 );
} }
*/ */
} }
} }
if(isVariableFound) { if(isVariableFound) {
TCollection_AsciiString aDim; TCollection_AsciiString aDim;
if(aCurrentStateSize == 6) if(aCurrentStateSize == 6)
aDim = "6"; aDim = "6";
aCmd->SetArg(anArgIndex - 1, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".PointStructStr"+aDim); aCmd->SetArg(anArgIndex - 1, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".PointStructStr"+aDim);
aCmd->SetArg(anArgIndex - 2, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".DirStructStr"); aCmd->SetArg(anArgIndex - 2, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".DirStructStr");
} }
aStates->IncrementState(); aStates->IncrementState();
} }
else if(aMethod.IsEqual("Rotate") || else if(aMethod.IsEqual("Rotate") ||
aMethod.IsEqual("RotateMakeGroups") || aMethod.IsEqual("RotateMakeGroups") ||
aMethod.IsEqual("RotateMakeMesh") || aMethod.IsEqual("RotateMakeMesh") ||
aMethod.IsEqual("RotateObject") || aMethod.IsEqual("RotateObject") ||
aMethod.IsEqual("RotateObjectMakeGroups") || aMethod.IsEqual("RotateObjectMakeGroups") ||
aMethod.IsEqual("RotateObjectMakeMesh") || aMethod.IsEqual("RotateObjectMakeMesh") ||
aMethod.IsEqual("RotationSweep") || aMethod.IsEqual("RotationSweep") ||
aMethod.IsEqual("RotationSweepObject") || aMethod.IsEqual("RotationSweepObject") ||
aMethod.IsEqual("RotationSweepObject1D") || aMethod.IsEqual("RotationSweepObject1D") ||
aMethod.IsEqual("RotationSweepObject2D") || aMethod.IsEqual("RotationSweepObject2D") ||
aMethod.IsEqual("RotationSweepMakeGroups") || aMethod.IsEqual("RotationSweepMakeGroups") ||
aMethod.IsEqual("RotationSweepObjectMakeGroups") || aMethod.IsEqual("RotationSweepObjectMakeGroups") ||
aMethod.IsEqual("RotationSweepObject1DMakeGroups") || aMethod.IsEqual("RotationSweepObject1DMakeGroups") ||
aMethod.IsEqual("RotationSweepObject2DMakeGroups") || aMethod.IsEqual("RotationSweepObject2DMakeGroups") ||
aMethod.IsEqual("Mirror") || aMethod.IsEqual("Mirror") ||
aMethod.IsEqual("MirrorMakeMesh") || aMethod.IsEqual("MirrorMakeMesh") ||
aMethod.IsEqual("MirrorMakeGroups") || aMethod.IsEqual("MirrorMakeGroups") ||
aMethod.IsEqual("MirrorObject") || aMethod.IsEqual("MirrorObject") ||
aMethod.IsEqual("MirrorObjectMakeMesh") || aMethod.IsEqual("MirrorObjectMakeMesh") ||
aMethod.IsEqual("MirrorObjectMakeGroups")) { aMethod.IsEqual("MirrorObjectMakeGroups")) {
bool isSubstitute = false; bool isSubstitute = false;
int anArgIndex = 0; int anArgIndex = 0;
for(int i = 1, n = aCmd->GetNbArgs(); i <= n; i++) { for(int i = 1, n = aCmd->GetNbArgs(); i <= n; i++) {
if(aCmd->GetArg(i).IsEqual("SMESH.AxisStruct")) { if(aCmd->GetArg(i).IsEqual("SMESH.AxisStruct")) {
anArgIndex = i+1; anArgIndex = i+1;
break; break;
} }
} }
if(anArgIndex > 0) { if(anArgIndex > 0) {
for(int j = 0; j < aCurrentStateSize; j++) { for(int j = 0; j < aCurrentStateSize; j++) {
if(!aCurrentState.at(j).IsEmpty()) { if(!aCurrentState.at(j).IsEmpty()) {
if(j < 6) // 0-5 - axis struct, 6 - angle (rotation & sweep), 7-8 - nbSteps and tolerance (sweep) if(j < 6) // 0-5 - axis struct, 6 - angle (rotation & sweep), 7-8 - nbSteps and tolerance (sweep)
isSubstitute = true; isSubstitute = true;
aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); aCmd->SetArg(anArgIndex+j, aCurrentState.at(j));
} }
} }
} }
if(isSubstitute) if(isSubstitute)
aCmd->SetArg(anArgIndex - 1, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".AxisStructStr"); aCmd->SetArg(anArgIndex - 1, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".AxisStructStr");
aStates->IncrementState(); aStates->IncrementState();
} }
else if(aMethod.IsEqual("AddNode") || else if(aMethod.IsEqual("AddNode") ||
aMethod.IsEqual("MoveClosestNodeToPoint")) { aMethod.IsEqual("MoveClosestNodeToPoint")) {
for(int j = 0; j < aCurrentStateSize; j++) { for(int j = 0; j < aCurrentStateSize; j++) {
if(!aCurrentState.at(j).IsEmpty()) if(!aCurrentState.at(j).IsEmpty())
aCmd->SetArg(j+1, aCurrentState.at(j)); aCmd->SetArg(j+1, aCurrentState.at(j));
} }
aStates->IncrementState(); aStates->IncrementState();
} }
else if(aMethod.IsEqual("MoveNode")) { else if(aMethod.IsEqual("MoveNode")) {
for(int j = 0; j < aCurrentStateSize; j++) { for(int j = 0; j < aCurrentStateSize; j++) {
if(!aCurrentState.at(j).IsEmpty()) if(!aCurrentState.at(j).IsEmpty())
aCmd->SetArg(j+2, aCurrentState.at(j)); aCmd->SetArg(j+2, aCurrentState.at(j));
} }
aStates->IncrementState(); aStates->IncrementState();
} }
else if(aMethod.IsEqual("ExtrusionSweep") || else if(aMethod.IsEqual("ExtrusionSweep") ||
aMethod.IsEqual("ExtrusionSweepObject") || aMethod.IsEqual("ExtrusionSweepObject") ||
aMethod.IsEqual("ExtrusionSweepObject1D") || aMethod.IsEqual("ExtrusionSweepObject1D") ||
aMethod.IsEqual("ExtrusionSweepObject2D") || aMethod.IsEqual("ExtrusionSweepObject2D") ||
aMethod.IsEqual("ExtrusionSweepMakeGroups") || aMethod.IsEqual("ExtrusionSweepMakeGroups") ||
aMethod.IsEqual("ExtrusionSweepObjectMakeGroups") || aMethod.IsEqual("ExtrusionSweepObjectMakeGroups") ||
aMethod.IsEqual("ExtrusionSweepObject1DMakeGroups") || aMethod.IsEqual("ExtrusionSweepObject1DMakeGroups") ||
aMethod.IsEqual("ExtrusionSweepObject2DMakeGroups")) { aMethod.IsEqual("ExtrusionSweepObject2DMakeGroups")) {
bool isSubstitute = false; bool isSubstitute = false;
int anArgIndex = 0; int anArgIndex = 0;
for(int i = 1, n = aCmd->GetNbArgs(); i <= n; i++) { for(int i = 1, n = aCmd->GetNbArgs(); i <= n; i++) {
if(aCmd->GetArg(i).IsEqual("SMESH.PointStruct")) { if(aCmd->GetArg(i).IsEqual("SMESH.PointStruct")) {
anArgIndex = i+1; anArgIndex = i+1;
break; break;
} }
} }
if(anArgIndex > 0) { if(anArgIndex > 0) {
for(int j = 0; j < aCurrentStateSize; j++) { for(int j = 0; j < aCurrentStateSize; j++) {
if(!aCurrentState.at(j).IsEmpty()) { if(!aCurrentState.at(j).IsEmpty()) {
if(j < 3) // 0-2 - dir struct, 3 - number of steps if(j < 3) // 0-2 - dir struct, 3 - number of steps
isSubstitute = true; isSubstitute = true;
aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); aCmd->SetArg(anArgIndex+j, aCurrentState.at(j));
} }
} }
} }
if(isSubstitute) { if(isSubstitute) {
aCmd->SetArg(anArgIndex - 1, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".PointStructStr"); aCmd->SetArg(anArgIndex - 1, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".PointStructStr");
aCmd->SetArg(anArgIndex - 2, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".DirStructStr"); aCmd->SetArg(anArgIndex - 2, TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".DirStructStr");
} }
aStates->IncrementState(); aStates->IncrementState();
} }
else if(aMethod.IsEqual("ExtrusionAlongPath") || else if(aMethod.IsEqual("ExtrusionAlongPath") ||
aMethod.IsEqual("ExtrusionAlongPathObject") || aMethod.IsEqual("ExtrusionAlongPathObject") ||
aMethod.IsEqual("ExtrusionAlongPathObject1D") || aMethod.IsEqual("ExtrusionAlongPathObject1D") ||
aMethod.IsEqual("ExtrusionAlongPathObject2D") || aMethod.IsEqual("ExtrusionAlongPathObject2D") ||
aMethod.IsEqual("ExtrusionAlongPathMakeGroups") || aMethod.IsEqual("ExtrusionAlongPathMakeGroups") ||
aMethod.IsEqual("ExtrusionAlongPathObjectMakeGroups") || aMethod.IsEqual("ExtrusionAlongPathObjectMakeGroups") ||
aMethod.IsEqual("ExtrusionAlongPathObject1DMakeGroups") || aMethod.IsEqual("ExtrusionAlongPathObject1DMakeGroups") ||
aMethod.IsEqual("ExtrusionAlongPathObject2DMakeGroups") || aMethod.IsEqual("ExtrusionAlongPathObject2DMakeGroups") ||
/* workaround for a bug in the command parsing algorithm */ /* workaround for a bug in the command parsing algorithm */
aCmd->GetString().Search("ExtrusionAlongPathMakeGroups") != -1 || aCmd->GetString().Search("ExtrusionAlongPathMakeGroups") != -1 ||
aCmd->GetString().Search("ExtrusionAlongPathObjectMakeGroups") != -1 || aCmd->GetString().Search("ExtrusionAlongPathObjectMakeGroups") != -1 ||
aCmd->GetString().Search("ExtrusionAlongPathObject1DMakeGroups") != -1 || aCmd->GetString().Search("ExtrusionAlongPathObject1DMakeGroups") != -1 ||
aCmd->GetString().Search("ExtrusionAlongPathObject2DMakeGroups") != -1 ) { aCmd->GetString().Search("ExtrusionAlongPathObject2DMakeGroups") != -1 ) {
int aNbAngles = aCurrentStateSize-3; // State looks like "Angle1:...:AngleN:X:Y:Z" int aNbAngles = aCurrentStateSize-3; // State looks like "Angle1:...:AngleN:X:Y:Z"
bool isSubstitute = false; bool isSubstitute = false;
int anArgIndex = 0; int anArgIndex = 0;
for(int i = 1, n = aCmd->GetNbArgs(); i <= n; i++) { for(int i = 1, n = aCmd->GetNbArgs(); i <= n; i++) {
if(aCmd->GetArg(i).IsEqual("SMESH.PointStruct")) { if(aCmd->GetArg(i).IsEqual("SMESH.PointStruct")) {
anArgIndex = i-1-aNbAngles; anArgIndex = i-1-aNbAngles;
break; break;
} }
} }
if(anArgIndex > 0) { if(anArgIndex > 0) {
int j = 0; int j = 0;
for(; j < aNbAngles; j++) { for(; j < aNbAngles; j++) {
if(!aCurrentState.at(j).IsEmpty()) { if(!aCurrentState.at(j).IsEmpty()) {
aCmd->SetArg(anArgIndex+j-1, aCurrentState.at(j)); aCmd->SetArg(anArgIndex+j-1, aCurrentState.at(j));
} }
} }
for(; j < aNbAngles+3; j++) { for(; j < aNbAngles+3; j++) {
if(!aCurrentState.at(j).IsEmpty()) { if(!aCurrentState.at(j).IsEmpty()) {
isSubstitute = true; isSubstitute = true;
aCmd->SetArg(anArgIndex+j+2, aCurrentState.at(j)); aCmd->SetArg(anArgIndex+j+2, aCurrentState.at(j));
} }
} }
} }
if(isSubstitute) if(isSubstitute)
aCmd->SetArg(anArgIndex + aNbAngles + 1, aCmd->SetArg(anArgIndex + aNbAngles + 1,
TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".PointStructStr"); TCollection_AsciiString(SMESH_2smeshpy::SmeshpyName())+".PointStructStr");
aStates->IncrementState(); aStates->IncrementState();
} }
else if(aMethod.IsEqual("TriToQuad") || else if(aMethod.IsEqual("TriToQuad") ||
aMethod.IsEqual("Concatenate") || aMethod.IsEqual("Concatenate") ||
aMethod.IsEqual("ConcatenateWithGroups")) { aMethod.IsEqual("ConcatenateWithGroups")) {
if(aCurrentStateSize && !aCurrentState.at(0).IsEmpty()) if(aCurrentStateSize && !aCurrentState.at(0).IsEmpty())
aCmd->SetArg(aCmd->GetNbArgs(), aCurrentState.at(0)); aCmd->SetArg(aCmd->GetNbArgs(), aCurrentState.at(0));
aStates->IncrementState(); aStates->IncrementState();
} }
else if(aMethod.IsEqual("Smooth") || else if(aMethod.IsEqual("Smooth") ||
aMethod.IsEqual("SmoothObject") || aMethod.IsEqual("SmoothObject") ||
aMethod.IsEqual("SmoothParametric") || aMethod.IsEqual("SmoothParametric") ||
aMethod.IsEqual("SmoothParametricObject")) { aMethod.IsEqual("SmoothParametricObject")) {
int anArgIndex = aCmd->GetNbArgs() - 2; int anArgIndex = aCmd->GetNbArgs() - 2;
for(int j = 0; j < aCurrentStateSize; j++) { for(int j = 0; j < aCurrentStateSize; j++) {
if(!aCurrentState.at(j).IsEmpty()) if(!aCurrentState.at(j).IsEmpty())
aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); aCmd->SetArg(anArgIndex+j, aCurrentState.at(j));
} }
aStates->IncrementState(); aStates->IncrementState();
} }
else if(aMethod.IsEqual("ApplyToMeshFaces") || else if(aMethod.IsEqual("ApplyToMeshFaces") ||
aMethod.IsEqual("ApplyToHexahedrons")) { aMethod.IsEqual("ApplyToHexahedrons")) {
int anArgIndex = aCmd->GetNbArgs()-1; int anArgIndex = aCmd->GetNbArgs()-1;
for(int j = 0; j < aCurrentStateSize; j++) for(int j = 0; j < aCurrentStateSize; j++)
if(!aCurrentState.at(j).IsEmpty()) if(!aCurrentState.at(j).IsEmpty())
aCmd->SetArg(anArgIndex+j, aCurrentState.at(j)); aCmd->SetArg(anArgIndex+j, aCurrentState.at(j));
aStates->IncrementState(); aStates->IncrementState();
} }
} }
} }
else { else {
if(MYDEBUG) if(MYDEBUG)
cout << "Object not found" << endl; cout << "Object not found" << endl;
} }
if(MYDEBUG) { if(MYDEBUG) {
cout<<"Command after: "<< aCmd->GetString()<<endl; cout<<"Command after: "<< aCmd->GetString()<<endl;
@ -716,7 +716,7 @@ void SMESH_NoteBook::AddCommand(const TCollection_AsciiString& theString)
if ( aCommand->GetMethod() == "GetMeshEditor" ) { // MeshEditor creation if ( aCommand->GetMethod() == "GetMeshEditor" ) { // MeshEditor creation
myMeshEditors.insert( make_pair( aCommand->GetResultValue(), myMeshEditors.insert( make_pair( aCommand->GetResultValue(),
aCommand->GetObject() ) ); aCommand->GetObject() ) );
} }
} }

View File

@ -56,7 +56,7 @@ public:
static TCollection_AsciiString static TCollection_AsciiString
ConvertScript(const TCollection_AsciiString& theScript, ConvertScript(const TCollection_AsciiString& theScript,
Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod, Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
Resource_DataMapOfAsciiStringAsciiString& theObjectNames); Resource_DataMapOfAsciiStringAsciiString& theObjectNames);
/*! /*!
* \brief Return the name of the python file wrapping IDL API * \brief Return the name of the python file wrapping IDL API

View File

@ -59,9 +59,9 @@ SMESH_subMesh_i::SMESH_subMesh_i()
//============================================================================= //=============================================================================
SMESH_subMesh_i::SMESH_subMesh_i( PortableServer::POA_ptr thePOA, SMESH_subMesh_i::SMESH_subMesh_i( PortableServer::POA_ptr thePOA,
SMESH_Gen_i* gen_i, SMESH_Gen_i* gen_i,
SMESH_Mesh_i* mesh_i, SMESH_Mesh_i* mesh_i,
int localId ) int localId )
: SALOME::GenericObj_i( thePOA ) : SALOME::GenericObj_i( thePOA )
{ {
MESSAGE("SMESH_subMesh_i::SMESH_subMesh_i"); 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(); TopoDS_Shape S = _mesh_i->_mapSubMesh[ _localId ]->GetSubShape();
if ( !S.IsNull() ) { if ( !S.IsNull() ) {
aShapeObj = _gen_i->ShapeToGeomObject( S ); aShapeObj = _gen_i->ShapeToGeomObject( S );
//mzn: N7PAL16232, N7PAL16233 //mzn: N7PAL16232, N7PAL16233
//In some cases it's possible that GEOM_Client contains the shape same to S, but //In some cases it's possible that GEOM_Client contains the shape same to S, but
//with another orientation. //with another orientation.
if (aShapeObj->_is_nil()) if (aShapeObj->_is_nil())
aShapeObj = _gen_i->ShapeToGeomObject( S.Reversed() ); aShapeObj = _gen_i->ShapeToGeomObject( S.Reversed() );
} }
} }
} }

View File

@ -48,8 +48,8 @@ public:
SMESH_subMesh_i(); SMESH_subMesh_i();
SMESH_subMesh_i( PortableServer::POA_ptr thePOA, SMESH_subMesh_i( PortableServer::POA_ptr thePOA,
SMESH_Gen_i* gen_i, SMESH_Gen_i* gen_i,
SMESH_Mesh_i* mesh_i, SMESH_Mesh_i* mesh_i,
int localId ); int localId );
~SMESH_subMesh_i(); ~SMESH_subMesh_i();
CORBA::Long GetNumberOfElements() CORBA::Long GetNumberOfElements()