TCollection_AsciiString
SMESH_2smeshpy::ConvertScript(const TCollection_AsciiString& theScript,
Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
- Resource_DataMapOfAsciiStringAsciiString& theObjectNames)
+ Resource_DataMapOfAsciiStringAsciiString& theObjectNames)
{
theGen = new _pyGen( theEntry2AccessorMethod, theObjectNames );
//================================================================================
_pyGen::_pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
- Resource_DataMapOfAsciiStringAsciiString& theObjectNames)
+ Resource_DataMapOfAsciiStringAsciiString& theObjectNames)
: _pyObject( new _pyCommand( TPythonDump::SMESHGenName(), 0 )),
myID2AccessorMethod( theEntry2AccessorMethod ),
myObjectNames( theObjectNames )
if ( !hyp->IsNull() &&
(*hyp)->IsAlgo() &&
theHypothesis->CanBeCreatedBy( (*hyp)->GetAlgoType() ) &&
- (*hyp)->GetGeom() == theGeom &&
+ (*hyp)->GetGeom() == theGeom &&
(*hyp)->GetMesh() == theMesh )
return *hyp;
return 0;
//================================================================================
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 );
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;
}
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() );
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 );
}
}
}
}
else if ( hypType == "TrianglePreference" ) {
hyp->SetConvMethodAndType( "TrianglePreference", "Quadrangle_2D");
- }
+ }
// BLSURF ----------
else if ( hypType == "BLSURF" ) {
algo->SetConvMethodAndType( "Triangle", hypType.ToCString());
//================================================================================
void _pyHypothesis::Assign( const Handle(_pyHypothesis)& theOther,
- const _pyID& theMesh )
+ const _pyID& theMesh )
{
myIsWrapped = false;
myMesh = theMesh;
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,
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 );
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)
};
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);
}
}
}
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) {
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();
{
SMESH::LyingOnGeom_ptr tmpPred = aFilterMgr->CreateLyingOnGeom();
tmpPred->SetElementType( aTypeOfElem );
- tmpPred->SetShape( aThresholdID, aThresholdStr );
+ tmpPred->SetShape( aThresholdID, aThresholdStr );
tmpPred->SetTolerance( aTolerance );
aPredicate = tmpPred;
}
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();
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 );
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 );
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();
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();
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();
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();
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();
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();
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();
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();
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();
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();
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();
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 );
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();
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();
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)& );
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();
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();
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();
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();
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();
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();
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();
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();
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();
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();
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();
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();
Description : Comparator "<"
*/
class SMESH_I_EXPORT LessThan_i: public virtual POA_SMESH::LessThan,
- public virtual Comparator_i
+ public virtual Comparator_i
{
public:
LessThan_i();
Description : Comparator ">"
*/
class SMESH_I_EXPORT MoreThan_i: public virtual POA_SMESH::MoreThan,
- public virtual Comparator_i
+ public virtual Comparator_i
{
public:
MoreThan_i();
Description : Comparator "="
*/
class SMESH_I_EXPORT EqualTo_i: public virtual POA_SMESH::EqualTo,
- public virtual Comparator_i
+ public virtual Comparator_i
{
public:
EqualTo_i();
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();
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();
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();
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();
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();
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*
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 );
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 );
*/
class SMESH_I_EXPORT FilterManager_i: public virtual POA_SMESH::FilterManager,
- public virtual SALOME::GenericObj_i
+ public virtual SALOME::GenericObj_i
{
public:
FilterManager_i();
// *****************************************
// 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 );
* 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
// 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 );
// ****************************************************
// 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();
// 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
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();
}
// ============
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);
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,
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<SMESHDS_Group*>(theGroupBase)){
CORBA::Long i = 0, iEnd = aSequence.size();
for(; i < iEnd; i++)
if((aGroupDS->*theFun)(aSequence[i]))
- aNb++;
+ aNb++;
return aNb;
}
return aNb;
*/
//=============================================================================
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),
{
if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Family",\
- SALOME::INTERNAL_ERROR);
+ SALOME::INTERNAL_ERROR);
return _identifier;
}
{
if (_subMeshDS==NULL)
THROW_SALOME_CORBA_EXCEPTION("No associated Family",\
- SALOME::INTERNAL_ERROR);
+ SALOME::INTERNAL_ERROR);
return _numberOfAttribute;
}
//=============================================================================
{
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;
{
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];
{
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;
{
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);
{
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++)
{
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());
// 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
* 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",
//=============================================================================
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");
}
//=============================================================================
*/
//=============================================================================
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");
}
//=============================================================================
_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");
}
//=============================================================================
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);
}
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());
}
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());
}
//=============================================================================
//=============================================================================
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();
}
//=============================================================================
//=============================================================================
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;
}
//=============================================================================
//=============================================================================
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;
}
//=============================================================================
//=============================================================================
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();
}
//=============================================================================
*/
//=============================================================================
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;
}
//=============================================================================
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();
}
//=============================================================================
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);
}
//=============================================================================
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;
}
//=============================================================================
/*!
//=============================================================================
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;
}
//=============================================================================
/*!
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_ */
<< ( HasRefPoint ? RefPoint.x : 0 ) << ", "
<< ( HasRefPoint ? RefPoint.y : 0 ) << ", "
<< ( HasRefPoint ? RefPoint.z : 0 ) << " ), "
- << MakeGroups << ", "
+ << MakeGroups << ", "
<< ElemType << " )";
}
return aGroups;
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) {
}
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") ||
}
}
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()<<endl;
if ( aCommand->GetMethod() == "GetMeshEditor" ) { // MeshEditor creation
myMeshEditors.insert( make_pair( aCommand->GetResultValue(),
- aCommand->GetObject() ) );
+ aCommand->GetObject() ) );
}
}
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
//=============================================================================
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");
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() );
}
}
}
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()