Correction compilation on Linux

This commit is contained in:
abd 2008-04-28 06:22:57 +00:00
parent 14a90ed290
commit 80403d0a66
27 changed files with 2283 additions and 1859 deletions

View File

@ -27,12 +27,23 @@ EXTRA_DIST+=SMESH
doxygen=@DOXYGEN@
# Below command replaces "smeshDC" by "smesh" except cases
# "ssmeshDC", "1smeshDC" and "esmeshDC" (these sequences
# can be found in file names and must not be replaces):
#
# sed 's/\([^s1e]\)smeshDC\|^smeshDC/\1smesh/g' $${filen} > ./tmp;
#
usr_docs:
cd ./SMESH; \
echo "Processing smeshDC.py file: "; \
$(doxygen) ./doxyfile_py; \
sed 's|../../../share/salome|$(top_srcdir)|' ./doxyfile > ./doxyfile1; \
mv -f doxyfile1 doxyfile; \
cd ./smeshpy_doc; \
filesl=`find .`; \
for filen in $${filesl}; do \
sed 's/\([^s1e]\)smeshDC\|^smeshDC/\1smesh/g' $${filen} > ./tmp; \
mv -f tmp $${filen}; \
done; \
cd ..; \
echo "Running doxygen in directory: "`pwd`; \
$(doxygen) ./doxyfile;

View File

@ -19,7 +19,7 @@ WARNINGS = YES
INPUT = @srcdir@/input
FILE_PATTERNS = *.doc
IMAGE_PATH = @srcdir@/images
EXAMPLE_PATH = ../../../share/salome/src/SMESH_SWIG
EXAMPLE_PATH = @top_srcdir@/src/SMESH_SWIG
#---------------------------------------------------------------------------
#HTML related options
#---------------------------------------------------------------------------

View File

@ -7,7 +7,7 @@ CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = NO
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = YES
INLINE_INHERITED_MEMB = YES
FULL_PATH_NAMES = NO
@ -38,7 +38,7 @@ HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = YES
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
HIDE_SCOPE_NAMES = YES
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
@ -81,6 +81,7 @@ INPUT = @top_srcdir@/src/SMESH_SWIG
FILE_PATTERNS = smeshDC.py
IMAGE_PATH = @srcdir@/images
RECURSIVE = NO
EXAMPLE_PATH = @top_srcdir@/src/SMESH_SWIG
#---------------------------------------------------------------------------
#HTML related options
@ -107,19 +108,26 @@ GENERATE_RTF = NO
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
#CLASS_DIAGRAMS = YES
CLASS_DIAGRAMS = NO
HIDE_UNDOC_RELATIONS = NO
HAVE_DOT = YES
CLASS_GRAPH = YES
#HAVE_DOT = YES
HAVE_DOT = NO
#CLASS_GRAPH = YES
CLASS_GRAPH = NO
COLLABORATION_GRAPH = NO
GROUP_GRAPHS = NO
UML_LOOK = NO
TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES
#TEMPLATE_RELATIONS = YES
#INCLUDE_GRAPH = YES
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = NO
INCLUDED_BY_GRAPH = NO
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
#GRAPHICAL_HIERARCHY = YES
#DIRECTORY_GRAPH = YES
GRAPHICAL_HIERARCHY = NO
DIRECTORY_GRAPH = NO
DOT_IMAGE_FORMAT = jpg
DOT_PATH =
DOTFILE_DIRS =

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

@ -34,6 +34,12 @@ become the elements of Group1 on the Compound_Mesh, or</li>
becomes Group1_2. See \ref grouping_elements_page "Creating Groups"
for more information about groups.</li>
</ul>
<li><b>Create common groups for initial meshes</b> checkbox permits to
automatically create groups of all elements of the same type
(nodes, edges, faces and volumes) for the resulting mesh from the
elements
of the initial meshes.
</li>
<li>You can simply unite meshes or choose to <b>Merge coincident nodes
and elements</b>, in which case it is possible to define the \b Tolerance
for this operation.</li>
@ -43,4 +49,4 @@ for this operation.</li>
\image html image160.gif
*/
*/

View File

