From 36f8af7f1d188045ba7389463b5eb94838604203 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 31 Mar 2005 06:12:52 +0000 Subject: [PATCH] DumpPython Filter / Controls --- src/SMESH_I/SMESH_DumpPython.cxx | 52 +++++++++++++++++++++++++++++++- src/SMESH_I/SMESH_Filter_i.cxx | 15 ++++----- src/SMESH_I/SMESH_PythonDump.hxx | 30 ++++-------------- 3 files changed, 65 insertions(+), 32 deletions(-) diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index db8721515..44483535f 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -11,6 +11,12 @@ #include #include +#ifdef _DEBUG_ +static int MYDEBUG = 0; +#else +static int MYDEBUG = 0; +#endif + namespace SMESH { @@ -31,10 +37,53 @@ namespace SMESH std::string aString = myStream.str(); TCollection_AsciiString aCollection(Standard_CString(aString.c_str())); aSMESHGen->AddToPythonScript(aStudy->StudyId(),aCollection); + if(MYDEBUG) MESSAGE(aString); } } } + TPythonDump& + TPythonDump:: + operator<<(long int theArg){ + myStream<_this(); - TPythonDump()<Destroy(); - SMESH::FilterManager_i* aFilter = new SMESH::FilterManager_i(); - FilterManager_ptr aFilterMgr = aFilter->_this(); - + SMESH::FilterManager_i* aFilter = new SMESH::FilterManager_i(); + FilterManager_ptr aFilterMgr = aFilter->_this(); + // CREATE two lists ( PREDICATES and LOG OP ) // Criterion + TPythonDump()<<"aCriteria = []"; std::list aPredicates; std::list aBinaries; for ( int i = 0, n = theCriteria.length(); i < n; i++ ) @@ -1866,10 +1866,10 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria ElementType aTypeOfElem = theCriteria[ i ].TypeOfElement; long aPrecision = theCriteria[ i ].Precision; - TPythonDump()<