mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 08:50:35 +05:00
Fix compilation problems under windows.
This commit is contained in:
parent
26446f72ec
commit
61bac50f78
@ -133,12 +133,12 @@ namespace SMESH{
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
virtual double GetValue( long theElementId );
|
||||
virtual double GetValue(const TSequenceOfXYZ& /*thePoints*/) { return -1.0;};
|
||||
void GetHistogram(int nbIntervals,
|
||||
std::vector<int>& nbEvents,
|
||||
std::vector<double>& funValues,
|
||||
const std::vector<smIdType>& elements,
|
||||
const double* minmax=0,
|
||||
const bool isLogarithmic = false);
|
||||
void GetHistogram(int nbIntervals,
|
||||
std::vector<int>& nbEvents,
|
||||
std::vector<double>& funValues,
|
||||
const std::vector<::smIdType>& elements,
|
||||
const double* minmax=0,
|
||||
const bool isLogarithmic = false);
|
||||
bool IsApplicable( long theElementId ) const;
|
||||
virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
|
||||
virtual SMDSAbs_ElementType GetType() const = 0;
|
||||
@ -147,7 +147,7 @@ namespace SMESH{
|
||||
void SetPrecision( const long thePrecision );
|
||||
double Round( const double & value );
|
||||
|
||||
bool GetPoints(const smIdType theId, TSequenceOfXYZ& theRes) const;
|
||||
bool GetPoints(const ::smIdType theId, TSequenceOfXYZ& theRes) const;
|
||||
static bool GetPoints(const SMDS_MeshElement* theElem, TSequenceOfXYZ& theRes);
|
||||
protected:
|
||||
const SMDS_Mesh* myMesh;
|
||||
@ -594,7 +594,7 @@ namespace SMESH{
|
||||
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||
virtual bool IsSatisfy( long theElementId );
|
||||
virtual SMDSAbs_ElementType GetType() const;
|
||||
static bool IsFreeEdge( const SMDS_MeshNode** theNodes, const smIdType theFaceId );
|
||||
static bool IsFreeEdge( const SMDS_MeshNode** theNodes, const ::smIdType theFaceId );
|
||||
typedef long TElemId;
|
||||
struct Border{
|
||||
TElemId myElemId;
|
||||
@ -653,8 +653,8 @@ namespace SMESH{
|
||||
protected:
|
||||
const SMDS_Mesh* myMesh;
|
||||
|
||||
std::vector< smIdType > myMin;
|
||||
std::vector< smIdType > myMax;
|
||||
std::vector< ::smIdType > myMin;
|
||||
std::vector< ::smIdType > myMax;
|
||||
TIDsMap myIds;
|
||||
|
||||
SMDSAbs_ElementType myType;
|
||||
@ -1165,9 +1165,9 @@ namespace SMESH{
|
||||
public:
|
||||
ConnectedElements();
|
||||
//virtual Predicate* clone() const { return new ConnectedElements( *this ); }
|
||||
void SetNode( smIdType nodeID );
|
||||
void SetNode( ::smIdType nodeID );
|
||||
void SetPoint( double x, double y, double z );
|
||||
smIdType GetNode() const;
|
||||
::smIdType GetNode() const;
|
||||
std::vector<double> GetPoint() const;
|
||||
|
||||
void SetType( SMDSAbs_ElementType theType );
|
||||
@ -1179,14 +1179,14 @@ namespace SMESH{
|
||||
//const std::set<long>& GetDomainIDs() const { return myOkIDs; }
|
||||
|
||||
private:
|
||||
smIdType myNodeID;
|
||||
std::vector<double> myXYZ;
|
||||
SMDSAbs_ElementType myType;
|
||||
TMeshModifTracer myMeshModifTracer;
|
||||
::smIdType myNodeID;
|
||||
std::vector<double> myXYZ;
|
||||
SMDSAbs_ElementType myType;
|
||||
TMeshModifTracer myMeshModifTracer;
|
||||
|
||||
void clearOkIDs();
|
||||
bool myOkIDsReady;
|
||||
std::set<smIdType> myOkIDs; // empty means that there is one domain
|
||||
void clearOkIDs();
|
||||
bool myOkIDsReady;
|
||||
std::set<::smIdType> myOkIDs; // empty means that there is one domain
|
||||
};
|
||||
typedef boost::shared_ptr<ConnectedElements> ConnectedElementsPtr;
|
||||
|
||||
|
@ -157,17 +157,17 @@ namespace SMESH
|
||||
}
|
||||
}
|
||||
|
||||
std::map<SMDSAbs_ElementType,smIdType> GetEntitiesFromObject(SMESH_VisualObj *theObject) {
|
||||
std::map<SMDSAbs_ElementType,smIdType> entities;
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_0DElement,
|
||||
std::map<SMDSAbs_ElementType,::smIdType> GetEntitiesFromObject(SMESH_VisualObj *theObject) {
|
||||
std::map<SMDSAbs_ElementType,::smIdType> entities;
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,::smIdType>(SMDSAbs_0DElement,
|
||||
theObject ? theObject->GetNbEntities(SMDSAbs_0DElement) : 0));
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_Ball,
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,::smIdType>(SMDSAbs_Ball,
|
||||
theObject ? theObject->GetNbEntities(SMDSAbs_Ball) : 0));
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_Edge,
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,::smIdType>(SMDSAbs_Edge,
|
||||
theObject ? theObject->GetNbEntities(SMDSAbs_Edge) : 0));
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_Face,
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,::smIdType>(SMDSAbs_Face,
|
||||
theObject ? theObject->GetNbEntities(SMDSAbs_Face) : 0));
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_Volume,
|
||||
entities.insert(std::pair<SMDSAbs_ElementType,::smIdType>(SMDSAbs_Volume,
|
||||
theObject ? theObject->GetNbEntities(SMDSAbs_Volume) : 0));
|
||||
return entities;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ SMESHOBJECT_EXPORT
|
||||
QString def);
|
||||
|
||||
SMESHOBJECT_EXPORT
|
||||
std::map<SMDSAbs_ElementType,smIdType>
|
||||
std::map<SMDSAbs_ElementType,::smIdType>
|
||||
GetEntitiesFromObject(SMESH_VisualObj *theObject);
|
||||
|
||||
SMESHOBJECT_EXPORT
|
||||
|
@ -557,7 +557,7 @@ void SMESH_VisualObjDef::updateEntitiesFlags()
|
||||
unsigned int tmp = myEntitiesState;
|
||||
ClearEntitiesFlags();
|
||||
|
||||
map<SMDSAbs_ElementType,smIdType> entities = SMESH::GetEntitiesFromObject(this);
|
||||
map<SMDSAbs_ElementType,::smIdType> entities = SMESH::GetEntitiesFromObject(this);
|
||||
|
||||
|
||||
if( myEntitiesCache[SMDSAbs_0DElement] != 0 ||
|
||||
|
@ -1226,8 +1226,8 @@ namespace SMESH
|
||||
|
||||
int GetEdgeNodes(SVTK_Selector* theSelector,
|
||||
const TVisualObjPtr& theVisualObject,
|
||||
smIdType& theId1,
|
||||
smIdType& theId2)
|
||||
::smIdType& theId1,
|
||||
::smIdType& theId2)
|
||||
{
|
||||
const SALOME_ListIO& selected = theSelector->StoredIObjects();
|
||||
|
||||
@ -1243,9 +1243,9 @@ namespace SMESH
|
||||
if ( aMapIndex.Extent() != 2 )
|
||||
return -1;
|
||||
|
||||
smIdType anObjId = -1, anEdgeNum = -1;
|
||||
for ( smIdType i = 1; i <= aMapIndex.Extent(); i++ ) {
|
||||
smIdType aVal = aMapIndex( i );
|
||||
::smIdType anObjId = -1, anEdgeNum = -1;
|
||||
for ( ::smIdType i = 1; i <= aMapIndex.Extent(); i++ ) {
|
||||
::smIdType aVal = aMapIndex( i );
|
||||
if ( aVal > 0 )
|
||||
anObjId = aVal;
|
||||
else
|
||||
@ -1343,7 +1343,7 @@ namespace SMESH
|
||||
}
|
||||
|
||||
|
||||
int GetEdgeNodes( LightApp_SelectionMgr* theMgr, smIdType& theId1, smIdType& theId2 )
|
||||
int GetEdgeNodes( LightApp_SelectionMgr* theMgr, ::smIdType& theId1, ::smIdType& theId2 )
|
||||
{
|
||||
SALOME_ListIO selected; theMgr->selectedObjects( selected );
|
||||
|
||||
@ -1363,9 +1363,9 @@ namespace SMESH
|
||||
if ( aMapIndex.Extent() != 2 )
|
||||
return -1;
|
||||
|
||||
smIdType anObjId = -1, anEdgeNum = -1;
|
||||
for ( smIdType i = 1; i <= aMapIndex.Extent(); i++ ) {
|
||||
smIdType aVal = aMapIndex( i );
|
||||
::smIdType anObjId = -1, anEdgeNum = -1;
|
||||
for ( ::smIdType i = 1; i <= aMapIndex.Extent(); i++ ) {
|
||||
::smIdType aVal = aMapIndex( i );
|
||||
if ( aVal > 0 )
|
||||
anObjId = aVal;
|
||||
else
|
||||
|
@ -169,7 +169,7 @@ SMESHGUI_EXPORT
|
||||
const Handle(SALOME_InteractiveObject)&,
|
||||
QString& );
|
||||
SMESHGUI_EXPORT
|
||||
int GetEdgeNodes( SVTK_Selector*, const TVisualObjPtr&, smIdType&, smIdType& );
|
||||
int GetEdgeNodes( SVTK_Selector*, const TVisualObjPtr&, ::smIdType&, ::smIdType& );
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
SMESHGUI_EXPORT
|
||||
@ -189,7 +189,7 @@ SMESHGUI_EXPORT
|
||||
const bool = true );
|
||||
|
||||
SMESHGUI_EXPORT
|
||||
int GetEdgeNodes( LightApp_SelectionMgr*, smIdType&, smIdType& );
|
||||
int GetEdgeNodes( LightApp_SelectionMgr*, ::smIdType&, ::smIdType& );
|
||||
|
||||
SMESHGUI_EXPORT
|
||||
void SetControlsPrecision( const long );
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -43,8 +43,6 @@
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace SMESH;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
@ -158,7 +156,7 @@ void SMESH_GroupBase_i::SetName( const char* theName )
|
||||
aGen->SetName( anSO, theName );
|
||||
|
||||
// Update Python script
|
||||
TPythonDump() << anSO << ".SetName( '" << theName << "' )";
|
||||
SMESH::TPythonDump() << anSO << ".SetName( '" << theName << "' )";
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,7 +262,7 @@ void SMESH_Group_i::Clear()
|
||||
myPreMeshInfo->FullLoadFromFile();
|
||||
|
||||
// Update Python script
|
||||
TPythonDump() << SMESH::SMESH_Group_var(_this()) << ".Clear()";
|
||||
SMESH::TPythonDump() << SMESH::SMESH_Group_var(_this()) << ".Clear()";
|
||||
|
||||
// Clear the group
|
||||
SMESHDS_Group* aGroupDS = dynamic_cast<SMESHDS_Group*>( GetGroupDS() );
|
||||
@ -304,7 +302,7 @@ SMESH::smIdType SMESH_Group_i::Add( const SMESH::smIdType_array& theIDs )
|
||||
myPreMeshInfo->FullLoadFromFile();
|
||||
|
||||
// Update Python script
|
||||
TPythonDump() << "nbAdd = " << SMESH::SMESH_Group_var(_this()) << ".Add( " << theIDs << " )";
|
||||
SMESH::TPythonDump() << "nbAdd = " << SMESH::SMESH_Group_var(_this()) << ".Add( " << theIDs << " )";
|
||||
|
||||
// Add elements to the group
|
||||
SMESHDS_Group* aGroupDS = dynamic_cast<SMESHDS_Group*>( GetGroupDS() );
|
||||
@ -335,7 +333,7 @@ SMESH::smIdType SMESH_Group_i::Remove( const SMESH::smIdType_array& theIDs )
|
||||
myPreMeshInfo->FullLoadFromFile();
|
||||
|
||||
// Update Python script
|
||||
TPythonDump() << "nbDel = " << SMESH::SMESH_Group_var(_this())
|
||||
SMESH::TPythonDump() << "nbDel = " << SMESH::SMESH_Group_var(_this())
|
||||
<< ".Remove( " << theIDs << " )";
|
||||
|
||||
// Remove elements from the group
|
||||
@ -364,10 +362,10 @@ SMESH::smIdType SMESH_Group_i::Remove( const SMESH::smIdType_array& theIDs )
|
||||
typedef bool (SMESHDS_Group::*TFunChangeGroup)(const smIdType);
|
||||
|
||||
CORBA::Long
|
||||
ChangeByPredicate( SMESH::Predicate_i* thePredicate,
|
||||
SMESHDS_GroupBase* theGroupBase,
|
||||
NotifyerAndWaiter* theGroupImpl,
|
||||
TFunChangeGroup theFun)
|
||||
ChangeByPredicate( SMESH::Predicate_i* thePredicate,
|
||||
SMESHDS_GroupBase* theGroupBase,
|
||||
SMESH::NotifyerAndWaiter* theGroupImpl,
|
||||
TFunChangeGroup theFun)
|
||||
{
|
||||
CORBA::Long aNb = 0;
|
||||
if(SMESHDS_Group* aGroupDS = dynamic_cast<SMESHDS_Group*>(theGroupBase)){
|
||||
@ -394,8 +392,8 @@ AddByPredicate( SMESH::Predicate_ptr thePredicate )
|
||||
myPreMeshInfo->FullLoadFromFile();
|
||||
|
||||
if(SMESH::Predicate_i* aPredicate = SMESH::GetPredicate(thePredicate)){
|
||||
TPythonDump() << SMESH::SMESH_Group_var(_this())
|
||||
<< ".AddByPredicate( " << aPredicate << " )";
|
||||
SMESH::TPythonDump() << SMESH::SMESH_Group_var(_this())
|
||||
<< ".AddByPredicate( " << aPredicate << " )";
|
||||
return ChangeByPredicate( aPredicate, GetGroupDS(), this, &SMESHDS_Group::Add );
|
||||
}
|
||||
return 0;
|
||||
@ -409,8 +407,8 @@ RemoveByPredicate( SMESH::Predicate_ptr thePredicate )
|
||||
myPreMeshInfo->FullLoadFromFile();
|
||||
|
||||
if(SMESH::Predicate_i* aPredicate = SMESH::GetPredicate(thePredicate)){
|
||||
TPythonDump() << SMESH::SMESH_Group_var(_this())
|
||||
<< ".RemoveByPredicate( " << aPredicate << " )";
|
||||
SMESH::TPythonDump() << SMESH::SMESH_Group_var(_this())
|
||||
<< ".RemoveByPredicate( " << aPredicate << " )";
|
||||
return ChangeByPredicate(aPredicate,GetGroupDS(),this, &SMESHDS_Group::Remove);
|
||||
}
|
||||
return 0;
|
||||
@ -421,7 +419,7 @@ SMESH::smIdType SMESH_Group_i::AddFrom( SMESH::SMESH_IDSource_ptr theSource )
|
||||
if ( myPreMeshInfo )
|
||||
myPreMeshInfo->FullLoadFromFile();
|
||||
|
||||
TPythonDump pd;
|
||||
SMESH::TPythonDump pd;
|
||||
long prevNb = Size();
|
||||
SMESHDS_Group* aGroupDS = dynamic_cast<SMESHDS_Group*>( GetGroupDS() );
|
||||
if (aGroupDS) {
|
||||
@ -475,7 +473,7 @@ SMESH::smIdType_array* SMESH_GroupBase_i::GetListOfID()
|
||||
smIdType aSize = aGroupDS->Extent();
|
||||
aRes->length(aSize);
|
||||
SMDS_ElemIteratorPtr it = aGroupDS->GetElements();
|
||||
for (smIdType i = 0; it->more(); i++)
|
||||
for (::smIdType i = 0; it->more(); i++)
|
||||
aRes[i] = it->next()->GetID();
|
||||
|
||||
if ( 0 < aSize && aSize < 100 ) // for comfortable testing ;)
|
||||
@ -639,9 +637,9 @@ void SMESH_GroupBase_i::SetColor(const SALOMEDS::Color& color)
|
||||
if ( oldColor != aQColor )
|
||||
{
|
||||
aGroupDS->SetColor(aQColor);
|
||||
TPythonDump()<< SMESH::SMESH_GroupBase_var(_this())
|
||||
<< ".SetColor( SALOMEDS.Color( "
|
||||
<<color.R<<", "<<color.G<<", "<<color.B<<" ))";
|
||||
SMESH::TPythonDump()<< SMESH::SMESH_GroupBase_var(_this())
|
||||
<< ".SetColor( SALOMEDS.Color( "
|
||||
<<color.R<<", "<<color.G<<", "<<color.B<<" ))";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -671,7 +669,7 @@ void SMESH_GroupBase_i::SetColorNumber(CORBA::Long color)
|
||||
if (aGroupDS)
|
||||
{
|
||||
aGroupDS->SetColorGroup(color);
|
||||
TPythonDump()<<SMESH::SMESH_GroupBase_var(_this())<<".SetColorNumber( "<<color<<" )";
|
||||
SMESH::TPythonDump()<<SMESH::SMESH_GroupBase_var(_this())<<".SetColorNumber( "<<color<<" )";
|
||||
}
|
||||
return ;
|
||||
}
|
||||
@ -844,7 +842,7 @@ void SMESH_GroupOnFilter_i::SetFilter(SMESH::Filter_ptr theFilter)
|
||||
GetMeshServant()->GetGen()->HighLightInvalid( me, false );
|
||||
|
||||
|
||||
TPythonDump()<< me <<".SetFilter( "<< theFilter <<" )";
|
||||
SMESH::TPythonDump()<< me <<".SetFilter( "<< theFilter <<" )";
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
@ -856,7 +854,7 @@ void SMESH_GroupOnFilter_i::SetFilter(SMESH::Filter_ptr theFilter)
|
||||
SMESH::Filter_ptr SMESH_GroupOnFilter_i::GetFilter()
|
||||
{
|
||||
SMESH::Filter_var f = myFilter;
|
||||
TPythonDump() << f << " = " << SMESH::SMESH_GroupOnFilter_var(_this()) << ".GetFilter()";
|
||||
SMESH::TPythonDump() << f << " = " << SMESH::SMESH_GroupOnFilter_var(_this()) << ".GetFilter()";
|
||||
return f._retn();
|
||||
}
|
||||
|
||||
@ -938,7 +936,7 @@ SMESH::smIdType_array* SMESH_GroupOnFilter_i::GetMeshInfo()
|
||||
|
||||
if ( g->GetType() != SMDSAbs_Node )
|
||||
{
|
||||
std::vector< SMESH::smIdType > nbElems = static_cast< SMESHDS_GroupOnFilter* >( g )->GetMeshInfo();
|
||||
std::vector< smIdType > nbElems = static_cast< SMESHDS_GroupOnFilter* >( g )->GetMeshInfo();
|
||||
for ( size_t i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
|
||||
if ( i < nbElems.size() )
|
||||
aRes[i] = nbElems[ i ];
|
||||
@ -1039,7 +1037,7 @@ SMESH::Filter_ptr SMESH_GroupOnFilter_i::StringToFilter(const std::string& thePe
|
||||
}
|
||||
|
||||
// create a filter
|
||||
TPythonDump pd;
|
||||
SMESH::TPythonDump pd;
|
||||
SMESH::FilterManager_i* aFilterMgr = new SMESH::FilterManager_i();
|
||||
filter = aFilterMgr->CreateFilter();
|
||||
filter->SetCriteria( criteria.inout() );
|
||||
|
@ -22,10 +22,6 @@
|
||||
// File : SMESH_Measurements_i.cxx
|
||||
// Author : Pavel TELKOV, Open CASCADE S.A.S. (pavel.telkov@opencascade.com)
|
||||
|
||||
#ifdef WIN32
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
#include "SMESH_Measurements_i.hxx"
|
||||
|
||||
#include "SMDS_ElemIterator.hxx"
|
||||
@ -40,7 +36,7 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
using namespace SMESH;
|
||||
//using namespace SMESH;
|
||||
|
||||
/**
|
||||
* this local function to avoid uninitialized fields
|
||||
@ -80,7 +76,7 @@ SMESH::Measurements_ptr SMESH_Gen_i::CreateMeasurements()
|
||||
// name : Measurements_i
|
||||
// Purpose : Constructor
|
||||
//=======================================================================
|
||||
Measurements_i::Measurements_i()
|
||||
SMESH::Measurements_i::Measurements_i()
|
||||
: SALOME::GenericObj_i( SMESH_Gen_i::GetPOA() )
|
||||
{
|
||||
//Base class Salome_GenericObject do it inmplicitly by overriding PortableServer::POA_ptr _default_POA() method
|
||||
@ -92,7 +88,7 @@ Measurements_i::Measurements_i()
|
||||
// name : ~Measurements_i
|
||||
// Purpose : Destructor
|
||||
//=======================================================================
|
||||
Measurements_i::~Measurements_i()
|
||||
SMESH::Measurements_i::~Measurements_i()
|
||||
{
|
||||
//TPythonDump()<<this<<".UnRegister()";
|
||||
}
|
||||
@ -152,7 +148,7 @@ static SMESHDS_Mesh* getMesh(SMESH::SMESH_IDSource_ptr theSource)
|
||||
if (!CORBA::is_nil( theSource ))
|
||||
{
|
||||
SMESH::SMESH_Mesh_var mesh = theSource->GetMesh();
|
||||
SMESH_Mesh_i* anImplPtr = DownCast<SMESH_Mesh_i*>( mesh );
|
||||
SMESH_Mesh_i* anImplPtr = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
|
||||
if (anImplPtr)
|
||||
return anImplPtr->GetImpl().GetMeshDS();
|
||||
}
|
||||
@ -187,7 +183,7 @@ static double getNumericalValue(SMESH::SMESH_IDSource_ptr theSource,
|
||||
// name : MinDistance
|
||||
// Purpose : minimal distance between two given entities
|
||||
//=======================================================================
|
||||
SMESH::Measure Measurements_i::MinDistance
|
||||
SMESH::Measure SMESH::Measurements_i::MinDistance
|
||||
(SMESH::SMESH_IDSource_ptr theSource1,
|
||||
SMESH::SMESH_IDSource_ptr theSource2)
|
||||
{
|
||||
@ -289,7 +285,7 @@ static void enlargeBoundingBox(const SMESH::SMESH_IDSource_ptr theObject,
|
||||
if ( !aMesh )
|
||||
return;
|
||||
|
||||
if ( DownCast<SMESH_Mesh_i*>( theObject )) // theObject is mesh
|
||||
if (SMESH::DownCast<SMESH_Mesh_i*>( theObject )) // theObject is mesh
|
||||
{
|
||||
for (SMDS_NodeIteratorPtr aNodeIter = aMesh->nodesIterator(); aNodeIter->more(); )
|
||||
enlargeBoundingBox( aNodeIter->next(), theMeasure);
|
||||
@ -318,7 +314,7 @@ static void enlargeBoundingBox(const SMESH::SMESH_IDSource_ptr theObject,
|
||||
// name : BoundingBox
|
||||
// Purpose : compute common bounding box of entities
|
||||
//=======================================================================
|
||||
SMESH::Measure Measurements_i::BoundingBox (const SMESH::ListOfIDSources& theSources)
|
||||
SMESH::Measure SMESH::Measurements_i::BoundingBox (const SMESH::ListOfIDSources& theSources)
|
||||
{
|
||||
SMESH::Measure aMeasure;
|
||||
initMeasure(aMeasure);
|
||||
@ -334,7 +330,7 @@ SMESH::Measure Measurements_i::BoundingBox (const SMESH::ListOfIDSources& theSou
|
||||
// name : Length
|
||||
// Purpose : sum of length of 1D elements of the source
|
||||
//=======================================================================
|
||||
double Measurements_i::Length(SMESH::SMESH_IDSource_ptr theSource)
|
||||
double SMESH::Measurements_i::Length(SMESH::SMESH_IDSource_ptr theSource)
|
||||
{
|
||||
return getNumericalValue( theSource, SMESH::Controls::NumericalFunctorPtr(new SMESH::Controls::Length()) );
|
||||
}
|
||||
@ -343,7 +339,7 @@ double Measurements_i::Length(SMESH::SMESH_IDSource_ptr theSource)
|
||||
// name : Area
|
||||
// Purpose : sum of area of 2D elements of the source
|
||||
//=======================================================================
|
||||
double Measurements_i::Area(SMESH::SMESH_IDSource_ptr theSource)
|
||||
double SMESH::Measurements_i::Area(SMESH::SMESH_IDSource_ptr theSource)
|
||||
{
|
||||
return getNumericalValue( theSource, SMESH::Controls::NumericalFunctorPtr(new SMESH::Controls::Area()) );
|
||||
}
|
||||
@ -352,7 +348,7 @@ double Measurements_i::Area(SMESH::SMESH_IDSource_ptr theSource)
|
||||
// name : Volume
|
||||
// Purpose : sum of volume of 3D elements of the source
|
||||
//=======================================================================
|
||||
double Measurements_i::Volume(SMESH::SMESH_IDSource_ptr theSource)
|
||||
double SMESH::Measurements_i::Volume(SMESH::SMESH_IDSource_ptr theSource)
|
||||
{
|
||||
return getNumericalValue( theSource, SMESH::Controls::NumericalFunctorPtr(new SMESH::Controls::Volume()) );
|
||||
}
|
||||
@ -362,7 +358,7 @@ double Measurements_i::Volume(SMESH::SMESH_IDSource_ptr theSource)
|
||||
//purpose : return gravity center of the source: average coordinates of all nodes
|
||||
//=======================================================================
|
||||
|
||||
SMESH::PointStruct Measurements_i::GravityCenter(SMESH::SMESH_IDSource_ptr theSource)
|
||||
SMESH::PointStruct SMESH::Measurements_i::GravityCenter(SMESH::SMESH_IDSource_ptr theSource)
|
||||
{
|
||||
SMESH::PointStruct grCenter = { 0.,0.,0. };
|
||||
const SMESHDS_Mesh* mesh = getMesh( theSource );
|
||||
@ -404,9 +400,9 @@ SMESH::PointStruct Measurements_i::GravityCenter(SMESH::SMESH_IDSource_ptr theSo
|
||||
//purpose : Return angle in radians defined by 3 points <(p1,p2,p3)
|
||||
//=======================================================================
|
||||
|
||||
CORBA::Double Measurements_i::Angle(const SMESH::PointStruct& p1,
|
||||
const SMESH::PointStruct& p2,
|
||||
const SMESH::PointStruct& p3 )
|
||||
CORBA::Double SMESH::Measurements_i::Angle(const SMESH::PointStruct& p1,
|
||||
const SMESH::PointStruct& p2,
|
||||
const SMESH::PointStruct& p3 )
|
||||
{
|
||||
gp_Vec v1( p1.x - p2.x, p1.y - p2.y, p1.z - p2.z );
|
||||
gp_Vec v2( p3.x - p2.x, p3.y - p2.y, p3.z - p2.z );
|
||||
|
@ -279,13 +279,13 @@ namespace MeshEditor_I {
|
||||
SMDS_MeshElement::Filter & filter = *aFilter;
|
||||
|
||||
if ( aType == SMDSAbs_Node )
|
||||
for ( SMESH::smIdType i = 0; i < IDs.length(); i++ ) {
|
||||
for ( CORBA::ULong i = 0; i < IDs.length(); i++ ) {
|
||||
const SMDS_MeshElement * elem = aMesh->FindNode( IDs[i] );
|
||||
if ( filter( elem ))
|
||||
aMap.insert( aMap.end(), elem );
|
||||
}
|
||||
else
|
||||
for ( SMESH::smIdType i = 0; i<IDs.length(); i++) {
|
||||
for ( CORBA::ULong i = 0; i<IDs.length(); i++) {
|
||||
const SMDS_MeshElement * elem = aMesh->FindElement( IDs[i] );
|
||||
if ( filter( elem ))
|
||||
aMap.insert( aMap.end(), elem );
|
||||
@ -789,7 +789,7 @@ SMESH_MeshEditor_i::RemoveElements(const SMESH::smIdType_array & IDsOfElements)
|
||||
|
||||
list< smIdType > IdList;
|
||||
|
||||
for ( SMESH::smIdType i = 0; i < IDsOfElements.length(); i++ )
|
||||
for ( CORBA::ULong i = 0; i < IDsOfElements.length(); i++ )
|
||||
IdList.push_back( IDsOfElements[i] );
|
||||
|
||||
// Update Python script
|
||||
@ -817,7 +817,7 @@ CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::smIdType_array & IDs
|
||||
initData();
|
||||
|
||||
list< smIdType > IdList;
|
||||
for ( SMESH::smIdType i = 0; i < IDsOfNodes.length(); i++)
|
||||
for ( CORBA::ULong i = 0; i < IDsOfNodes.length(); i++)
|
||||
IdList.push_back( IDsOfNodes[i] );
|
||||
|
||||
// Update Python script
|
||||
@ -1578,7 +1578,7 @@ CORBA::Boolean SMESH_MeshEditor_i::Reorient(const SMESH::smIdType_array & IDsOfE
|
||||
SMESH_TRY;
|
||||
initData();
|
||||
|
||||
for ( SMESH::smIdType i = 0; i < IDsOfElements.length(); i++ )
|
||||
for ( CORBA::ULong i = 0; i < IDsOfElements.length(); i++ )
|
||||
{
|
||||
SMESH::smIdType index = IDsOfElements[i];
|
||||
const SMDS_MeshElement * elem = getMeshDS()->FindElement(index);
|
||||
@ -2252,7 +2252,7 @@ SMESH_MeshEditor_i::smooth(const SMESH::smIdType_array & IDsOfElements,
|
||||
arrayToSet(IDsOfElements, aMesh, elements, SMDSAbs_Face);
|
||||
|
||||
set<const SMDS_MeshNode*> fixedNodes;
|
||||
for ( SMESH::smIdType i = 0; i < IDsOfFixedNodes.length(); i++) {
|
||||
for ( CORBA::ULong i = 0; i < IDsOfFixedNodes.length(); i++) {
|
||||
SMESH::smIdType index = IDsOfFixedNodes[i];
|
||||
const SMDS_MeshNode * node = aMesh->FindNode(index);
|
||||
if ( node )
|
||||
@ -4342,7 +4342,7 @@ void SMESH_MeshEditor_i::MergeElements(const SMESH::array_of_long_array& theGrou
|
||||
if ( elemTypes->length() == 1 && elemTypes[0] == SMESH::NODE )
|
||||
continue;
|
||||
SMESH::smIdType_array_var elementsId = theElementsToKeep[i]->GetIDs();
|
||||
for ( SMESH::smIdType j = 0; j < elementsId->length(); ++j )
|
||||
for ( CORBA::ULong j = 0; j < elementsId->length(); ++j )
|
||||
idsToKeep.Add( elementsId[ j ]);
|
||||
}
|
||||
|
||||
@ -4353,7 +4353,7 @@ void SMESH_MeshEditor_i::MergeElements(const SMESH::array_of_long_array& theGrou
|
||||
const SMESH::long_array& anElemsIDGroup = theGroupsOfElementsID[ i ];
|
||||
aListOfListOfElementsID.push_back( list< smIdType >() );
|
||||
list< smIdType >& aListOfElemsID = aListOfListOfElementsID.back();
|
||||
for ( SMESH::smIdType j = 0; j < anElemsIDGroup.length(); j++ )
|
||||
for ( CORBA::ULong j = 0; j < anElemsIDGroup.length(); j++ )
|
||||
{
|
||||
SMESH::smIdType id = anElemsIDGroup[ j ];
|
||||
if ( idsToKeep.Contains( id )) aListOfElemsID.push_front( id );
|
||||
|
@ -93,7 +93,7 @@ public:
|
||||
SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::smIdType_array& IDsOfElements,
|
||||
SMESH::ElementType type);
|
||||
static bool IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSource );
|
||||
static SMESH::smIdType* GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, smIdType& nbIds );
|
||||
static SMESH::smIdType* GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, SMESH::smIdType& nbIds );
|
||||
|
||||
/*!
|
||||
* \brief Generates the unique group name
|
||||
|
@ -320,13 +320,8 @@ void StdMeshersGUI_DistrPreview::update()
|
||||
|
||||
setAxisScale( myDensity->xAxis(), min_x, max_x );
|
||||
setAxisScale( myDensity->yAxis(),
|
||||
#ifdef WIN32
|
||||
min( 0.0, min_y ),
|
||||
max( 0.0, max_y )
|
||||
#else
|
||||
std::min( 0.0, min_y ),
|
||||
std::max( 0.0, max_y )
|
||||
#endif
|
||||
);
|
||||
myDensity->setSamples( x, y, size );
|
||||
if( x )
|
||||
|
Loading…
Reference in New Issue
Block a user