// Compute lengths of the sides
- double aLen[ nbNodes ];
+ //double aLen[ nbNodes ];
+#ifndef WNT
+ double aLen [nbNodes];
+#else
+ double* aLen = (double *)new double[nbNodes];
+#endif
+
for ( int i = 0; i < nbNodes - 1; i++ )
aLen[ i ] = getDistance( P( i + 1 ), P( i + 2 ) );
aLen[ nbNodes - 1 ] = getDistance( P( 1 ), P( nbNodes ) );
aMinLen = Min( aMinLen, aLen[ i ] );
aMaxLen = Max( aMaxLen, aLen[ i ] );
}
+#ifdef WNT
+ delete [] aLen;
+#endif
if ( aMinLen <= Precision::Confusion() )
return 0.;
return false;
int nbNodes = aFace->NbNodes();
- const SMDS_MeshNode* aNodes[ nbNodes ];
+ //const SMDS_MeshNode* aNodes[ nbNodes ];
+#ifndef WNT
+ const SMDS_MeshNode* aNodes [nbNodes];
+#else
+ const SMDS_MeshNode** aNodes = (const SMDS_MeshNode **)new SMDS_MeshNode*[nbNodes];
+#endif
int i = 0;
SMDS_ElemIteratorPtr anIter = aFace->nodesIterator();
if ( anIter != 0 )
}
for ( int i = 0; i < nbNodes - 1; i++ )
- if ( IsFreeEdge( &aNodes[ i ], theId ) )
+ if ( IsFreeEdge( &aNodes[ i ], theId ) ) {
+#ifdef WNT
+ delete [] aNodes;
+#endif
return true;
+ }
aNodes[ 1 ] = aNodes[ nbNodes - 1 ];
-
- return IsFreeEdge( &aNodes[ 0 ], theId );
-
+ const Standard_Boolean isFree = IsFreeEdge( &aNodes[ 0 ], theId );
+#ifdef WNT
+ delete [] aNodes;
+#endif
+// return
+ return isFree;
}
SMDSAbs_ElementType FreeEdges::GetType() const
{
ManifoldPart::TVectorOfLink aLinks;
getLinks( theNextFace, aLinks );
- int aNbLink = aLinks.size();
+ int aNbLink = (int)aLinks.size();
for ( int i = 0; i < aNbLink; i++ )
{
ManifoldPart::Link aLink = aLinks[ i ];
#include "SMDS_Position.hxx"
-class SMDS_EdgePosition:public SMDS_Position
+//#ifdef WNT
+//#include <SALOME_WNT.hxx>
+//#else
+//#define SALOME_WNT_EXPORT
+//#endif
+
+#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
+#define SMDS_WNT_EXPORT __declspec( dllexport )
+#else
+#define SMDS_WNT_EXPORT
+#endif
+
+class SMDS_WNT_EXPORT SMDS_EdgePosition:public SMDS_Position
{
public:
#include "SMDS_Position.hxx"
-class SMDS_FacePosition:public SMDS_Position
+//#ifdef WNT
+//#include <SALOME_WNT.hxx>
+//#else
+//#define SALOME_WNT_EXPORT
+//#endif
+
+#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
+#define SMDS_WNT_EXPORT __declspec( dllexport )
+#else
+#define SMDS_WNT_EXPORT
+#endif
+
+class SMDS_WNT_EXPORT SMDS_FacePosition:public SMDS_Position
{
public:
#include "SMDS_ElemIterator.hxx"
#include <NCollection_Map.hxx>
+//#ifdef WNT
+//#include <SALOME_WNT.hxx>
+//#else
+//#define SALOME_WNT_EXPORT
+//#endif
+#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
+#define SMDS_WNT_EXPORT __declspec( dllexport )
+#else
+#define SMDS_WNT_EXPORT
+#endif
+
#include <boost/shared_ptr.hpp>
#include <set>
#include <list>
typedef SMDS_Iterator<const SMDS_MeshVolume *> SMDS_VolumeIterator;
typedef boost::shared_ptr<SMDS_Iterator<const SMDS_MeshVolume *> > SMDS_VolumeIteratorPtr;
-class SMDS_Mesh:public SMDS_MeshObject{
+class SMDS_WNT_EXPORT SMDS_Mesh:public SMDS_MeshObject{
public:
SMDS_Mesh();
#include "SMDS_ElemIterator.hxx"
#include "SMDS_MeshElementIDFactory.hxx"
+//#ifdef WNT
+//#include <SALOME_WNT.hxx>
+//#else
+//#define SALOME_WNT_EXPORT
+//#endif
+
+#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
+#define SMDS_WNT_EXPORT __declspec( dllexport )
+#else
+#define SMDS_WNT_EXPORT
+#endif
+
#include <vector>
#include <iostream>
///////////////////////////////////////////////////////////////////////////////
/// Base class for elements
///////////////////////////////////////////////////////////////////////////////
-class SMDS_MeshElement:public SMDS_MeshObject
+class SMDS_WNT_EXPORT SMDS_MeshElement:public SMDS_MeshObject
{
public:
#include "SMDS_Mesh.hxx"
#include <set>
+//#ifdef WNT
+//#include <SALOME_WNT.hxx>
+//#else
+//#define SALOME_WNT_EXPORT
+//#endif
-class SMDS_MeshGroup:public SMDS_MeshObject
+#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
+#define SMDS_WNT_EXPORT __declspec( dllexport )
+#else
+#define SMDS_WNT_EXPORT
+#endif
+
+class SMDS_WNT_EXPORT SMDS_MeshGroup:public SMDS_MeshObject
{
public:
SMDS_MeshGroup(const SMDS_Mesh * theMesh,
#include "SMDS_Position.hxx"
#include <NCollection_List.hxx>
-class SMDS_MeshNode:public SMDS_MeshElement
+//#ifdef WNT
+//#include <SALOME_WNT.hxx>
+//#else
+//#define SALOME_WNT_EXPORT
+//#endif
+
+#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
+#define SMDS_WNT_EXPORT __declspec( dllexport )
+#else
+#define SMDS_WNT_EXPORT
+#endif
+
+class SMDS_WNT_EXPORT SMDS_MeshNode:public SMDS_MeshElement
{
public:
#ifndef _SMDS_MeshObject_HeaderFile
#define _SMDS_MeshObject_HeaderFile
-class SMDS_MeshObject
+
+//#ifdef WNT
+//#include <SALOME_WNT.hxx>
+//#else
+//#define SALOME_WNT_EXPORT
+//#endif
+
+#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
+#define SMDS_WNT_EXPORT __declspec( dllexport )
+#else
+#define SMDS_WNT_EXPORT
+#endif
+
+class SMDS_WNT_EXPORT SMDS_MeshObject
{
public:
virtual ~SMDS_MeshObject() {}
}
int k = 0;
+#ifndef WNT
const SMDS_MeshNode* aNodes [aNbNodes];
+#else
+ const SMDS_MeshNode** aNodes = (const SMDS_MeshNode **)new SMDS_MeshNode*[aNbNodes];
+#endif
std::set<const SMDS_MeshNode *>::iterator anIter = aSet.begin();
for (; anIter != aSet.end(); anIter++, k++) {
aNodes[k] = *anIter;
myNodes[i] = aNodes[i];
}
+#ifdef WNT
+ delete [] aNodes;
+#endif
+
return true;
}
#include "SMDS_TypeOfPosition.hxx"
#include <boost/shared_ptr.hpp>
+//#ifdef WNT
+//#include <SALOME_WNT.hxx>
+//#else
+//#define SALOME_WNT_EXPORT
+//#endif
+
+#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
+#define SMDS_WNT_EXPORT __declspec( dllexport )
+#else
+#define SMDS_WNT_EXPORT
+#endif
+
class SMDS_Position;
typedef boost::shared_ptr<SMDS_Position> SMDS_PositionPtr;
-class SMDS_Position
+class SMDS_WNT_EXPORT SMDS_Position
{
public:
#include "SMDS_Position.hxx"
-class SMDS_SpacePosition:public SMDS_Position
+//#ifdef WNT
+//#include <SALOME_WNT.hxx>
+//#else
+//#define SALOME_WNT_EXPORT
+//#endif
+
+#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
+#define SMDS_WNT_EXPORT __declspec( dllexport )
+#else
+#define SMDS_WNT_EXPORT
+#endif
+
+class SMDS_WNT_EXPORT SMDS_SpacePosition:public SMDS_Position
{
public:
#include "SMDS_Position.hxx"
-class SMDS_VertexPosition:public SMDS_Position
+//#ifdef WNT
+//#include <SALOME_WNT.hxx>
+//#else
+//#define SALOME_WNT_EXPORT
+//#endif
+
+#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
+#define SMDS_WNT_EXPORT __declspec( dllexport )
+#else
+#define SMDS_WNT_EXPORT
+#endif
+
+class SMDS_WNT_EXPORT SMDS_VertexPosition:public SMDS_Position
{
public:
#include <vector>
#include <set>
+//#ifdef WNT
+//#include <SALOME_WNT.hxx>
+//#else
+//#define SALOME_WNT_EXPORT
+//#endif
+
+#if defined WNT && defined WIN32 && defined SMDS_EXPORTS
+#define SMDS_WNT_EXPORT __declspec( dllexport )
+#else
+#define SMDS_WNT_EXPORT
+#endif
+
// =========================================================================
//
// Class providing topological and other information about SMDS_MeshVolume:
//
// =========================================================================
-class SMDS_VolumeTool
+class SMDS_WNT_EXPORT SMDS_VolumeTool
{
public:
//ASSERT( nbnodes < 9 );
//int i, IDs[ 8 ];
+#ifndef WNT
int i, IDs[ nbnodes ];
+#else
+ int i, *IDs;
+ IDs = new int[ nbnodes];
+#endif
for ( i = 0; i < nbnodes; i++ )
IDs [ i ] = nodes[ i ]->GetID();
myScript->ChangeElementNodes( elem->GetID(), IDs, nbnodes);
+#ifdef WNT
+ delete [] IDs;
+#endif
+
return true;
}
ASSERT(nodes.size() > 3);
int nb = nodes.size();
+#ifndef WNT
const SMDS_MeshNode* nodes_array [nb];
+#else
+ const SMDS_MeshNode** nodes_array = (const SMDS_MeshNode **)new SMDS_MeshNode*[nb];
+#endif
for (int inode = 0; inode < nb; inode++) {
nodes_array[inode] = nodes[inode];
}
-
+#ifndef WNT
return ChangeElementNodes(elem, nodes_array, nb);
+#else
+ bool aRes = ChangeElementNodes(elem, nodes_array, nb);
+ delete [] nodes_array;
+ return aRes;
+#endif
}
//=======================================================================
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <map>
+#ifdef WNT
+#include <hash_map>
+#endif
//Not portable see http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#5_4 to know more.
#ifdef __GNUC__
~SMESHDS_Mesh();
private:
+#ifndef WNT
struct HashTopoDS_Shape{
size_t operator()(const TopoDS_Shape& S) const {
return S.HashCode(2147483647);
}
};
+#else
+ typedef gstd::hash_compare< TopoDS_Shape, less<TopoDS_Shape> > HashTopoDS;
+
+ class HashTopoDS_Shape : public HashTopoDS {
+ public:
+
+ size_t operator()(const TopoDS_Shape& S) const {
+ return S.HashCode(2147483647);
+ }
+
+ bool operator()(const TopoDS_Shape& S1,const TopoDS_Shape& S2) const {
+ return S1==S2;
+ }
+ };
+
+
+
+#endif
+
typedef std::list<const SMESHDS_Hypothesis*> THypList;
+
+#ifndef WNT
+ typedef gstd::hash_map<TopoDS_Shape,THypList,HashTopoDS_Shape> ShapeToHypothesis;
+#else
typedef gstd::hash_map<TopoDS_Shape,THypList,HashTopoDS_Shape> ShapeToHypothesis;
+#endif
+
ShapeToHypothesis myShapeToHypothesis;
int myMeshID;
return myElements.size();
int nbElems = 0;
+#ifndef WNT
set<const SMESHDS_SubMesh*>::iterator it = mySubMeshes.begin();
+#else
+ set<const SMESHDS_SubMesh*>::const_iterator it = mySubMeshes.begin();
+#endif
for ( ; it != mySubMeshes.end(); it++ )
nbElems += (*it)->NbElements();
return myNodes.size();
int nbElems = 0;
+#ifndef WNT
set<const SMESHDS_SubMesh*>::iterator it = mySubMeshes.begin();
+#else
+ set<const SMESHDS_SubMesh*>::const_iterator it = mySubMeshes.begin();
+#endif
for ( ; it != mySubMeshes.end(); it++ )
nbElems += (*it)->NbNodes();