mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 02:10:35 +05:00
*** empty log message ***
This commit is contained in:
parent
b2e2ef901d
commit
864789c1b0
@ -115,10 +115,10 @@ class SMESH_EXPORT SMESH_Block: public math_FunctionSetWithDerivatives
|
|||||||
// ShapeIndex( ID_Ex00 ) == 0
|
// ShapeIndex( ID_Ex00 ) == 0
|
||||||
// ShapeIndex( ID_Ex10 ) == 1
|
// ShapeIndex( ID_Ex10 ) == 1
|
||||||
|
|
||||||
static void GetFaceEdgesIDs (const int faceID, vector< int >& edgeVec );
|
static void GetFaceEdgesIDs (const int faceID, std::vector< int >& edgeVec );
|
||||||
// return edges IDs of a face in the order u0, u1, 0v, 1v
|
// return edges IDs of a face in the order u0, u1, 0v, 1v
|
||||||
|
|
||||||
static void GetEdgeVertexIDs (const int edgeID, vector< int >& vertexVec );
|
static void GetEdgeVertexIDs (const int edgeID, std::vector< int >& vertexVec );
|
||||||
// return vertex IDs of an edge
|
// return vertex IDs of an edge
|
||||||
|
|
||||||
static int GetCoordIndOnEdge (const int theEdgeID)
|
static int GetCoordIndOnEdge (const int theEdgeID)
|
||||||
@ -136,7 +136,7 @@ class SMESH_EXPORT SMESH_Block: public math_FunctionSetWithDerivatives
|
|||||||
static int GetShapeIDByParams ( const gp_XYZ& theParams );
|
static int GetShapeIDByParams ( const gp_XYZ& theParams );
|
||||||
// define an id of the block sub-shape by point parameters
|
// define an id of the block sub-shape by point parameters
|
||||||
|
|
||||||
static ostream& DumpShapeID (const int theBlockShapeID, ostream& stream);
|
static std::ostream& DumpShapeID (const int theBlockShapeID, std::ostream& stream);
|
||||||
// DEBUG: dump an id of a block sub-shape
|
// DEBUG: dump an id of a block sub-shape
|
||||||
|
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ class SMESH_EXPORT SMESH_Block: public math_FunctionSetWithDerivatives
|
|||||||
bool LoadMeshBlock(const SMDS_MeshVolume* theVolume,
|
bool LoadMeshBlock(const SMDS_MeshVolume* theVolume,
|
||||||
const int theNode000Index,
|
const int theNode000Index,
|
||||||
const int theNode001Index,
|
const int theNode001Index,
|
||||||
vector<const SMDS_MeshNode*>& theOrderedNodes);
|
std::vector<const SMDS_MeshNode*>& theOrderedNodes);
|
||||||
// prepare to work with theVolume and
|
// prepare to work with theVolume and
|
||||||
// return nodes in theVolume corners in the order of TShapeID enum
|
// return nodes in theVolume corners in the order of TShapeID enum
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ public:
|
|||||||
// return coordinates of a point in shell
|
// return coordinates of a point in shell
|
||||||
|
|
||||||
static bool ShellPoint(const gp_XYZ& theParams,
|
static bool ShellPoint(const gp_XYZ& theParams,
|
||||||
const vector<gp_XYZ>& thePointOnShape,
|
const std::vector<gp_XYZ>& thePointOnShape,
|
||||||
gp_XYZ& thePoint );
|
gp_XYZ& thePoint );
|
||||||
// computes coordinates of a point in shell by points on sub-shapes
|
// computes coordinates of a point in shell by points on sub-shapes
|
||||||
// and point parameters.
|
// and point parameters.
|
||||||
@ -377,7 +377,7 @@ public:
|
|||||||
gp_XYZ myParam; // the best parameters guess
|
gp_XYZ myParam; // the best parameters guess
|
||||||
double myValues[ 4 ]; // values computed at myParam: square distance and 3 derivatives
|
double myValues[ 4 ]; // values computed at myParam: square distance and 3 derivatives
|
||||||
|
|
||||||
typedef pair<gp_XYZ,gp_XYZ> TxyzPair;
|
typedef std::pair<gp_XYZ,gp_XYZ> TxyzPair;
|
||||||
TxyzPair my3x3x3GridNodes[ 27 ]; // to compute the first param guess
|
TxyzPair my3x3x3GridNodes[ 27 ]; // to compute the first param guess
|
||||||
bool myGridComputed;
|
bool myGridComputed;
|
||||||
};
|
};
|
||||||
|
@ -109,7 +109,7 @@ SMESH_Mesh::~SMESH_Mesh()
|
|||||||
INFOS("SMESH_Mesh::~SMESH_Mesh");
|
INFOS("SMESH_Mesh::~SMESH_Mesh");
|
||||||
|
|
||||||
// delete groups
|
// delete groups
|
||||||
map < int, SMESH_Group * >::iterator itg;
|
std::map < int, SMESH_Group * >::iterator itg;
|
||||||
for (itg = _mapGroup.begin(); itg != _mapGroup.end(); itg++) {
|
for (itg = _mapGroup.begin(); itg != _mapGroup.end(); itg++) {
|
||||||
SMESH_Group *aGroup = (*itg).second;
|
SMESH_Group *aGroup = (*itg).second;
|
||||||
delete aGroup;
|
delete aGroup;
|
||||||
@ -134,12 +134,12 @@ void SMESH_Mesh::ShapeToMesh(const TopoDS_Shape & aShape)
|
|||||||
{
|
{
|
||||||
// removal of a shape to mesh, delete objects referring to sub-shapes:
|
// removal of a shape to mesh, delete objects referring to sub-shapes:
|
||||||
// - sub-meshes
|
// - sub-meshes
|
||||||
map <int, SMESH_subMesh *>::iterator i_sm = _mapSubMesh.begin();
|
std::map <int, SMESH_subMesh *>::iterator i_sm = _mapSubMesh.begin();
|
||||||
for ( ; i_sm != _mapSubMesh.end(); ++i_sm )
|
for ( ; i_sm != _mapSubMesh.end(); ++i_sm )
|
||||||
delete i_sm->second;
|
delete i_sm->second;
|
||||||
_mapSubMesh.clear();
|
_mapSubMesh.clear();
|
||||||
// - groups on geometry
|
// - groups on geometry
|
||||||
map <int, SMESH_Group *>::iterator i_gr = _mapGroup.begin();
|
std::map <int, SMESH_Group *>::iterator i_gr = _mapGroup.begin();
|
||||||
while ( i_gr != _mapGroup.end() ) {
|
while ( i_gr != _mapGroup.end() ) {
|
||||||
if ( dynamic_cast<SMESHDS_GroupOnGeom*>( i_gr->second->GetGroupDS() )) {
|
if ( dynamic_cast<SMESHDS_GroupOnGeom*>( i_gr->second->GetGroupDS() )) {
|
||||||
_myMeshDS->RemoveGroup( i_gr->second->GetGroupDS() );
|
_myMeshDS->RemoveGroup( i_gr->second->GetGroupDS() );
|
||||||
@ -281,10 +281,10 @@ int SMESH_Mesh::MEDToMesh(const char* theFileName, const char* theMeshName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reading groups (sub-meshes are out of scope of MED import functionality)
|
// Reading groups (sub-meshes are out of scope of MED import functionality)
|
||||||
list<TNameAndType> aGroupNames = myReader.GetGroupNamesAndTypes();
|
std::list<TNameAndType> aGroupNames = myReader.GetGroupNamesAndTypes();
|
||||||
if(MYDEBUG) MESSAGE("MEDToMesh - Nb groups = "<<aGroupNames.size());
|
if(MYDEBUG) MESSAGE("MEDToMesh - Nb groups = "<<aGroupNames.size());
|
||||||
int anId;
|
int anId;
|
||||||
list<TNameAndType>::iterator name_type = aGroupNames.begin();
|
std::list<TNameAndType>::iterator name_type = aGroupNames.begin();
|
||||||
for ( ; name_type != aGroupNames.end(); name_type++ ) {
|
for ( ; name_type != aGroupNames.end(); name_type++ ) {
|
||||||
SMESH_Group* aGroup = AddGroup( name_type->second, name_type->first.c_str(), anId );
|
SMESH_Group* aGroup = AddGroup( name_type->second, name_type->first.c_str(), anId );
|
||||||
if ( aGroup ) {
|
if ( aGroup ) {
|
||||||
@ -534,7 +534,7 @@ SMESH_Hypothesis::Hypothesis_Status
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
const list<const SMESHDS_Hypothesis*>&
|
const std::list<const SMESHDS_Hypothesis*>&
|
||||||
SMESH_Mesh::GetHypothesisList(const TopoDS_Shape & aSubShape) const
|
SMESH_Mesh::GetHypothesisList(const TopoDS_Shape & aSubShape) const
|
||||||
throw(SALOME_Exception)
|
throw(SALOME_Exception)
|
||||||
{
|
{
|
||||||
@ -557,8 +557,8 @@ const SMESH_Hypothesis * SMESH_Mesh::GetHypothesis(const TopoDS_Shape & aSubS
|
|||||||
const bool andAncestors) const
|
const bool andAncestors) const
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
const list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(aSubShape);
|
const std::list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(aSubShape);
|
||||||
list<const SMESHDS_Hypothesis*>::const_iterator hyp = hypList.begin();
|
std::list<const SMESHDS_Hypothesis*>::const_iterator hyp = hypList.begin();
|
||||||
for ( ; hyp != hypList.end(); hyp++ ) {
|
for ( ; hyp != hypList.end(); hyp++ ) {
|
||||||
const SMESH_Hypothesis * h = cSMESH_Hyp( *hyp );
|
const SMESH_Hypothesis * h = cSMESH_Hyp( *hyp );
|
||||||
if ( aFilter.IsOk( h, aSubShape))
|
if ( aFilter.IsOk( h, aSubShape))
|
||||||
@ -570,8 +570,8 @@ const SMESH_Hypothesis * SMESH_Mesh::GetHypothesis(const TopoDS_Shape & aSubS
|
|||||||
TopTools_ListIteratorOfListOfShape it( GetAncestors( aSubShape ));
|
TopTools_ListIteratorOfListOfShape it( GetAncestors( aSubShape ));
|
||||||
for (; it.More(); it.Next() )
|
for (; it.More(); it.Next() )
|
||||||
{
|
{
|
||||||
const list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(it.Value());
|
const std::list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(it.Value());
|
||||||
list<const SMESHDS_Hypothesis*>::const_iterator hyp = hypList.begin();
|
std::list<const SMESHDS_Hypothesis*>::const_iterator hyp = hypList.begin();
|
||||||
for ( ; hyp != hypList.end(); hyp++ ) {
|
for ( ; hyp != hypList.end(); hyp++ ) {
|
||||||
const SMESH_Hypothesis * h = cSMESH_Hyp( *hyp );
|
const SMESH_Hypothesis * h = cSMESH_Hyp( *hyp );
|
||||||
if (aFilter.IsOk( h, it.Value() ))
|
if (aFilter.IsOk( h, it.Value() ))
|
||||||
@ -605,7 +605,7 @@ int SMESH_Mesh::GetHypotheses(const TopoDS_Shape & aSubShape,
|
|||||||
bool mainHypFound = false;
|
bool mainHypFound = false;
|
||||||
|
|
||||||
// fill in hypTypes
|
// fill in hypTypes
|
||||||
list<const SMESHDS_Hypothesis*>::const_iterator hyp;
|
std::list<const SMESHDS_Hypothesis*>::const_iterator hyp;
|
||||||
for ( hyp = aHypList.begin(); hyp != aHypList.end(); hyp++ ) {
|
for ( hyp = aHypList.begin(); hyp != aHypList.end(); hyp++ ) {
|
||||||
if ( hypTypes.insert( (*hyp)->GetName() ).second )
|
if ( hypTypes.insert( (*hyp)->GetName() ).second )
|
||||||
nbHyps++;
|
nbHyps++;
|
||||||
@ -615,7 +615,7 @@ int SMESH_Mesh::GetHypotheses(const TopoDS_Shape & aSubShape,
|
|||||||
|
|
||||||
// get hypos from aSubShape
|
// get hypos from aSubShape
|
||||||
{
|
{
|
||||||
const list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(aSubShape);
|
const std::list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(aSubShape);
|
||||||
for ( hyp = hypList.begin(); hyp != hypList.end(); hyp++ )
|
for ( hyp = hypList.begin(); hyp != hypList.end(); hyp++ )
|
||||||
if ( aFilter.IsOk (cSMESH_Hyp( *hyp ), aSubShape) &&
|
if ( aFilter.IsOk (cSMESH_Hyp( *hyp ), aSubShape) &&
|
||||||
( cSMESH_Hyp(*hyp)->IsAuxiliary() || !mainHypFound ) &&
|
( cSMESH_Hyp(*hyp)->IsAuxiliary() || !mainHypFound ) &&
|
||||||
@ -637,7 +637,7 @@ int SMESH_Mesh::GetHypotheses(const TopoDS_Shape & aSubShape,
|
|||||||
{
|
{
|
||||||
if ( !map.Add( it.Value() ))
|
if ( !map.Add( it.Value() ))
|
||||||
continue;
|
continue;
|
||||||
const list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(it.Value());
|
const std::list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(it.Value());
|
||||||
for ( hyp = hypList.begin(); hyp != hypList.end(); hyp++ )
|
for ( hyp = hypList.begin(); hyp != hypList.end(); hyp++ )
|
||||||
if (aFilter.IsOk( cSMESH_Hyp( *hyp ), it.Value() ) &&
|
if (aFilter.IsOk( cSMESH_Hyp( *hyp ), it.Value() ) &&
|
||||||
( cSMESH_Hyp(*hyp)->IsAuxiliary() || !mainHypFound ) &&
|
( cSMESH_Hyp(*hyp)->IsAuxiliary() || !mainHypFound ) &&
|
||||||
@ -659,7 +659,7 @@ int SMESH_Mesh::GetHypotheses(const TopoDS_Shape & aSubShape,
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
const list<SMESHDS_Command*> & SMESH_Mesh::GetLog() throw(SALOME_Exception)
|
const std::list<SMESHDS_Command*> & SMESH_Mesh::GetLog() throw(SALOME_Exception)
|
||||||
{
|
{
|
||||||
Unexpect aCatch(SalomeException);
|
Unexpect aCatch(SalomeException);
|
||||||
if(MYDEBUG) MESSAGE("SMESH_Mesh::GetLog");
|
if(MYDEBUG) MESSAGE("SMESH_Mesh::GetLog");
|
||||||
@ -757,19 +757,19 @@ throw(SALOME_Exception)
|
|||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
list<SMESH_subMesh*>
|
std::list<SMESH_subMesh*>
|
||||||
SMESH_Mesh::GetGroupSubMeshesContaining(const TopoDS_Shape & aSubShape) const
|
SMESH_Mesh::GetGroupSubMeshesContaining(const TopoDS_Shape & aSubShape) const
|
||||||
throw(SALOME_Exception)
|
throw(SALOME_Exception)
|
||||||
{
|
{
|
||||||
Unexpect aCatch(SalomeException);
|
Unexpect aCatch(SalomeException);
|
||||||
list<SMESH_subMesh*> found;
|
std::list<SMESH_subMesh*> found;
|
||||||
|
|
||||||
SMESH_subMesh * subMesh = GetSubMeshContaining(aSubShape);
|
SMESH_subMesh * subMesh = GetSubMeshContaining(aSubShape);
|
||||||
if ( !subMesh )
|
if ( !subMesh )
|
||||||
return found;
|
return found;
|
||||||
|
|
||||||
// submeshes of groups have max IDs, so search from the map end
|
// submeshes of groups have max IDs, so search from the map end
|
||||||
map<int, SMESH_subMesh *>::const_reverse_iterator i_sm;
|
std::map<int, SMESH_subMesh *>::const_reverse_iterator i_sm;
|
||||||
for ( i_sm = _mapSubMesh.rbegin(); i_sm != _mapSubMesh.rend(); ++i_sm) {
|
for ( i_sm = _mapSubMesh.rbegin(); i_sm != _mapSubMesh.rend(); ++i_sm) {
|
||||||
SMESHDS_SubMesh * ds = i_sm->second->GetSubMeshDS();
|
SMESHDS_SubMesh * ds = i_sm->second->GetSubMeshDS();
|
||||||
if ( ds && ds->IsComplexSubmesh() ) {
|
if ( ds && ds->IsComplexSubmesh() ) {
|
||||||
@ -927,9 +927,9 @@ bool SMESH_Mesh::GetAutoColor() throw(SALOME_Exception)
|
|||||||
bool SMESH_Mesh::HasDuplicatedGroupNamesMED()
|
bool SMESH_Mesh::HasDuplicatedGroupNamesMED()
|
||||||
{
|
{
|
||||||
set<string> aGroupNames;
|
set<string> aGroupNames;
|
||||||
for ( map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) {
|
for ( std::map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) {
|
||||||
SMESH_Group* aGroup = it->second;
|
SMESH_Group* aGroup = it->second;
|
||||||
string aGroupName = aGroup->GetName();
|
std::string aGroupName = aGroup->GetName();
|
||||||
aGroupName.resize(MAX_MED_GROUP_NAME_LENGTH);
|
aGroupName.resize(MAX_MED_GROUP_NAME_LENGTH);
|
||||||
if (!aGroupNames.insert(aGroupName).second)
|
if (!aGroupNames.insert(aGroupName).second)
|
||||||
return true;
|
return true;
|
||||||
@ -967,7 +967,7 @@ void SMESH_Mesh::ExportMED(const char *file,
|
|||||||
set<string> aGroupNames;
|
set<string> aGroupNames;
|
||||||
char aString [256];
|
char aString [256];
|
||||||
int maxNbIter = 10000; // to guarantee cycle finish
|
int maxNbIter = 10000; // to guarantee cycle finish
|
||||||
for ( map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) {
|
for ( std::map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) {
|
||||||
SMESH_Group* aGroup = it->second;
|
SMESH_Group* aGroup = it->second;
|
||||||
SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS();
|
SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS();
|
||||||
if ( aGroupDS ) {
|
if ( aGroupDS ) {
|
||||||
@ -1007,11 +1007,11 @@ void SMESH_Mesh::ExportUNV(const char *file) throw(SALOME_Exception)
|
|||||||
myWriter.SetMeshId(_idDoc);
|
myWriter.SetMeshId(_idDoc);
|
||||||
// myWriter.SetGroups(_mapGroup);
|
// myWriter.SetGroups(_mapGroup);
|
||||||
|
|
||||||
for ( map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) {
|
for ( std::map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) {
|
||||||
SMESH_Group* aGroup = it->second;
|
SMESH_Group* aGroup = it->second;
|
||||||
SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS();
|
SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS();
|
||||||
if ( aGroupDS ) {
|
if ( aGroupDS ) {
|
||||||
string aGroupName = aGroup->GetName();
|
std::string aGroupName = aGroup->GetName();
|
||||||
aGroupDS->SetStoreName( aGroupName.c_str() );
|
aGroupDS->SetStoreName( aGroupName.c_str() );
|
||||||
myWriter.AddGroup( aGroupDS );
|
myWriter.AddGroup( aGroupDS );
|
||||||
}
|
}
|
||||||
@ -1261,10 +1261,10 @@ SMESH_Group* SMESH_Mesh::GetGroup (const int theGroupID)
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
list<int> SMESH_Mesh::GetGroupIds() const
|
std::list<int> SMESH_Mesh::GetGroupIds() const
|
||||||
{
|
{
|
||||||
list<int> anIds;
|
std::list<int> anIds;
|
||||||
for ( map<int, SMESH_Group*>::const_iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ )
|
for ( std::map<int, SMESH_Group*>::const_iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ )
|
||||||
anIds.push_back( it->first );
|
anIds.push_back( it->first );
|
||||||
|
|
||||||
return anIds;
|
return anIds;
|
||||||
@ -1329,7 +1329,7 @@ ostream& SMESH_Mesh::Dump(ostream& save)
|
|||||||
save << clause << ".1) Number of " << orderStr << " triangles: \t" << nb3 << endl;
|
save << clause << ".1) Number of " << orderStr << " triangles: \t" << nb3 << endl;
|
||||||
save << clause << ".2) Number of " << orderStr << " quadrangles:\t" << nb4 << endl;
|
save << clause << ".2) Number of " << orderStr << " quadrangles:\t" << nb4 << endl;
|
||||||
if ( nb3 + nb4 != NbFaces(order) ) {
|
if ( nb3 + nb4 != NbFaces(order) ) {
|
||||||
map<int,int> myFaceMap;
|
std::map<int,int> myFaceMap;
|
||||||
SMDS_FaceIteratorPtr itFaces=_myMeshDS->facesIterator();
|
SMDS_FaceIteratorPtr itFaces=_myMeshDS->facesIterator();
|
||||||
while( itFaces->more( ) ) {
|
while( itFaces->more( ) ) {
|
||||||
int nbNodes = itFaces->next()->NbNodes();
|
int nbNodes = itFaces->next()->NbNodes();
|
||||||
@ -1354,7 +1354,7 @@ ostream& SMESH_Mesh::Dump(ostream& save)
|
|||||||
save << clause << ".3) Number of " << orderStr << " prisms: \t" << nb6 << endl;
|
save << clause << ".3) Number of " << orderStr << " prisms: \t" << nb6 << endl;
|
||||||
save << clause << ".4) Number of " << orderStr << " pyramids:\t" << nb5 << endl;
|
save << clause << ".4) Number of " << orderStr << " pyramids:\t" << nb5 << endl;
|
||||||
if ( nb8 + nb4 + nb5 + nb6 != NbVolumes(order) ) {
|
if ( nb8 + nb4 + nb5 + nb6 != NbVolumes(order) ) {
|
||||||
map<int,int> myVolumesMap;
|
std::map<int,int> myVolumesMap;
|
||||||
SMDS_VolumeIteratorPtr itVolumes=_myMeshDS->volumesIterator();
|
SMDS_VolumeIteratorPtr itVolumes=_myMeshDS->volumesIterator();
|
||||||
while( itVolumes->more( ) ) {
|
while( itVolumes->more( ) ) {
|
||||||
int nbNodes = itVolumes->next()->NbNodes();
|
int nbNodes = itVolumes->next()->NbNodes();
|
||||||
|
@ -244,8 +244,8 @@ protected:
|
|||||||
std::list <SMESH_subMesh*> _subMeshesUsingHypothesisList;
|
std::list <SMESH_subMesh*> _subMeshesUsingHypothesisList;
|
||||||
SMESHDS_Document * _myDocument;
|
SMESHDS_Document * _myDocument;
|
||||||
SMESHDS_Mesh * _myMeshDS;
|
SMESHDS_Mesh * _myMeshDS;
|
||||||
map <int, SMESH_subMesh *> _mapSubMesh;
|
std::map <int, SMESH_subMesh*> _mapSubMesh;
|
||||||
map <int, SMESH_Group *> _mapGroup;
|
std::map <int, SMESH_Group*> _mapGroup;
|
||||||
SMESH_Gen * _gen;
|
SMESH_Gen * _gen;
|
||||||
|
|
||||||
bool _isAutoColor;
|
bool _isAutoColor;
|
||||||
|
@ -313,9 +313,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
SMESH_NodeSearcher* GetNodeSearcher();
|
SMESH_NodeSearcher* GetNodeSearcher();
|
||||||
|
|
||||||
int SimplifyFace (const vector<const SMDS_MeshNode *> faceNodes,
|
int SimplifyFace (const std::vector<const SMDS_MeshNode *> faceNodes,
|
||||||
vector<const SMDS_MeshNode *>& poly_nodes,
|
std::vector<const SMDS_MeshNode *>& poly_nodes,
|
||||||
vector<int>& quantities) const;
|
std::vector<int>& quantities) const;
|
||||||
// Split face, defined by <faceNodes>, into several faces by repeating nodes.
|
// Split face, defined by <faceNodes>, into several faces by repeating nodes.
|
||||||
// Is used by MergeNodes()
|
// Is used by MergeNodes()
|
||||||
|
|
||||||
@ -478,8 +478,8 @@ public:
|
|||||||
* \param nReplaceMap - output map of corresponding nodes
|
* \param nReplaceMap - output map of corresponding nodes
|
||||||
* \retval Sew_Error - is a success or not
|
* \retval Sew_Error - is a success or not
|
||||||
*/
|
*/
|
||||||
static Sew_Error FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,
|
static Sew_Error FindMatchingNodes(std::set<const SMDS_MeshElement*>& theSide1,
|
||||||
set<const SMDS_MeshElement*>& theSide2,
|
std::set<const SMDS_MeshElement*>& theSide2,
|
||||||
const SMDS_MeshNode* theFirstNode1,
|
const SMDS_MeshNode* theFirstNode1,
|
||||||
const SMDS_MeshNode* theFirstNode2,
|
const SMDS_MeshNode* theFirstNode2,
|
||||||
const SMDS_MeshNode* theSecondNode1,
|
const SMDS_MeshNode* theSecondNode1,
|
||||||
|
@ -994,14 +994,14 @@ bool SMESH_MesherHelper::LoadNodeColumns(TParam2ColumnMap & theParam2ColumnMap,
|
|||||||
|
|
||||||
// load nodes from theBaseEdge
|
// load nodes from theBaseEdge
|
||||||
|
|
||||||
set<const SMDS_MeshNode*> loadedNodes;
|
std::set<const SMDS_MeshNode*> loadedNodes;
|
||||||
const SMDS_MeshNode* nullNode = 0;
|
const SMDS_MeshNode* nullNode = 0;
|
||||||
|
|
||||||
vector<const SMDS_MeshNode*> & nVecf = theParam2ColumnMap[ 0.];
|
std::vector<const SMDS_MeshNode*> & nVecf = theParam2ColumnMap[ 0.];
|
||||||
nVecf.resize( vsize, nullNode );
|
nVecf.resize( vsize, nullNode );
|
||||||
loadedNodes.insert( nVecf[ 0 ] = smVfb->GetNodes()->next() );
|
loadedNodes.insert( nVecf[ 0 ] = smVfb->GetNodes()->next() );
|
||||||
|
|
||||||
vector<const SMDS_MeshNode*> & nVecl = theParam2ColumnMap[ 1.];
|
std::vector<const SMDS_MeshNode*> & nVecl = theParam2ColumnMap[ 1.];
|
||||||
nVecl.resize( vsize, nullNode );
|
nVecl.resize( vsize, nullNode );
|
||||||
loadedNodes.insert( nVecl[ 0 ] = smVlb->GetNodes()->next() );
|
loadedNodes.insert( nVecl[ 0 ] = smVlb->GetNodes()->next() );
|
||||||
|
|
||||||
@ -1020,7 +1020,7 @@ bool SMESH_MesherHelper::LoadNodeColumns(TParam2ColumnMap & theParam2ColumnMap,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
double u = ( pos->GetUParameter() - f ) / range;
|
double u = ( pos->GetUParameter() - f ) / range;
|
||||||
vector<const SMDS_MeshNode*> & nVec = theParam2ColumnMap[ u ];
|
std::vector<const SMDS_MeshNode*> & nVec = theParam2ColumnMap[ u ];
|
||||||
nVec.resize( vsize, nullNode );
|
nVec.resize( vsize, nullNode );
|
||||||
loadedNodes.insert( nVec[ 0 ] = node );
|
loadedNodes.insert( nVec[ 0 ] = node );
|
||||||
}
|
}
|
||||||
@ -1030,7 +1030,7 @@ bool SMESH_MesherHelper::LoadNodeColumns(TParam2ColumnMap & theParam2ColumnMap,
|
|||||||
|
|
||||||
// load nodes from e1
|
// load nodes from e1
|
||||||
|
|
||||||
map< double, const SMDS_MeshNode*> sortedNodes; // sort by param on edge
|
std::map< double, const SMDS_MeshNode*> sortedNodes; // sort by param on edge
|
||||||
nIt = sm1->GetNodes();
|
nIt = sm1->GetNodes();
|
||||||
while ( nIt->more() ) {
|
while ( nIt->more() ) {
|
||||||
node = nIt->next();
|
node = nIt->next();
|
||||||
@ -1041,10 +1041,10 @@ bool SMESH_MesherHelper::LoadNodeColumns(TParam2ColumnMap & theParam2ColumnMap,
|
|||||||
if ( !pos ) {
|
if ( !pos ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
sortedNodes.insert( make_pair( pos->GetUParameter(), node ));
|
sortedNodes.insert( std::make_pair( pos->GetUParameter(), node ));
|
||||||
}
|
}
|
||||||
loadedNodes.insert( nVecf[ vsize - 1 ] = smVft->GetNodes()->next() );
|
loadedNodes.insert( nVecf[ vsize - 1 ] = smVft->GetNodes()->next() );
|
||||||
map< double, const SMDS_MeshNode*>::iterator u_n = sortedNodes.begin();
|
std::map< double, const SMDS_MeshNode*>::iterator u_n = sortedNodes.begin();
|
||||||
int row = rev1 ? vsize - 1 : 0;
|
int row = rev1 ? vsize - 1 : 0;
|
||||||
int dRow = rev1 ? -1 : +1;
|
int dRow = rev1 ? -1 : +1;
|
||||||
for ( ; u_n != sortedNodes.end(); u_n++ ) {
|
for ( ; u_n != sortedNodes.end(); u_n++ ) {
|
||||||
|
@ -36,9 +36,9 @@
|
|||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
typedef pair<const SMDS_MeshNode*, const SMDS_MeshNode*> NLink;
|
typedef std::pair<const SMDS_MeshNode*, const SMDS_MeshNode*> NLink;
|
||||||
typedef map<NLink, const SMDS_MeshNode*> NLinkNodeMap;
|
typedef std::map<NLink, const SMDS_MeshNode*> NLinkNodeMap;
|
||||||
typedef map<NLink, const SMDS_MeshNode*>::iterator ItNLinkNode;
|
typedef std::map<NLink, const SMDS_MeshNode*>::iterator ItNLinkNode;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief It helps meshers to add elements
|
* \brief It helps meshers to add elements
|
||||||
|
@ -49,7 +49,7 @@ class SMESH_OctreeNode : public SMESH_Octree{
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
SMESH_OctreeNode (const set<const SMDS_MeshNode*>& theNodes, const int maxLevel = -1,
|
SMESH_OctreeNode (const std::set<const SMDS_MeshNode*>& theNodes, const int maxLevel = -1,
|
||||||
const int maxNbNodes = 5 , const double minBoxSize = 0.);
|
const int maxNbNodes = 5 , const double minBoxSize = 0.);
|
||||||
|
|
||||||
//=============================
|
//=============================
|
||||||
@ -66,19 +66,19 @@ public:
|
|||||||
virtual const bool isInside(const SMDS_MeshNode * Node, const double precision = 0. );
|
virtual const bool isInside(const SMDS_MeshNode * Node, const double precision = 0. );
|
||||||
|
|
||||||
// Return in Result a list of Nodes potentials to be near Node
|
// Return in Result a list of Nodes potentials to be near Node
|
||||||
void NodesAround( const SMDS_MeshNode * Node , list<const SMDS_MeshNode*>* Result,
|
void NodesAround( const SMDS_MeshNode * Node , std::list<const SMDS_MeshNode*>* Result,
|
||||||
const double precision = 0. );
|
const double precision = 0. );
|
||||||
|
|
||||||
// Return in theGroupsOfNodes a list of group of nodes close to each other within theTolerance
|
// Return in theGroupsOfNodes a list of group of nodes close to each other within theTolerance
|
||||||
// Search for all the nodes in nodes
|
// Search for all the nodes in nodes
|
||||||
void FindCoincidentNodes ( set<const SMDS_MeshNode*>* nodes,
|
void FindCoincidentNodes ( std::set<const SMDS_MeshNode*>* nodes,
|
||||||
const double theTolerance,
|
const double theTolerance,
|
||||||
list< list< const SMDS_MeshNode*> >* theGroupsOfNodes);
|
std::list< std::list< const SMDS_MeshNode*> >* theGroupsOfNodes);
|
||||||
|
|
||||||
// Static method that return in theGroupsOfNodes a list of group of nodes close to each other within
|
// Static method that return in theGroupsOfNodes a list of group of nodes close to each other within
|
||||||
// theTolerance search for all the nodes in nodes
|
// theTolerance search for all the nodes in nodes
|
||||||
static void FindCoincidentNodes ( set<const SMDS_MeshNode*> nodes,
|
static void FindCoincidentNodes ( std::set<const SMDS_MeshNode*> nodes,
|
||||||
list< list< const SMDS_MeshNode*> >* theGroupsOfNodes,
|
std::list< std::list< const SMDS_MeshNode*> >* theGroupsOfNodes,
|
||||||
const double theTolerance = 0.00001, const int maxLevel = -1,
|
const double theTolerance = 0.00001, const int maxLevel = -1,
|
||||||
const int maxNbNodes = 5);
|
const int maxNbNodes = 5);
|
||||||
/*!
|
/*!
|
||||||
@ -114,15 +114,15 @@ protected:
|
|||||||
|
|
||||||
// Return in result a list of nodes closed to Node and remove it from SetOfNodes
|
// Return in result a list of nodes closed to Node and remove it from SetOfNodes
|
||||||
void FindCoincidentNodes( const SMDS_MeshNode * Node,
|
void FindCoincidentNodes( const SMDS_MeshNode * Node,
|
||||||
set<const SMDS_MeshNode*>* SetOfNodes,
|
std::set<const SMDS_MeshNode*>* SetOfNodes,
|
||||||
list<const SMDS_MeshNode*>* Result,
|
std::list<const SMDS_MeshNode*>* Result,
|
||||||
const double precision);
|
const double precision);
|
||||||
|
|
||||||
// The max number of nodes a leaf box can contain
|
// The max number of nodes a leaf box can contain
|
||||||
int myMaxNbNodes;
|
int myMaxNbNodes;
|
||||||
|
|
||||||
// The set of nodes inside the box of the Octree (Empty if Octree is not a leaf)
|
// The set of nodes inside the box of the Octree (Empty if Octree is not a leaf)
|
||||||
set<const SMDS_MeshNode*> myNodes;
|
std::set<const SMDS_MeshNode*> myNodes;
|
||||||
|
|
||||||
// The number of nodes I have inside the box
|
// The number of nodes I have inside the box
|
||||||
int myNbNodes;
|
int myNbNodes;
|
||||||
|
@ -246,51 +246,51 @@ private:
|
|||||||
bool setShapeToMesh(const TopoDS_Shape& theShape);
|
bool setShapeToMesh(const TopoDS_Shape& theShape);
|
||||||
// Set a shape to be meshed. Return True if meshing is possible
|
// Set a shape to be meshed. Return True if meshing is possible
|
||||||
|
|
||||||
list< TPoint* > & getShapePoints(const TopoDS_Shape& theShape);
|
std::list< TPoint* > & getShapePoints(const TopoDS_Shape& theShape);
|
||||||
// Return list of points located on theShape.
|
// Return list of points located on theShape.
|
||||||
// A list of edge-points include vertex-points (for 2D pattern only).
|
// A list of edge-points include vertex-points (for 2D pattern only).
|
||||||
// A list of face-points doesnt include edge-points.
|
// A list of face-points doesnt include edge-points.
|
||||||
// A list of volume-points doesnt include face-points.
|
// A list of volume-points doesnt include face-points.
|
||||||
|
|
||||||
list< TPoint* > & getShapePoints(const int theShapeID);
|
std::list< TPoint* > & getShapePoints(const int theShapeID);
|
||||||
// Return list of points located on the shape
|
// Return list of points located on the shape
|
||||||
|
|
||||||
bool findBoundaryPoints();
|
bool findBoundaryPoints();
|
||||||
// If loaded from file, find points to map on edges and faces and
|
// If loaded from file, find points to map on edges and faces and
|
||||||
// compute their parameters
|
// compute their parameters
|
||||||
|
|
||||||
void arrangeBoundaries (list< list< TPoint* > >& boundaryPoints);
|
void arrangeBoundaries (std::list< std::list< TPoint* > >& boundaryPoints);
|
||||||
// if there are several wires, arrange boundaryPoints so that
|
// if there are several wires, arrange boundaryPoints so that
|
||||||
// the outer wire goes first and fix inner wires orientation;
|
// the outer wire goes first and fix inner wires orientation;
|
||||||
// update myKeyPointIDs to correspond to the order of key-points
|
// update myKeyPointIDs to correspond to the order of key-points
|
||||||
// in boundaries; sort internal boundaries by the nb of key-points
|
// in boundaries; sort internal boundaries by the nb of key-points
|
||||||
|
|
||||||
void computeUVOnEdge( const TopoDS_Edge& theEdge, const list< TPoint* > & ePoints );
|
void computeUVOnEdge( const TopoDS_Edge& theEdge, const std::list< TPoint* > & ePoints );
|
||||||
// compute coordinates of points on theEdge
|
// compute coordinates of points on theEdge
|
||||||
|
|
||||||
bool compUVByIsoIntersection (const list< list< TPoint* > >& boundaryPoints,
|
bool compUVByIsoIntersection (const std::list< std::list< TPoint* > >& boundaryPoints,
|
||||||
const gp_XY& theInitUV,
|
const gp_XY& theInitUV,
|
||||||
gp_XY& theUV,
|
gp_XY& theUV,
|
||||||
bool & theIsDeformed);
|
bool & theIsDeformed);
|
||||||
// compute UV by intersection of iso-lines found by points on edges
|
// compute UV by intersection of iso-lines found by points on edges
|
||||||
|
|
||||||
bool compUVByElasticIsolines(const list< list< TPoint* > >& boundaryPoints,
|
bool compUVByElasticIsolines(const std::list< std::list< TPoint* > >& boundaryPoints,
|
||||||
const list< TPoint* >& pointsToCompute);
|
const std::list< TPoint* >& pointsToCompute);
|
||||||
// compute UV as nodes of iso-poly-lines consisting of
|
// compute UV as nodes of iso-poly-lines consisting of
|
||||||
// segments keeping relative size as in the pattern
|
// segments keeping relative size as in the pattern
|
||||||
|
|
||||||
double setFirstEdge (list< TopoDS_Edge > & theWire, int theFirstEdgeID);
|
double setFirstEdge (std::list< TopoDS_Edge > & theWire, int theFirstEdgeID);
|
||||||
// choose the best first edge of theWire; return the summary distance
|
// choose the best first edge of theWire; return the summary distance
|
||||||
// between point UV computed by isolines intersection and
|
// between point UV computed by isolines intersection and
|
||||||
// eventual UV got from edge p-curves
|
// eventual UV got from edge p-curves
|
||||||
|
|
||||||
typedef list< list< TopoDS_Edge > > TListOfEdgesList;
|
typedef std::list< std::list< TopoDS_Edge > > TListOfEdgesList;
|
||||||
|
|
||||||
bool sortSameSizeWires (TListOfEdgesList & theWireList,
|
bool sortSameSizeWires (TListOfEdgesList & theWireList,
|
||||||
const TListOfEdgesList::iterator& theFromWire,
|
const TListOfEdgesList::iterator& theFromWire,
|
||||||
const TListOfEdgesList::iterator& theToWire,
|
const TListOfEdgesList::iterator& theToWire,
|
||||||
const int theFirstEdgeID,
|
const int theFirstEdgeID,
|
||||||
list< list< TPoint* > >& theEdgesPointsList );
|
std::list< std::list< TPoint* > >& theEdgesPointsList );
|
||||||
// sort wires in theWireList from theFromWire until theToWire,
|
// sort wires in theWireList from theFromWire until theToWire,
|
||||||
// the wires are set in the order to correspond to the order
|
// the wires are set in the order to correspond to the order
|
||||||
// of boundaries; after sorting, edges in the wires are put
|
// of boundaries; after sorting, edges in the wires are put
|
||||||
@ -352,7 +352,7 @@ private:
|
|||||||
// all functions assure that shapes are indexed so that first go
|
// all functions assure that shapes are indexed so that first go
|
||||||
// ordered vertices, then ordered edge, then faces and maybe a shell
|
// ordered vertices, then ordered edge, then faces and maybe a shell
|
||||||
TopTools_IndexedMapOfOrientedShape myShapeIDMap;
|
TopTools_IndexedMapOfOrientedShape myShapeIDMap;
|
||||||
std::map< int, list< TPoint* > > myShapeIDToPointsMap;
|
std::map< int, std::list< TPoint* > > myShapeIDToPointsMap;
|
||||||
|
|
||||||
// for the 2d case:
|
// for the 2d case:
|
||||||
// nb of key-points in each of pattern boundaries
|
// nb of key-points in each of pattern boundaries
|
||||||
|
@ -75,7 +75,7 @@ class SMESH_EXPORT SMESH_subMesh
|
|||||||
|
|
||||||
SMESH_subMesh *GetFirstToCompute();
|
SMESH_subMesh *GetFirstToCompute();
|
||||||
|
|
||||||
const map < int, SMESH_subMesh * >& DependsOn();
|
const std::map < int, SMESH_subMesh * >& DependsOn();
|
||||||
//const map < int, SMESH_subMesh * >&Dependants();
|
//const map < int, SMESH_subMesh * >&Dependants();
|
||||||
/*!
|
/*!
|
||||||
* \brief Return iterator on the submeshes this one depends on
|
* \brief Return iterator on the submeshes this one depends on
|
||||||
@ -274,7 +274,7 @@ protected:
|
|||||||
SMESH_Mesh * _father;
|
SMESH_Mesh * _father;
|
||||||
int _Id;
|
int _Id;
|
||||||
|
|
||||||
map < int, SMESH_subMesh * >_mapDepend;
|
std::map < int, SMESH_subMesh * >_mapDepend;
|
||||||
bool _dependenceAnalysed;
|
bool _dependenceAnalysed;
|
||||||
|
|
||||||
int _algoState;
|
int _algoState;
|
||||||
|
Loading…
Reference in New Issue
Block a user