@ -5,6 +5,37 @@
\n Python package smesh defines several classes, destined for easy and
clear mesh creation and edition (see the \ref introduction_to_mesh_python_page "example").
\n Also, please see \ref smeshDC "documentation for smesh.py"
\n Please draw your attention to the below notes before address to
the \ref smeshDC "documentation for smesh.py"
*/
\n 1. The main page of the \ref smeshDC "documentation for smesh.py"
contains a list of data structures and a list of functions,
provided by the package smesh.py. The first item in the data
structures list (\ref smeshDC::smeshDC "class smesh") also
represents documentation for methods of the package smesh.py itself.
\n 2. Package smesh.py gives interface to create and manage
meshes. Please, use it to create an empty mesh or to import
it from data file.
\n 3. Once you have created a mesh, you can manage it via its own
methods. See \ref smeshDC::Mesh "class Mesh" documentation for
them (it is also accessible by the second item "class Mesh" in the
data structures list).
\n 4. Class Mesh allows to assign algorithms to a mesh.
\n \t Please note, that there are always available some algorithms,
included in standard Salome installation:
- REGULAR(1D), COMPOSITE(1D), MEFISTO(2D), Quadrangle(2D), Hexa(3D), etc.
\n Also there are some algorithms, which can be installed optionally,
\n some of them are based on open-source meshers:
- NETGEN(1D-2D,2D,1D-2D-3D,3D),
\n others are based on commercial meshers:
- GHS3D(3D).
\n \t To add hypotheses, please use interfaces, provided by the
assigned algorithms.
*/

View File

