Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2f529dc
)
SALOME 9.1.0 Windows version
author
rnv
<rnv@opencascade.com>
Wed, 29 Aug 2018 11:47:50 +0000
(14:47 +0300)
committer
rnv
<rnv@opencascade.com>
Wed, 29 Aug 2018 11:47:50 +0000
(14:47 +0300)
16 files changed:
src/MEDWrapper/MED_Factory.cxx
patch
|
blob
|
history
src/SMDS/SMDS_Position.hxx
patch
|
blob
|
history
src/SMESH/CMakeLists.txt
patch
|
blob
|
history
src/SMESH/SMESH_Gen.cxx
patch
|
blob
|
history
src/SMESH/SMESH_subMesh.hxx
patch
|
blob
|
history
src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx
patch
|
blob
|
history
src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx
patch
|
blob
|
history
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
patch
|
blob
|
history
src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx
patch
|
blob
|
history
src/SMESHGUI/SMESHGUI_MeshEditPreview.h
patch
|
blob
|
history
src/SMESHUtils/SMESH_File.cxx
patch
|
blob
|
history
src/SMESH_I/SMESH_2smeshpy.cxx
patch
|
blob
|
history
src/SMESH_I/SMESH_Gen_i.cxx
patch
|
blob
|
history
src/SMESH_SWIG_WITHIHM/CMakeLists.txt
patch
|
blob
|
history
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
patch
|
blob
|
history
src/Tools/MeshCut/MeshCut_Utils.cxx
patch
|
blob
|
history
diff --git
a/src/MEDWrapper/MED_Factory.cxx
b/src/MEDWrapper/MED_Factory.cxx
index 51fe44ce3f79263b688e5b8713381086a9ccebde..dbe60c05154886b9b21fe1009e6ca96b19114cd5 100644
(file)
--- a/
src/MEDWrapper/MED_Factory.cxx
+++ b/
src/MEDWrapper/MED_Factory.cxx
@@
-37,12
+37,25
@@
extern "C"
}
#include <utilities.h>
}
#include <utilities.h>
+#ifdef WIN32
+#include <windows.h>
+#endif
+
+
namespace MED
{
bool exists(const std::string& fileName)
{
#ifdef WIN32
namespace MED
{
bool exists(const std::string& fileName)
{
#ifdef WIN32
- return (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES);
+#ifdef UNICODE
+ size_t length = strlen(fileName.c_str()) + sizeof(char);
+ wchar_t* path = new wchar_t[length];
+ memset(path, '\0', length);
+ mbstowcs(path, fileName.c_str(), length);
+#else
+ cosnt char* path = xmlPath.c_str();
+#endif
+ return (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES);
#else
return (access(fileName.c_str(), F_OK) == 0);
#endif
#else
return (access(fileName.c_str(), F_OK) == 0);
#endif
diff --git
a/src/SMDS/SMDS_Position.hxx
b/src/SMDS/SMDS_Position.hxx
index 62c4042d3322fd09c299aa3afd83d3112b4408c7..31fdde7bc31b6e01603fbbe855a15fc60532c8e8 100644
(file)
--- a/
src/SMDS/SMDS_Position.hxx
+++ b/
src/SMDS/SMDS_Position.hxx
@@
-54,7
+54,7
@@
class SMDS_EXPORT SMDS_Position
*/
template<class T>
*/
template<class T>
-class SMDS_
EXPORT SMDS_
Ptr : public std::unique_ptr< T >
+class SMDS_Ptr : public std::unique_ptr< T >
{
bool myIsOwner;
{
bool myIsOwner;
diff --git
a/src/SMESH/CMakeLists.txt
b/src/SMESH/CMakeLists.txt
index 3e41c626a54e45ada33fe715206ec5b9fcb31061..fc119ed8f749089802dcac4fbc7d745168bd5acc 100644
(file)
--- a/
src/SMESH/CMakeLists.txt
+++ b/
src/SMESH/CMakeLists.txt
@@
-110,6
+110,10
@@
SET(SMESHimpl_SOURCES
# --- rules ---
ADD_LIBRARY(SMESHimpl ${SMESHimpl_SOURCES})
# --- rules ---
ADD_LIBRARY(SMESHimpl ${SMESHimpl_SOURCES})
+IF(WIN32)
+ TARGET_COMPILE_OPTIONS(SMESHimpl PRIVATE /bigobj)
+ENDIF(WIN32)
+
TARGET_LINK_LIBRARIES(SMESHimpl ${_link_LIBRARIES} )
INSTALL(TARGETS SMESHimpl EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
TARGET_LINK_LIBRARIES(SMESHimpl ${_link_LIBRARIES} )
INSTALL(TARGETS SMESHimpl EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
diff --git
a/src/SMESH/SMESH_Gen.cxx
b/src/SMESH/SMESH_Gen.cxx
index 4b5814c1f1244ca09eb9afce4d8c3475c5405194..574d4b3dedba14709fe847a3806a3c72378678d1 100644
(file)
--- a/
src/SMESH/SMESH_Gen.cxx
+++ b/
src/SMESH/SMESH_Gen.cxx
@@
-52,6
+52,8
@@
#include <windows.h>
#endif
#include <windows.h>
#endif
+#include <Basics_Utils.hxx>
+
using namespace std;
//=============================================================================
using namespace std;
//=============================================================================
@@
-1029,7
+1031,15
@@
std::vector< std::string > SMESH_Gen::GetPluginXMLPaths()
xmlPath += sep + plugin + ".xml";
bool fileOK;
#ifdef WIN32
xmlPath += sep + plugin + ".xml";
bool fileOK;
#ifdef WIN32
- fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES);
+#ifdef UNICODE
+ const wchar_t* path = Kernel_Utils::decode_s(xmlPath);
+#else
+ const char* path = xmlPath.c_str();
+#endif
+ fileOK = (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES);
+#ifdef UNICODE
+ delete path;
+#endif
#else
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
#endif
#else
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
#endif
diff --git
a/src/SMESH/SMESH_subMesh.hxx
b/src/SMESH/SMESH_subMesh.hxx
index 9db6348cdf056c034efe4d9447c8473b2184a741..c91deb64ceb8dcc274da39d9af908a55d0da2dae 100644
(file)
--- a/
src/SMESH/SMESH_subMesh.hxx
+++ b/
src/SMESH/SMESH_subMesh.hxx
@@
-48,7
+48,7
@@
class SMESH_Hypothesis;
class SMESH_Mesh;
class SMESH_subMesh;
class SMESH_subMeshEventListener;
class SMESH_Mesh;
class SMESH_subMesh;
class SMESH_subMeshEventListener;
-
class
SMESH_subMeshEventListenerData;
+
struct
SMESH_subMeshEventListenerData;
typedef SMESH_subMeshEventListener EventListener;
typedef SMESH_subMeshEventListenerData EventListenerData;
typedef SMESH_subMeshEventListener EventListener;
typedef SMESH_subMeshEventListenerData EventListenerData;
diff --git
a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx
b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx
index 43ffce19a67f367f4949264da0ed02afac0ab0f1..3b038c5ff07ca1072b4897bddd1941641b975298 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx
+++ b/
src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx
@@
-265,7
+265,7
@@
bool SMESHGUI_ConvToQuadOp::onApply()
prop->Delete();
SMESH::MeshPreviewStruct_var previewData = aEditor->GetPreviewData();
prop->Delete();
SMESH::MeshPreviewStruct_var previewData = aEditor->GetPreviewData();
- myBadElemsPreview->SetData(
& previewData.i
n() );
+ myBadElemsPreview->SetData(
previewData._ret
n() );
myBadElemsPreview->SetVisibility(true);
SUIT_MessageBox* mb = new SUIT_MessageBox(SUIT_MessageBox::Warning,
myBadElemsPreview->SetVisibility(true);
SUIT_MessageBox* mb = new SUIT_MessageBox(SUIT_MessageBox::Warning,
diff --git
a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx
b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx
index f3c23cfb59b16c551d25e0500e6930c7f1f22297..701fef8e4480b2b30c853d40b5dc5efe61e509e1 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx
@@
-536,7
+536,7
@@
void SMESHGUI_FindElemByPointOp::redisplayPreview()
myPreview->nodesXYZ[0].z = myDlg->myZ->GetValue();
if (!mySimulation)
mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
myPreview->nodesXYZ[0].z = myDlg->myZ->GetValue();
if (!mySimulation)
mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
- mySimulation->SetData(
&myPreview.i
n());
+ mySimulation->SetData(
myPreview._ret
n());
}
//================================================================================
}
//================================================================================
diff --git
a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
index f3176684a6b783438aac029f9b101dac07cf57d6..7aff8c6ce1b4b281c333e3d19cadf152d9832d07 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
+++ b/
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
@@
-521,7
+521,17
@@
namespace SMESH
try {
// load plugin library
if(MYDEBUG) MESSAGE("Loading client meshers plugin library ...");
try {
// load plugin library
if(MYDEBUG) MESSAGE("Loading client meshers plugin library ...");
- LibHandle libHandle = LoadLib( aClientLibName.toUtf8().data() );
+#ifdef WIN32
+#ifdef UNICODE
+ LPTSTR path = new TCHAR[aClientLibName.length() + 1];
+ path[aClientLibName.toWCharArray(path)] = '\0';
+#else
+ const char* path = aClientLibName.toUtf8().data();
+#endif
+#else
+ char* path = aClientLibName.toUtf8().data();
+#endif
+ LibHandle libHandle = LoadLib( path );
if (!libHandle) {
// report any error, if occurred
{
if (!libHandle) {
// report any error, if occurred
{
diff --git
a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx
b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx
index 7dca619fb97c75670ee3ead61eb71c461f293899..1e58474dd93ed98e358e0eb7b2d1997553020944 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx
+++ b/
src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx
@@
-167,7
+167,7
@@
vtkIdType getCellType( const SMDSAbs_ElementType theType,
*/
//================================================================================
*/
//================================================================================
-void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct
*
previewData)
+void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct
_var
previewData)
{
// Create points
const SMESH::nodes_array& aNodesXYZ = previewData->nodesXYZ;
{
// Create points
const SMESH::nodes_array& aNodesXYZ = previewData->nodesXYZ;
diff --git
a/src/SMESHGUI/SMESHGUI_MeshEditPreview.h
b/src/SMESHGUI/SMESHGUI_MeshEditPreview.h
index 5ae485a74216144a35718efdb61dc2106d7b45e2..6d58999adab417e621e242ec3fecd9a3d6c1ad17 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_MeshEditPreview.h
+++ b/
src/SMESHGUI/SMESHGUI_MeshEditPreview.h
@@
-37,10
+37,8
@@
class SVTK_ViewWindow;
class vtkTextActor;
class vtkUnstructuredGrid;
class vtkTextActor;
class vtkUnstructuredGrid;
-namespace SMESH
-{
- class MeshPreviewStruct;
-}
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_Mesh)
/*!
* \brief Displayer of the mesh edition preview
/*!
* \brief Displayer of the mesh edition preview
@@
-59,7
+57,7
@@
public:
SMESHGUI_MeshEditPreview( SVTK_ViewWindow* );
~SMESHGUI_MeshEditPreview();
SMESHGUI_MeshEditPreview( SVTK_ViewWindow* );
~SMESHGUI_MeshEditPreview();
- void SetData( const SMESH::MeshPreviewStruct
*
);
+ void SetData( const SMESH::MeshPreviewStruct
_var
);
void SetVisibility( bool );
void SetColor( double, double, double );
void SetVisibility( bool );
void SetColor( double, double, double );
diff --git
a/src/SMESHUtils/SMESH_File.cxx
b/src/SMESHUtils/SMESH_File.cxx
index 556212201577637d642265fd613a4cc9ecde78b8..2472d9eb3a365ee6bbcd772b4f42e2103886b18c 100644
(file)
--- a/
src/SMESHUtils/SMESH_File.cxx
+++ b/
src/SMESHUtils/SMESH_File.cxx
@@
-36,6
+36,8
@@
#include <boost/filesystem.hpp>
#include <boost/filesystem.hpp>
+#include <Basics_Utils.hxx>
+
namespace boofs = boost::filesystem;
//================================================================================
namespace boofs = boost::filesystem;
//================================================================================
@@
-79,9
+81,17
@@
bool SMESH_File::open()
if ( !_map && length > 0 )
{
#ifdef WIN32
if ( !_map && length > 0 )
{
#ifdef WIN32
- _file = CreateFile(_name.data(), GENERIC_READ, FILE_SHARE_READ,
+#ifdef UNICODE
+ const wchar_t* name = Kernel_Utils::decode(_name.data());
+#else
+ char* name = name.data();
+#endif
+ _file = CreateFile(name, GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
bool ok = ( _file != INVALID_HANDLE_VALUE );
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
bool ok = ( _file != INVALID_HANDLE_VALUE );
+#ifdef UNICODE
+ delete name;
+#endif
#else
_file = ::open(_name.data(), O_RDONLY );
bool ok = ( _file >= 0 );
#else
_file = ::open(_name.data(), O_RDONLY );
bool ok = ( _file >= 0 );
@@
-291,14
+301,21
@@
bool SMESH_File::getInts(std::vector<int>& ints)
bool SMESH_File::openForWriting()
{
#ifdef WIN32
bool SMESH_File::openForWriting()
{
#ifdef WIN32
-
- _file = CreateFile( _name.c_str(), // name of the write
+#ifdef UNICODE
+ const wchar_t* name = Kernel_Utils::decode(_name.data());
+#else
+ char* name = name.data();
+#endif
+ _file = CreateFile( name, // name of the write
GENERIC_WRITE, // open for writing
0, // do not share
NULL, // default security
OPEN_ALWAYS, // CREATE NEW or OPEN EXISTING
FILE_ATTRIBUTE_NORMAL, // normal file
NULL); // no attr. template
GENERIC_WRITE, // open for writing
0, // do not share
NULL, // default security
OPEN_ALWAYS, // CREATE NEW or OPEN EXISTING
FILE_ATTRIBUTE_NORMAL, // normal file
NULL); // no attr. template
+#ifdef UNICODE
+ delete name;
+#endif
return ( _file != INVALID_HANDLE_VALUE );
#else
return ( _file != INVALID_HANDLE_VALUE );
#else
diff --git
a/src/SMESH_I/SMESH_2smeshpy.cxx
b/src/SMESH_I/SMESH_2smeshpy.cxx
index 18a393019c9e05dd16429e3abb24fd43e01d0eb3..bad0a03da578ffd862a0290d4f3d99b78f41cadc 100644
(file)
--- a/
src/SMESH_I/SMESH_2smeshpy.cxx
+++ b/
src/SMESH_I/SMESH_2smeshpy.cxx
@@
-1999,7
+1999,7
@@
void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
args.push_back( theCommand->GetArg( i ) );
}
theCommand->RemoveArgs();
args.push_back( theCommand->GetArg( i ) );
}
theCommand->RemoveArgs();
- for ( uint i = 0; i < args.size(); i++ )
+ for ( u
nsigned
int i = 0; i < args.size(); i++ )
theCommand->SetArg( i+1, args[i] );
if ( theCommand->GetNbArgs() == 4 )
{
theCommand->SetArg( i+1, args[i] );
if ( theCommand->GetNbArgs() == 4 )
{
@@
-2039,7
+2039,7
@@
void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
args.push_back( theCommand->GetArg( i ) );
}
theCommand->RemoveArgs();
args.push_back( theCommand->GetArg( i ) );
}
theCommand->RemoveArgs();
- for (
u
int i = 0; i < args.size(); i++ )
+ for (
unsigned
int i = 0; i < args.size(); i++ )
theCommand->SetArg( i+1, args[i] );
// make the 1st arg be the last one (or last but three for ExportMED())
_pyID partID = theCommand->GetArg( 1 );
theCommand->SetArg( i+1, args[i] );
// make the 1st arg be the last one (or last but three for ExportMED())
_pyID partID = theCommand->GetArg( 1 );
diff --git
a/src/SMESH_I/SMESH_Gen_i.cxx
b/src/SMESH_I/SMESH_Gen_i.cxx
index f994b82f0762ac67efd7c632710618cb0685a379..e7916cca304537d9ee411eec722e7088e0d593a2 100644
(file)
--- a/
src/SMESH_I/SMESH_Gen_i.cxx
+++ b/
src/SMESH_I/SMESH_Gen_i.cxx
@@
-439,7
+439,19
@@
GenericHypothesisCreator_i* SMESH_Gen_i::getHypothesisCreator(const char* theHyp
{
// load plugin library
if(MYDEBUG) MESSAGE("Loading server meshers plugin library ...");
{
// load plugin library
if(MYDEBUG) MESSAGE("Loading server meshers plugin library ...");
- LibHandle libHandle = LoadLib( aPlatformLibName.c_str() );
+#ifdef WIN32
+#ifdef UNICODE
+ const wchar_t* path = Kernel_Utils::decode_s(aPlatformLibName);
+#else
+ const char* path = aPlatformLibName.c_str()
+#endif
+#else
+ const char* path = aPlatformLibName.c_str()
+#endif
+ LibHandle libHandle = LoadLib( path );
+#if defined(WIN32) && defined(UNICODE)
+ delete path;
+#endif
if (!libHandle)
{
// report any error, if occurred
if (!libHandle)
{
// report any error, if occurred
diff --git
a/src/SMESH_SWIG_WITHIHM/CMakeLists.txt
b/src/SMESH_SWIG_WITHIHM/CMakeLists.txt
index 9b52ec3bf4216b535654a12bf0b134bebfa8a967..7ed53786379fc2d81d70309728731c6437dfc47d 100644
(file)
--- a/
src/SMESH_SWIG_WITHIHM/CMakeLists.txt
+++ b/
src/SMESH_SWIG_WITHIHM/CMakeLists.txt
@@
-96,8
+96,13
@@
SET(_swig_SCRIPTS
)
# --- rules ---
)
# --- rules ---
+IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
+ SWIG_ADD_MODULE(libSMESH_Swig python ${SMESH_Swig_SOURCES})
+ELSE()
+ SWIG_ADD_LIBRARY(libSMESH_Swig LANGUAGE python SOURCES ${SMESH_Swig_SOURCES})
+ENDIF()
+
-SWIG_ADD_MODULE(libSMESH_Swig python ${SMESH_Swig_SOURCES})
SWIG_LINK_LIBRARIES(libSMESH_Swig ${_link_LIBRARIES})
SWIG_CHECK_GENERATION(libSMESH_Swig)
IF(WIN32)
SWIG_LINK_LIBRARIES(libSMESH_Swig ${_link_LIBRARIES})
SWIG_CHECK_GENERATION(libSMESH_Swig)
IF(WIN32)
diff --git
a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
index f44a29d9046baa1ab4d765c8e6da018da6071159..f5c61d97c0723a091174e7a4082c3ee90ec77e61 100644
(file)
--- a/
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
+++ b/
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
@@
-2047,8
+2047,9
@@
public:
SVTK_IndexedMapOfIds idMap;
selector->GetCompositeIndex( actor->getIO(), idMap );
SVTK_IndexedMapOfIds idMap;
selector->GetCompositeIndex( actor->getIO(), idMap );
- for ( int i = 1; i <= idMap.Extent(); i++ )
- myResult.push_back( std::make_pair<int,int>( (int)idMap( i )[0], (int)idMap( i )[1]) );
+ for ( int i = 1; i <= idMap.Extent(); i++ ) {
+ myResult.push_back( std::make_pair( (int)idMap(i)[0], (int)idMap(i)[1]) );
+ }
}
};
}
};
diff --git
a/src/Tools/MeshCut/MeshCut_Utils.cxx
b/src/Tools/MeshCut/MeshCut_Utils.cxx
index 3a41721cafda0cccae8d70cce7e845831bb84f38..f8d26b366916beb9d89a2bbc2826855cedabb714 100644
(file)
--- a/
src/Tools/MeshCut/MeshCut_Utils.cxx
+++ b/
src/Tools/MeshCut/MeshCut_Utils.cxx
@@
-25,6
+25,7
@@
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cstdlib>
#include <cstring>
#include <ctime>
+#include <algorithm>
using namespace std;
using namespace MESHCUT;
using namespace std;
using namespace MESHCUT;
@@
-924,7
+925,7
@@
void MESHCUT::champType(std::string type, med_entity_type MEM, med_geometry_type
if (debug)
{
cout << endl << " Liste des valeurs du champ brut aux 3 premiers éléments:" << endl;
if (debug)
{
cout << endl << " Liste des valeurs du champ brut aux 3 premiers éléments:" << endl;
- for (imaille = 0; imaille < min(nmailles, 3); imaille++)
+ for (imaille = 0; imaille <
std::
min(nmailles, 3); imaille++)
{
cout << " Maille " << imaille << endl;
for (igauss = 0; igauss < ngauss; igauss++)
{
cout << " Maille " << imaille << endl;
for (igauss = 0; igauss < ngauss; igauss++)