@ -275,6 +275,20 @@ module SMESH
in double theMergeTolerance)
raises ( SALOME::SALOME_Exception );
/*!
* Concatenate the given meshes into one mesh.
* Union groups with the same name and type if
* theUniteIdenticalGroups flag is true.
* Merge coincident nodes and elements if
* theMergeNodesAndElements flag is true.
* Create the groups of all elements from initial meshes.
*/
SMESH_Mesh ConcatenateWithGroups(in mesh_array theMeshesArray,
in boolean theUniteIdenticalGroups,
in boolean theMergeNodesAndElements,
in double theMergeTolerance)
raises ( SALOME::SALOME_Exception );
/*!
* \brief Return id of object, registered in current study context
*

View File

@ -283,6 +283,14 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
// PAL16857(SMESH not conform to the MED convention):
if ( aMeshDimension == 2 && anIsZDimension ) // 2D only if mesh is in XOY plane
aMeshDimension = 3;
// PAL18941(a saved study with a mesh belong Z is opened and the mesh is belong X)
if ( aMeshDimension == 1 && !anIsXDimension ) // 1D only if mesh is along OX
if ( anIsYDimension ) {
aMeshDimension = 2;
anIsXDimension = true;
} else {
aMeshDimension = 3;
}
}
SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator();

View File

@ -2,6 +2,7 @@
// Created : Mon Sep 24 18:32:41 2007
// Author : Edward AGAPOV (eap)
using namespace std;
#ifndef SMDS_MeshInfo_HeaderFile
#define SMDS_MeshInfo_HeaderFile

View File

@ -21,6 +21,8 @@
// Created : Mon Aug 2 10:30:00 2004
// Author : Edward AGAPOV (eap)
using namespace std;
#include "SMESH_Block.hxx"
#include <BRepAdaptor_Curve.hxx>

View File

@ -27,6 +27,8 @@
// Author : Nicolas Geimer & Aurélien Motteux (OCC)
// Module : SMESH
using namespace std;
#ifndef _SMESH_OCTREENODE_HXX_
#define _SMESH_OCTREENODE_HXX_

View File

@ -21,6 +21,8 @@
// Created : Mon Aug 2 10:30:00 2004
// Author : Edward AGAPOV (eap)
using namespace std;
#include "SMESH_Pattern.hxx"
#include <BRepAdaptor_Curve.hxx>

View File

@ -21,6 +21,8 @@
// Created : Mon Aug 2 10:30:00 2004
// Author : Edward AGAPOV (eap)
using namespace std;
#ifndef SMESH_Pattern_HeaderFile
#define SMESH_Pattern_HeaderFile

View File

@ -150,17 +150,21 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule)
ComboBoxUnion = new QComboBox(GroupArgs, "ComboBoxUnion");
GroupArgsLayout->addMultiCellWidget(ComboBoxUnion, 1, 1, 3, 3);
CheckBoxCommon = new QCheckBox(GroupArgs, "CheckBoxCommon");
CheckBoxCommon->setText(tr("CREATE_COMMON_GROUPS" ));
GroupArgsLayout->addMultiCellWidget(CheckBoxCommon, 2, 2, 0, 3);
CheckBoxMerge = new QCheckBox(GroupArgs, "CheckBoxMerge");
CheckBoxMerge->setText(tr("MERGE_NODES_AND_ELEMENTS" ));
GroupArgsLayout->addMultiCellWidget(CheckBoxMerge, 2, 2, 0, 3);
GroupArgsLayout->addMultiCellWidget(CheckBoxMerge, 3, 3, 0, 3);
TextLabelTol = new QLabel (GroupArgs, "TextLabelTol");
TextLabelTol->setText(tr("SMESH_TOLERANCE"));
TextLabelTol->setAlignment(Qt::AlignCenter);
GroupArgsLayout->addMultiCellWidget(TextLabelTol, 3, 3, 0, 1);
GroupArgsLayout->addMultiCellWidget(TextLabelTol, 4, 4, 0, 1);
SpinBoxTol = new SMESHGUI_SpinBox (GroupArgs, "SpinBoxTol");
SpinBoxTol->RangeStepAndValidator(0.0, COORD_MAX, 0.1, 6);
GroupArgsLayout->addMultiCellWidget(SpinBoxTol, 3, 3, 2, 3);
GroupArgsLayout->addMultiCellWidget(SpinBoxTol, 4, 4, 2, 3);
SMESHGUI_BuildCompoundDlgLayout->addWidget(GroupArgs, 2, 0);
@ -313,12 +317,18 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen();
// concatenate meshes
SMESH::SMESH_Mesh_var aCompoundMesh =
aSMESHGen->Concatenate(myMeshArray,
!(ComboBoxUnion->currentItem()),
CheckBoxMerge->isChecked(),
SpinBoxTol->GetValue());
SMESH::SMESH_Mesh_var aCompoundMesh;
if(CheckBoxCommon->isChecked())
aCompoundMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray,
!(ComboBoxUnion->currentItem()),
CheckBoxMerge->isChecked(),
SpinBoxTol->GetValue());
else
aCompoundMesh = aSMESHGen->Concatenate(myMeshArray,
!(ComboBoxUnion->currentItem()),
CheckBoxMerge->isChecked(),
SpinBoxTol->GetValue());
SMESH::SetName( SMESH::FindSObject( aCompoundMesh ), LineEditName->text().latin1() );
QApplication::restoreOverrideCursor();
mySMESHGUI->updateObjBrowser();

View File

@ -108,6 +108,7 @@ public :
QLineEdit* LineEditMeshes;
QLabel* TextLabelUnion;
QComboBox* ComboBoxUnion;
QCheckBox* CheckBoxCommon;
QCheckBox* CheckBoxMerge;
QLabel* TextLabelTol;
SMESHGUI_SpinBox* SpinBoxTol;

View File

@ -18,6 +18,8 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
using namespace std;
#ifndef SMESHGUI_EditMeshDlg_H
#define SMESHGUI_EditMeshDlg_H

View File

@ -17,6 +17,8 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
using namespace std;
#ifndef SMESHGUI_VTKUtils_HeaderFile
#define SMESHGUI_VTKUtils_HeaderFile

View File

@ -338,7 +338,8 @@ void _pyGen::Process( const Handle(_pyCommand)& theCommand )
}
// Concatenate( [mesh1, ...], ... )
if ( theCommand->GetMethod() == "Concatenate" )
if ( theCommand->GetMethod() == "Concatenate" ||
theCommand->GetMethod() == "ConcatenateWithGroups")
{
AddMeshAccessorMethod( theCommand );
}

View File

@ -1418,6 +1418,52 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::Concatenate(const SMESH::mesh_array& theMeshe
CORBA::Boolean theMergeNodesAndElements,
CORBA::Double theMergeTolerance)
throw ( SALOME::SALOME_Exception )
{
return ConcatenateCommon(theMeshesArray,
theUniteIdenticalGroups,
theMergeNodesAndElements,
theMergeTolerance,
false);
}
//================================================================================
/*!
* SMESH_Gen_i::ConcatenateWithGroups
*
* Concatenate the given meshes into one mesh
* Create the groups of all elements from initial meshes
*/
//================================================================================
SMESH::SMESH_Mesh_ptr
SMESH_Gen_i::ConcatenateWithGroups(const SMESH::mesh_array& theMeshesArray,
CORBA::Boolean theUniteIdenticalGroups,
CORBA::Boolean theMergeNodesAndElements,
CORBA::Double theMergeTolerance)
throw ( SALOME::SALOME_Exception )
{
return ConcatenateCommon(theMeshesArray,
theUniteIdenticalGroups,
theMergeNodesAndElements,
theMergeTolerance,
true);
}
//================================================================================
/*!
* SMESH_Gen_i::ConcatenateCommon
*
* Concatenate the given meshes into one mesh
*/
//================================================================================
SMESH::SMESH_Mesh_ptr
SMESH_Gen_i::ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
CORBA::Boolean theUniteIdenticalGroups,
CORBA::Boolean theMergeNodesAndElements,
CORBA::Double theMergeTolerance,
CORBA::Boolean theCommonGroups)
throw ( SALOME::SALOME_Exception )
{
typedef map<int, int> TIDsMap;
typedef list<SMESH::SMESH_Group_var> TListOfNewGroups;
@ -1458,6 +1504,23 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::Concatenate(const SMESH::mesh_array& theMeshe
const SMDS_MeshElement* aNewElem = 0;
int anElemNbNodes = 0;
int anNbNodes = 0;
int anNbEdges = 0;
int anNbFaces = 0;
int anNbVolumes = 0;
SMESH::long_array_var anIDsNodes = new SMESH::long_array();
SMESH::long_array_var anIDsEdges = new SMESH::long_array();
SMESH::long_array_var anIDsFaces = new SMESH::long_array();
SMESH::long_array_var anIDsVolumes = new SMESH::long_array();
if( theCommonGroups ) {
anIDsNodes->length( anInitMeshDS->NbNodes() );
anIDsEdges->length( anInitMeshDS->NbEdges() );
anIDsFaces->length( anInitMeshDS->NbFaces() );
anIDsVolumes->length( anInitMeshDS->NbVolumes() );
}
for ( int j = 0; itElems->more(); j++) {
anElem = itElems->next();
SMDSAbs_ElementType anElemType = anElem->GetType();
@ -1474,6 +1537,8 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::Concatenate(const SMESH::mesh_array& theMeshe
if ( nodesMap.find(aNode->GetID()) == nodesMap.end() ) {
aNewNode = aNewMeshDS->AddNode(aNode->X(), aNode->Y(), aNode->Z());
nodesMap.insert( make_pair(aNode->GetID(), aNewNode->GetID()) );
if( theCommonGroups )
anIDsNodes[anNbNodes++] = aNewNode->GetID();
}
else
aNewNode = aNewMeshDS->FindNode( nodesMap.find(aNode->GetID())->second );
@ -1489,6 +1554,8 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::Concatenate(const SMESH::mesh_array& theMeshe
aNewElem = aNewMeshDS->AddPolyhedralVolume(aNodesArray,
aVolume->GetQuanities());
elemsMap.insert(make_pair(anElem->GetID(), aNewElem->GetID()));
if( theCommonGroups )
anIDsVolumes[anNbVolumes++] = aNewElem->GetID();
}
}
else {
@ -1497,6 +1564,14 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::Concatenate(const SMESH::mesh_array& theMeshe
anElemType,
anElem->IsPoly());
elemsMap.insert(make_pair(anElem->GetID(), aNewElem->GetID()));
if( theCommonGroups ) {
if( anElemType == SMDSAbs_Edge )
anIDsEdges[anNbEdges++] = aNewElem->GetID();
else if( anElemType == SMDSAbs_Face )
anIDsFaces[anNbFaces++] = aNewElem->GetID();
else if( anElemType == SMDSAbs_Volume )
anIDsVolumes[anNbVolumes++] = aNewElem->GetID();
}
}
}//elems loop
@ -1507,12 +1582,81 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::Concatenate(const SMESH::mesh_array& theMeshe
SMESH::long_array_var anInitIDs = new SMESH::long_array();
SMESH::long_array_var anNewIDs = new SMESH::long_array();
SMESH::SMESH_Group_var aNewGroup;
SMESH::ElementType aGroupType;
CORBA::String_var aGroupName;
if ( theCommonGroups ) {
for(aGroupType=SMESH::NODE;aGroupType<=SMESH::VOLUME;aGroupType=(SMESH::ElementType)(aGroupType+1)) {
string str = "Gr";
SALOMEDS::SObject_var aMeshSObj = ObjectToSObject( myCurrentStudy, anInitMesh );
if(aMeshSObj)
str += aMeshSObj->GetName();
str += "_";
int anLen = 0;
switch(aGroupType) {
case SMESH::NODE:
str += "Nodes";
anIDsNodes->length(anNbNodes);
anLen = anNbNodes;
break;
case SMESH::EDGE:
str += "Edges";
anIDsEdges->length(anNbEdges);
anLen = anNbEdges;
break;
case SMESH::FACE:
str += "Faces";
anIDsFaces->length(anNbFaces);
anLen = anNbFaces;
break;
case SMESH::VOLUME:
str += "Volumes";
anIDsVolumes->length(anNbVolumes);
anLen = anNbVolumes;
break;
default:
break;
}
if(anLen) {
aGroupName = str.c_str();
// add a new group in the mesh
aNewGroup = aNewImpl->CreateGroup(aGroupType, aGroupName);
switch(aGroupType) {
case SMESH::NODE:
aNewGroup->Add( anIDsNodes );
break;
case SMESH::EDGE:
aNewGroup->Add( anIDsEdges );
break;
case SMESH::FACE:
aNewGroup->Add( anIDsFaces );
break;
case SMESH::VOLUME:
aNewGroup->Add( anIDsVolumes );
break;
default:
break;
}
aListOfNewGroups.clear();
aListOfNewGroups.push_back(aNewGroup);
aGroupsMap.insert(make_pair( make_pair(aGroupName, aGroupType), aListOfNewGroups ));
}
}
}
// check that current group name and type don't have identical ones in union mesh
for (int i = 0; i < aListOfGroups->length(); i++) {
aGroup = aListOfGroups[i];
aListOfNewGroups.clear();
SMESH::ElementType aGroupType = aGroup->GetType();
CORBA::String_var aGroupName = aGroup->GetName();
aGroupType = aGroup->GetType();
aGroupName = aGroup->GetName();
TGroupsMap::iterator anIter = aGroupsMap.find(make_pair(aGroupName, aGroupType));
// convert a list of IDs
@ -1579,7 +1723,11 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::Concatenate(const SMESH::mesh_array& theMeshe
}
// Update Python script
aPythonDump << aNewMesh << " = " << this << ".Concatenate(";
aPythonDump << aNewMesh << " = " << this;
if( !theCommonGroups )
aPythonDump << ".Concatenate(";
else
aPythonDump << ".ConcatenateWithGroups(";
aPythonDump << "[";
for ( int i = 0; i < theMeshesArray.length(); i++) {
if (i > 0) aPythonDump << ", ";
@ -1587,7 +1735,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::Concatenate(const SMESH::mesh_array& theMeshe
}
aPythonDump << "], ";
aPythonDump << theUniteIdenticalGroups << ", "
<< theMergeNodesAndElements << ", "
<< theMergeNodesAndElements << ", "
<< theMergeTolerance << ")";
return aNewMesh._retn();

View File

@ -259,6 +259,14 @@ public:
CORBA::Long theElementID)
throw ( SALOME::SALOME_Exception );
// Concatenate the given meshes into one mesh
SMESH::SMESH_Mesh_ptr ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
CORBA::Boolean theUniteIdenticalGroups,
CORBA::Boolean theMergeNodesAndElements,
CORBA::Double theMergeTolerance,
CORBA::Boolean theCommonGroups)
throw ( SALOME::SALOME_Exception );
// Concatenate the given meshes into one mesh
SMESH::SMESH_Mesh_ptr Concatenate(const SMESH::mesh_array& theMeshesArray,
CORBA::Boolean theUniteIdenticalGroups,
@ -266,6 +274,13 @@ public:
CORBA::Double theMergeTolerance)
throw ( SALOME::SALOME_Exception );
// Concatenate the given meshes into one mesh
// Create the groups of all elements from initial meshes
SMESH::SMESH_Mesh_ptr ConcatenateWithGroups(const SMESH::mesh_array& theMeshesArray,
CORBA::Boolean theUniteIdenticalGroups,
CORBA::Boolean theMergeNodesAndElements,
CORBA::Double theMergeTolerance)
throw ( SALOME::SALOME_Exception );
// ****************************************************
// Interface inherited methods (from SALOMEDS::Driver)

View File

@ -1946,12 +1946,12 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID, CO
SMESHDS_SubMesh* SDSM = SM->GetSubMeshDS();
if(!SDSM) return aResult._retn();
map<int,const SMDS_MeshElement*> theElems;
if( !all || (SDSM->NbElements()==0 && SDSM->NbNodes()==1) ) {
set<int> theElems;
if( !all || (SDSM->NbElements()==0) ) { // internal nodes or vertex submesh
SMDS_NodeIteratorPtr nIt = SDSM->GetNodes();
while ( nIt->more() ) {
const SMDS_MeshNode* elem = nIt->next();
theElems.insert( make_pair(elem->GetID(),elem) );
theElems.insert( elem->GetID() );
}
}
else { // all nodes of submesh elements
@ -1961,16 +1961,16 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID, CO
SMDS_ElemIteratorPtr nIt = anElem->nodesIterator();
while ( nIt->more() ) {
const SMDS_MeshElement* elem = nIt->next();
theElems.insert( make_pair(elem->GetID(),elem) );
theElems.insert( elem->GetID() );
}
}
}
aResult->length(theElems.size());
map<int, const SMDS_MeshElement * >::iterator itElem;
set<int>::iterator itElem;
int i = 0;
for ( itElem = theElems.begin(); itElem != theElems.end(); itElem++ )
aResult[i++] = (*itElem).first;
aResult[i++] = *itElem;
return aResult._retn();
}

File diff suppressed because it is too large Load Diff

View File

@ -29,6 +29,8 @@
#ifndef _STD_MESHERS_DISTRIBUTION_HXX_
#define _STD_MESHERS_DISTRIBUTION_HXX_
using namespace std;
#include "SMESH_StdMeshers.hxx"
#include <vector>

View File

@ -24,6 +24,8 @@
// File : StdMeshers_Penta_3D.cxx
// Module : SMESH
using namespace std;
#include "StdMeshers_Penta_3D.hxx"
#include "utilities.h"

View File

@ -25,6 +25,7 @@
// Created : Fri Oct 27 10:24:28 2006
// Author : Edward AGAPOV (eap)
using namespace std;
#include "StdMeshers_ProjectionUtils.hxx"

View File

@ -191,10 +191,8 @@ namespace {
{
// old nodes are shared by edges and new ones are shared
// only by faces created by mapper
bool isOld = false;
SMDS_ElemIteratorPtr invElem = node->GetInverseElementIterator();
while ( !isOld && invElem->more() )
isOld = ( invElem->next()->GetType() == SMDSAbs_Edge );
SMDS_ElemIteratorPtr invEdge = node->GetInverseElementIterator(SMDSAbs_Edge);
bool isOld = invEdge->more();
return isOld;
}
@ -212,12 +210,13 @@ namespace {
MeshCleaner( SMESH_subMesh* faceSubMesh ): sm(faceSubMesh) {}
~MeshCleaner() { Clean(sm); }
void Release() { sm = 0; } // mesh will not be removed
static void Clean( SMESH_subMesh* sm )
static void Clean( SMESH_subMesh* sm, bool withSub=true )
{
if ( !sm ) return;
switch ( sm->GetSubShape().ShapeType() ) {
case TopAbs_VERTEX:
case TopAbs_EDGE: {
// PAL16567, 18920. Remove face nodes as well
// switch ( sm->GetSubShape().ShapeType() ) {
// case TopAbs_VERTEX:
// case TopAbs_EDGE: {
SMDS_NodeIteratorPtr nIt = sm->GetSubMeshDS()->GetNodes();
SMESHDS_Mesh* mesh = sm->GetFather()->GetMeshDS();
while ( nIt->more() ) {
@ -226,12 +225,13 @@ namespace {
mesh->RemoveNode( node );
}
// do not break but iterate over DependsOn()
}
default:
// }
// default:
if ( !withSub ) return;
SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator(false,false);
while ( smIt->more() )
Clean( smIt->next() );
}
Clean( smIt->next(), false );
// }
}
};
@ -474,7 +474,7 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
// it will remove mesh built by pattern mapper on edges and vertices
// in failure case
// MeshCleaner cleaner( tgtSubMesh );
MeshCleaner cleaner( tgtSubMesh );
// -------------------------------------------------------------------------
// mapper doesn't take care of nodes already existing on edges and vertices,
@ -617,7 +617,7 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
}
}
//cleaner.Release(); // do not remove mesh
cleaner.Release(); // do not remove mesh
return true;
}

View File

@ -18,6 +18,8 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
using namespace std;
#include "StdMeshersGUI_DistrPreview.h"
#include <Expr_NamedUnknown.hxx>