mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-15 21:03:07 +05:00
Fix compilation warnings
This commit is contained in:
parent
b159d92e9d
commit
add84232c6
@ -44,12 +44,9 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
|
|||||||
|
|
||||||
int intNumMaille, Degre;
|
int intNumMaille, Degre;
|
||||||
int ValElement;
|
int ValElement;
|
||||||
int ValDegre;
|
|
||||||
int NoeudsMaille[20];
|
int NoeudsMaille[20];
|
||||||
int NoeudMaille;
|
int NoeudMaille;
|
||||||
|
|
||||||
bool ok;
|
|
||||||
|
|
||||||
MESSAGE("in DriverDAT_R_SMDS_Mesh::Read()");
|
MESSAGE("in DriverDAT_R_SMDS_Mesh::Read()");
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* OUVERTURE DU FICHIER EN LECTURE *
|
* OUVERTURE DU FICHIER EN LECTURE *
|
||||||
@ -72,7 +69,7 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
|
|||||||
|
|
||||||
for (i = 0; i < nbNodes; i++){
|
for (i = 0; i < nbNodes; i++){
|
||||||
fscanf(aFileId, "%d %e %e %e\n", &intNumPoint, &coordX, &coordY, &coordZ);
|
fscanf(aFileId, "%d %e %e %e\n", &intNumPoint, &coordX, &coordY, &coordZ);
|
||||||
ok = myMesh->AddNodeWithID(coordX, coordY, coordZ, intNumPoint);
|
myMesh->AddNodeWithID(coordX, coordY, coordZ, intNumPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stdout, "%d noeuds\n", myMesh->NbNodes());
|
fprintf(stdout, "%d noeuds\n", myMesh->NbNodes());
|
||||||
@ -100,29 +97,25 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
|
|||||||
switch (ValElement) {
|
switch (ValElement) {
|
||||||
case 102:
|
case 102:
|
||||||
case 103:
|
case 103:
|
||||||
ValDegre = 3;
|
|
||||||
nbNoeuds = 2;
|
nbNoeuds = 2;
|
||||||
ok = myMesh->AddEdgeWithID(NoeudsMaille[0], NoeudsMaille[1],
|
myMesh->AddEdgeWithID(NoeudsMaille[0], NoeudsMaille[1],
|
||||||
intNumMaille);
|
intNumMaille);
|
||||||
break;
|
break;
|
||||||
case 204:
|
case 204:
|
||||||
case 208:
|
case 208:
|
||||||
ValDegre = 9;
|
|
||||||
nbNoeuds = 4;
|
nbNoeuds = 4;
|
||||||
ok = myMesh->AddFaceWithID(NoeudsMaille[0], NoeudsMaille[1],
|
myMesh->AddFaceWithID(NoeudsMaille[0], NoeudsMaille[1],
|
||||||
NoeudsMaille[2], NoeudsMaille[3],
|
NoeudsMaille[2], NoeudsMaille[3],
|
||||||
intNumMaille);
|
intNumMaille);
|
||||||
break;
|
break;
|
||||||
case 203:
|
case 203:
|
||||||
case 206:
|
case 206:
|
||||||
ValDegre = 5;
|
|
||||||
nbNoeuds = 3;
|
nbNoeuds = 3;
|
||||||
ok = myMesh->AddFaceWithID(NoeudsMaille[0], NoeudsMaille[1],
|
myMesh->AddFaceWithID(NoeudsMaille[0], NoeudsMaille[1],
|
||||||
NoeudsMaille[2], intNumMaille);
|
NoeudsMaille[2], intNumMaille);
|
||||||
break;
|
break;
|
||||||
case 308:
|
case 308:
|
||||||
case 320:
|
case 320:
|
||||||
ValDegre = 12;
|
|
||||||
nbNoeuds = 8;
|
nbNoeuds = 8;
|
||||||
if (ValElement == 320){
|
if (ValElement == 320){
|
||||||
//A voir, correspondance VTK
|
//A voir, correspondance VTK
|
||||||
@ -131,7 +124,7 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
|
|||||||
NoeudsMaille[6] = NoeudsMaille[10];
|
NoeudsMaille[6] = NoeudsMaille[10];
|
||||||
NoeudsMaille[7] = NoeudsMaille[11];
|
NoeudsMaille[7] = NoeudsMaille[11];
|
||||||
}
|
}
|
||||||
ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
|
myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
|
||||||
NoeudsMaille[2], NoeudsMaille[3],
|
NoeudsMaille[2], NoeudsMaille[3],
|
||||||
NoeudsMaille[4], NoeudsMaille[5],
|
NoeudsMaille[4], NoeudsMaille[5],
|
||||||
NoeudsMaille[6], NoeudsMaille[7],
|
NoeudsMaille[6], NoeudsMaille[7],
|
||||||
@ -139,17 +132,15 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
|
|||||||
break;
|
break;
|
||||||
case 304:
|
case 304:
|
||||||
case 310:
|
case 310:
|
||||||
ValDegre = 10;
|
|
||||||
nbNoeuds = 4;
|
nbNoeuds = 4;
|
||||||
if (ValElement == 310)
|
if (ValElement == 310)
|
||||||
NoeudsMaille[3] = NoeudsMaille[6];
|
NoeudsMaille[3] = NoeudsMaille[6];
|
||||||
ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
|
myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
|
||||||
NoeudsMaille[2], NoeudsMaille[3],
|
NoeudsMaille[2], NoeudsMaille[3],
|
||||||
intNumMaille);
|
intNumMaille);
|
||||||
break;
|
break;
|
||||||
case 306:
|
case 306:
|
||||||
case 315:
|
case 315:
|
||||||
ValDegre = 12;
|
|
||||||
nbNoeuds = 8;
|
nbNoeuds = 8;
|
||||||
if (ValElement == 315) {
|
if (ValElement == 315) {
|
||||||
NoeudsMaille[3] = NoeudsMaille[6];
|
NoeudsMaille[3] = NoeudsMaille[6];
|
||||||
@ -161,7 +152,7 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
|
|||||||
NoeudsMaille[5] = NoeudsMaille[4];
|
NoeudsMaille[5] = NoeudsMaille[4];
|
||||||
NoeudsMaille[4] = NoeudsMaille[3];
|
NoeudsMaille[4] = NoeudsMaille[3];
|
||||||
NoeudsMaille[3] = NoeudsMaille[2];
|
NoeudsMaille[3] = NoeudsMaille[2];
|
||||||
ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
|
myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
|
||||||
NoeudsMaille[2], NoeudsMaille[3],
|
NoeudsMaille[2], NoeudsMaille[3],
|
||||||
NoeudsMaille[4], NoeudsMaille[5],
|
NoeudsMaille[4], NoeudsMaille[5],
|
||||||
intNumMaille);
|
intNumMaille);
|
||||||
|
@ -280,8 +280,8 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if(!anElement)
|
if(!anElement)
|
||||||
// MESSAGE("DriverUNV_R_SMDS_Mesh::Perform - can not add element with ID = "<<aLabel<<" and type = "<<aRec.fe_descriptor_id);
|
MESSAGE("DriverUNV_R_SMDS_Mesh::Perform - can not add element with ID = "<<aLabel<<" and type = "<<aRec.fe_descriptor_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -141,7 +141,7 @@ void aptrte( Z nutysu, R aretmx,
|
|||||||
//no st1, st2, st3, 0 (non quadrangle)
|
//no st1, st2, st3, 0 (non quadrangle)
|
||||||
|
|
||||||
R d, tcpu=0;
|
R d, tcpu=0;
|
||||||
R3 direction=R3(0,0,0); //direction pour areteideale() inactive ici!
|
// R3 direction=R3(0,0,0); //direction pour areteideale() inactive ici!
|
||||||
Z nbarfr=nudslf[nblf]; //nombre total d'aretes des lignes fermees
|
Z nbarfr=nudslf[nblf]; //nombre total d'aretes des lignes fermees
|
||||||
Z mxtrou = Max( 1024, nblf ); //nombre maximal de trous dans la surface
|
Z mxtrou = Max( 1024, nblf ); //nombre maximal de trous dans la surface
|
||||||
|
|
||||||
|
@ -42,11 +42,11 @@
|
|||||||
#include <vtkXMLUnstructuredGridWriter.h>
|
#include <vtkXMLUnstructuredGridWriter.h>
|
||||||
#include <vtkUnstructuredGridWriter.h>
|
#include <vtkUnstructuredGridWriter.h>
|
||||||
|
|
||||||
#ifdef _DEBUG_
|
//#ifdef _DEBUG_
|
||||||
static int MYDEBUG = 1;
|
//static int MYDEBUG = 1;
|
||||||
#else
|
//#else
|
||||||
static int MYDEBUG = 0;
|
//static int MYDEBUG = 0;
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
namespace SMESH
|
namespace SMESH
|
||||||
{
|
{
|
||||||
|
@ -35,11 +35,11 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#ifdef _DEBUG_
|
//#ifdef _DEBUG_
|
||||||
static int MYDEBUG = 0;
|
//static int MYDEBUG = 0;
|
||||||
#else
|
//#else
|
||||||
static int MYDEBUG = 0;
|
//static int MYDEBUG = 0;
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined __GNUC__
|
||||||
#if __GNUC__ == 2
|
#if __GNUC__ == 2
|
||||||
|
@ -800,7 +800,6 @@ void SMDS_Down3D::getNodeIds(int cellId, std::set<int>& nodeSet)
|
|||||||
int SMDS_Down3D::FindFaceByNodes(int cellId, ElemByNodesType& faceByNodes)
|
int SMDS_Down3D::FindFaceByNodes(int cellId, ElemByNodesType& faceByNodes)
|
||||||
{
|
{
|
||||||
int *faces = &_cellIds[_nbDownCells * cellId];
|
int *faces = &_cellIds[_nbDownCells * cellId];
|
||||||
int faceNodeSet[10];
|
|
||||||
int npoints = 0;
|
int npoints = 0;
|
||||||
|
|
||||||
for (int i = 0; i < _nbDownCells; i++)
|
for (int i = 0; i < _nbDownCells; i++)
|
||||||
@ -808,11 +807,7 @@ int SMDS_Down3D::FindFaceByNodes(int cellId, ElemByNodesType& faceByNodes)
|
|||||||
if ((faces[i] >= 0) && (faceByNodes.vtkType == _cellTypes[i]))
|
if ((faces[i] >= 0) && (faceByNodes.vtkType == _cellTypes[i]))
|
||||||
{
|
{
|
||||||
if (npoints == 0)
|
if (npoints == 0)
|
||||||
{
|
|
||||||
for (int j = 0; j < faceByNodes.nbNodes; j++)
|
|
||||||
faceNodeSet[j] = faceByNodes.nodeIds[j];
|
|
||||||
npoints = faceByNodes.nbNodes;
|
npoints = faceByNodes.nbNodes;
|
||||||
}
|
|
||||||
|
|
||||||
int nodeSet[10];
|
int nodeSet[10];
|
||||||
int npts = this->_grid->getDownArray(faceByNodes.vtkType)->getNodeSet(faces[i], nodeSet);
|
int npts = this->_grid->getDownArray(faceByNodes.vtkType)->getNodeSet(faces[i], nodeSet);
|
||||||
|
@ -762,7 +762,6 @@ int SMDS_UnstructuredGrid::GetParentVolumes(int* volVtkIds, int vtkId)
|
|||||||
int vtkType = this->GetCellType(vtkId);
|
int vtkType = this->GetCellType(vtkId);
|
||||||
int dim = SMDS_Downward::getCellDimension(vtkType);
|
int dim = SMDS_Downward::getCellDimension(vtkType);
|
||||||
int nbFaces = 0;
|
int nbFaces = 0;
|
||||||
int faces[1000];
|
|
||||||
unsigned char cellTypes[1000];
|
unsigned char cellTypes[1000];
|
||||||
int downCellId[1000];
|
int downCellId[1000];
|
||||||
if (dim == 1)
|
if (dim == 1)
|
||||||
@ -778,7 +777,6 @@ int SMDS_UnstructuredGrid::GetParentVolumes(int* volVtkIds, int vtkId)
|
|||||||
const unsigned char* upTypes = _downArray[vtkType]->getUpTypes(downId);
|
const unsigned char* upTypes = _downArray[vtkType]->getUpTypes(downId);
|
||||||
for (int i=0; i< nbFaces; i++)
|
for (int i=0; i< nbFaces; i++)
|
||||||
{
|
{
|
||||||
faces[i] = _downArray[upTypes[i]]->getVtkCellId(upCells[i]);
|
|
||||||
cellTypes[i] = upTypes[i];
|
cellTypes[i] = upTypes[i];
|
||||||
downCellId[i] = upCells[i];
|
downCellId[i] = upCells[i];
|
||||||
}
|
}
|
||||||
@ -786,7 +784,6 @@ int SMDS_UnstructuredGrid::GetParentVolumes(int* volVtkIds, int vtkId)
|
|||||||
else if (dim == 2)
|
else if (dim == 2)
|
||||||
{
|
{
|
||||||
nbFaces = 1;
|
nbFaces = 1;
|
||||||
faces[0] = vtkId;
|
|
||||||
cellTypes[0] = this->GetCellType(vtkId);
|
cellTypes[0] = this->GetCellType(vtkId);
|
||||||
int downId = this->CellIdToDownId(vtkId);
|
int downId = this->CellIdToDownId(vtkId);
|
||||||
if (downId < 0)
|
if (downId < 0)
|
||||||
@ -826,7 +823,6 @@ int SMDS_UnstructuredGrid::GetParentVolumes(int* volVtkIds, int downId, unsigned
|
|||||||
int vtkType = downType;
|
int vtkType = downType;
|
||||||
int dim = SMDS_Downward::getCellDimension(vtkType);
|
int dim = SMDS_Downward::getCellDimension(vtkType);
|
||||||
int nbFaces = 0;
|
int nbFaces = 0;
|
||||||
int faces[1000];
|
|
||||||
unsigned char cellTypes[1000];
|
unsigned char cellTypes[1000];
|
||||||
int downCellId[1000];
|
int downCellId[1000];
|
||||||
if (dim == 1)
|
if (dim == 1)
|
||||||
@ -836,7 +832,6 @@ int SMDS_UnstructuredGrid::GetParentVolumes(int* volVtkIds, int downId, unsigned
|
|||||||
const unsigned char* upTypes = _downArray[vtkType]->getUpTypes(downId);
|
const unsigned char* upTypes = _downArray[vtkType]->getUpTypes(downId);
|
||||||
for (int i=0; i< nbFaces; i++)
|
for (int i=0; i< nbFaces; i++)
|
||||||
{
|
{
|
||||||
faces[i] = _downArray[upTypes[i]]->getVtkCellId(upCells[i]);
|
|
||||||
cellTypes[i] = upTypes[i];
|
cellTypes[i] = upTypes[i];
|
||||||
downCellId[i] = upCells[i];
|
downCellId[i] = upCells[i];
|
||||||
}
|
}
|
||||||
|
@ -1188,11 +1188,13 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index,
|
|||||||
if ( minInd >= firstMediumInd )
|
if ( minInd >= firstMediumInd )
|
||||||
return false; // medium nodes are not linked
|
return false; // medium nodes are not linked
|
||||||
if ( maxInd < firstMediumInd ) // both nodes are corners
|
if ( maxInd < firstMediumInd ) // both nodes are corners
|
||||||
|
{
|
||||||
if ( theIgnoreMediumNodes )
|
if ( theIgnoreMediumNodes )
|
||||||
type = SMDSAbs_EntityType( int(type)-1 ); // check linkage of corner nodes
|
type = SMDSAbs_EntityType( int(type)-1 ); // check linkage of corner nodes
|
||||||
else
|
else
|
||||||
return false; // corner nodes are not linked directly in a quadratic cell
|
return false; // corner nodes are not linked directly in a quadratic cell
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch ( type ) {
|
switch ( type ) {
|
||||||
case SMDSEntity_Tetra:
|
case SMDSEntity_Tetra:
|
||||||
|
@ -1132,26 +1132,13 @@ bool SMESH_MeshEditor::QuadToTri (TIDSortedElemSet & theElems,
|
|||||||
myLastCreatedNodes.Append(newN);
|
myLastCreatedNodes.Append(newN);
|
||||||
|
|
||||||
// create a new element
|
// create a new element
|
||||||
const SMDS_MeshNode* N[6];
|
|
||||||
if ( aBadRate1 <= aBadRate2 ) {
|
if ( aBadRate1 <= aBadRate2 ) {
|
||||||
N[0] = aNodes[0];
|
|
||||||
N[1] = aNodes[1];
|
|
||||||
N[2] = aNodes[2];
|
|
||||||
N[3] = aNodes[4];
|
|
||||||
N[4] = aNodes[5];
|
|
||||||
N[5] = newN;
|
|
||||||
newElem1 = aMesh->AddFace(aNodes[2], aNodes[3], aNodes[0],
|
newElem1 = aMesh->AddFace(aNodes[2], aNodes[3], aNodes[0],
|
||||||
aNodes[6], aNodes[7], newN );
|
aNodes[6], aNodes[7], newN );
|
||||||
newElem2 = aMesh->AddFace(aNodes[2], aNodes[0], aNodes[1],
|
newElem2 = aMesh->AddFace(aNodes[2], aNodes[0], aNodes[1],
|
||||||
newN, aNodes[4], aNodes[5] );
|
newN, aNodes[4], aNodes[5] );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
N[0] = aNodes[1];
|
|
||||||
N[1] = aNodes[2];
|
|
||||||
N[2] = aNodes[3];
|
|
||||||
N[3] = aNodes[5];
|
|
||||||
N[4] = aNodes[6];
|
|
||||||
N[5] = newN;
|
|
||||||
newElem1 = aMesh->AddFace(aNodes[3], aNodes[0], aNodes[1],
|
newElem1 = aMesh->AddFace(aNodes[3], aNodes[0], aNodes[1],
|
||||||
aNodes[7], aNodes[4], newN );
|
aNodes[7], aNodes[4], newN );
|
||||||
newElem2 = aMesh->AddFace(aNodes[3], aNodes[1], aNodes[2],
|
newElem2 = aMesh->AddFace(aNodes[3], aNodes[1], aNodes[2],
|
||||||
@ -1958,26 +1945,13 @@ bool SMESH_MeshEditor::QuadToTri (TIDSortedElemSet & theElems,
|
|||||||
// create a new element
|
// create a new element
|
||||||
const SMDS_MeshElement* newElem1 = 0;
|
const SMDS_MeshElement* newElem1 = 0;
|
||||||
const SMDS_MeshElement* newElem2 = 0;
|
const SMDS_MeshElement* newElem2 = 0;
|
||||||
const SMDS_MeshNode* N[6];
|
|
||||||
if ( the13Diag ) {
|
if ( the13Diag ) {
|
||||||
N[0] = aNodes[0];
|
|
||||||
N[1] = aNodes[1];
|
|
||||||
N[2] = aNodes[2];
|
|
||||||
N[3] = aNodes[4];
|
|
||||||
N[4] = aNodes[5];
|
|
||||||
N[5] = newN;
|
|
||||||
newElem1 = aMesh->AddFace(aNodes[2], aNodes[3], aNodes[0],
|
newElem1 = aMesh->AddFace(aNodes[2], aNodes[3], aNodes[0],
|
||||||
aNodes[6], aNodes[7], newN );
|
aNodes[6], aNodes[7], newN );
|
||||||
newElem2 = aMesh->AddFace(aNodes[2], aNodes[0], aNodes[1],
|
newElem2 = aMesh->AddFace(aNodes[2], aNodes[0], aNodes[1],
|
||||||
newN, aNodes[4], aNodes[5] );
|
newN, aNodes[4], aNodes[5] );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
N[0] = aNodes[1];
|
|
||||||
N[1] = aNodes[2];
|
|
||||||
N[2] = aNodes[3];
|
|
||||||
N[3] = aNodes[5];
|
|
||||||
N[4] = aNodes[6];
|
|
||||||
N[5] = newN;
|
|
||||||
newElem1 = aMesh->AddFace(aNodes[3], aNodes[0], aNodes[1],
|
newElem1 = aMesh->AddFace(aNodes[3], aNodes[0], aNodes[1],
|
||||||
aNodes[7], aNodes[4], newN );
|
aNodes[7], aNodes[4], newN );
|
||||||
newElem2 = aMesh->AddFace(aNodes[3], aNodes[1], aNodes[2],
|
newElem2 = aMesh->AddFace(aNodes[3], aNodes[1], aNodes[2],
|
||||||
@ -2928,7 +2902,7 @@ void SMESH_MeshEditor::Smooth (TIDSortedElemSet & theElems,
|
|||||||
Handle(Geom_Surface) surface;
|
Handle(Geom_Surface) surface;
|
||||||
SMESHDS_SubMesh* faceSubMesh = 0;
|
SMESHDS_SubMesh* faceSubMesh = 0;
|
||||||
TopoDS_Face face;
|
TopoDS_Face face;
|
||||||
double fToler2 = 0, vPeriod = 0., uPeriod = 0., f,l;
|
double fToler2 = 0, f,l;
|
||||||
double u1 = 0, u2 = 0, v1 = 0, v2 = 0;
|
double u1 = 0, u2 = 0, v1 = 0, v2 = 0;
|
||||||
bool isUPeriodic = false, isVPeriodic = false;
|
bool isUPeriodic = false, isVPeriodic = false;
|
||||||
if ( *fId ) {
|
if ( *fId ) {
|
||||||
@ -2939,10 +2913,10 @@ void SMESH_MeshEditor::Smooth (TIDSortedElemSet & theElems,
|
|||||||
fToler2 *= fToler2 * 10.;
|
fToler2 *= fToler2 * 10.;
|
||||||
isUPeriodic = surface->IsUPeriodic();
|
isUPeriodic = surface->IsUPeriodic();
|
||||||
if ( isUPeriodic )
|
if ( isUPeriodic )
|
||||||
vPeriod = surface->UPeriod();
|
surface->UPeriod();
|
||||||
isVPeriodic = surface->IsVPeriodic();
|
isVPeriodic = surface->IsVPeriodic();
|
||||||
if ( isVPeriodic )
|
if ( isVPeriodic )
|
||||||
uPeriod = surface->VPeriod();
|
surface->VPeriod();
|
||||||
surface->Bounds( u1, u2, v1, v2 );
|
surface->Bounds( u1, u2, v1, v2 );
|
||||||
}
|
}
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
@ -4934,9 +4908,6 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet & theElements,
|
|||||||
list<SMESH_MeshEditor_PathPoint> currList = *itLLPP;
|
list<SMESH_MeshEditor_PathPoint> currList = *itLLPP;
|
||||||
itPP = currList.begin();
|
itPP = currList.begin();
|
||||||
SMESH_MeshEditor_PathPoint PP2 = currList.front();
|
SMESH_MeshEditor_PathPoint PP2 = currList.front();
|
||||||
gp_Pnt P1 = PP1.Pnt();
|
|
||||||
//cout<<" PP1: Pnt("<<P1.X()<<","<<P1.Y()<<","<<P1.Z()<<")"<<endl;
|
|
||||||
gp_Pnt P2 = PP2.Pnt();
|
|
||||||
gp_Dir D1 = PP1.Tangent();
|
gp_Dir D1 = PP1.Tangent();
|
||||||
gp_Dir D2 = PP2.Tangent();
|
gp_Dir D2 = PP2.Tangent();
|
||||||
gp_Dir Dnew( gp_Vec( (D1.X()+D2.X())/2, (D1.Y()+D2.Y())/2,
|
gp_Dir Dnew( gp_Vec( (D1.X()+D2.X())/2, (D1.Y()+D2.Y())/2,
|
||||||
@ -5660,8 +5631,8 @@ SMESH_MeshEditor::Transform (TIDSortedElemSet & theElems,
|
|||||||
|
|
||||||
PGroupIDs newGroupIDs;
|
PGroupIDs newGroupIDs;
|
||||||
|
|
||||||
if ( theMakeGroups && theCopy ||
|
if ( ( theMakeGroups && theCopy ) ||
|
||||||
theMakeGroups && theTargetMesh )
|
( theMakeGroups && theTargetMesh ) )
|
||||||
newGroupIDs = generateGroups( srcNodes, srcElems, groupPostfix, theTargetMesh );
|
newGroupIDs = generateGroups( srcNodes, srcElems, groupPostfix, theTargetMesh );
|
||||||
|
|
||||||
return newGroupIDs;
|
return newGroupIDs;
|
||||||
@ -10175,7 +10146,7 @@ SMESH_MeshEditor::SewSideElements (TIDSortedElemSet& theSide1,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check similarity of elements of the sides
|
// check similarity of elements of the sides
|
||||||
if (aResult == SEW_OK && ( face[0] && !face[1] ) || ( !face[0] && face[1] )) {
|
if (aResult == SEW_OK && (( face[0] && !face[1] ) || ( !face[0] && face[1] ))) {
|
||||||
MESSAGE("Correspondent face not found on side " << ( face[0] ? 1 : 0 ));
|
MESSAGE("Correspondent face not found on side " << ( face[0] ? 1 : 0 ));
|
||||||
if ( nReplaceMap.size() == 2 ) { // faces on input nodes not found
|
if ( nReplaceMap.size() == 2 ) { // faces on input nodes not found
|
||||||
aResult = ( face[0] ? SEW_BAD_SIDE2_NODES : SEW_BAD_SIDE1_NODES );
|
aResult = ( face[0] ? SEW_BAD_SIDE2_NODES : SEW_BAD_SIDE1_NODES );
|
||||||
|
@ -2750,7 +2750,9 @@ void SMESH_MesherHelper::FixQuadraticElements(bool volumeOnly)
|
|||||||
faces.Add( f.Current() ); // in not meshed solid
|
faces.Add( f.Current() ); // in not meshed solid
|
||||||
}
|
}
|
||||||
else { // fix nodes in the solid and its faces
|
else { // fix nodes in the solid and its faces
|
||||||
|
#ifdef _DEBUG_
|
||||||
MSG("FIX SOLID " << nbSolids-- << " #" << GetMeshDS()->ShapeToIndex(s.Current()));
|
MSG("FIX SOLID " << nbSolids-- << " #" << GetMeshDS()->ShapeToIndex(s.Current()));
|
||||||
|
#endif
|
||||||
SMESH_MesherHelper h(*myMesh);
|
SMESH_MesherHelper h(*myMesh);
|
||||||
h.SetSubShape( s.Current() );
|
h.SetSubShape( s.Current() );
|
||||||
h.FixQuadraticElements(false);
|
h.FixQuadraticElements(false);
|
||||||
|
@ -1899,7 +1899,7 @@ bool SMESH_Pattern::
|
|||||||
|
|
||||||
for ( nIt = startNodes.begin(); nIt != startNodes.end(); nIt++ )
|
for ( nIt = startNodes.begin(); nIt != startNodes.end(); nIt++ )
|
||||||
{
|
{
|
||||||
TIsoNode* prevN[2], *node = *nIt;
|
TIsoNode *node = *nIt;
|
||||||
if ( node->IsUVComputed() || !node->IsMovable() )
|
if ( node->IsUVComputed() || !node->IsMovable() )
|
||||||
continue;
|
continue;
|
||||||
gp_XY newUV( 0, 0 ), sumDir( 0, 0 );
|
gp_XY newUV( 0, 0 ), sumDir( 0, 0 );
|
||||||
@ -1960,7 +1960,6 @@ bool SMESH_Pattern::
|
|||||||
newUV += prevNode1->myUV + dir * step[ iDir ];
|
newUV += prevNode1->myUV + dir * step[ iDir ];
|
||||||
}
|
}
|
||||||
sumDir += dir;
|
sumDir += dir;
|
||||||
prevN[ iDir ] = prevNode1;
|
|
||||||
nbComp++;
|
nbComp++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2022,7 +2021,7 @@ bool SMESH_Pattern::
|
|||||||
}
|
}
|
||||||
// define ratio
|
// define ratio
|
||||||
bool ok = true; // <- stupid fix TO AVOID PB OF NODES WITH NULL BND NODES
|
bool ok = true; // <- stupid fix TO AVOID PB OF NODES WITH NULL BND NODES
|
||||||
double locR[2] = { 0, 0 };
|
// double locR[2] = { 0, 0 };
|
||||||
for ( iDir = 0; iDir < 2; iDir++ )
|
for ( iDir = 0; iDir < 2; iDir++ )
|
||||||
{
|
{
|
||||||
const int iCoord = 2 - iDir; // coord changing along an isoline
|
const int iCoord = 2 - iDir; // coord changing along an isoline
|
||||||
@ -2036,7 +2035,7 @@ bool SMESH_Pattern::
|
|||||||
double par3 = bndNode2->myInitUV.Coord( iCoord );
|
double par3 = bndNode2->myInitUV.Coord( iCoord );
|
||||||
double r = ( par2 - par1 ) / ( par3 - par1 );
|
double r = ( par2 - par1 ) / ( par3 - par1 );
|
||||||
r = Abs ( r - 0.5 ) * 2.0; // [0,1] - distance from the middle
|
r = Abs ( r - 0.5 ) * 2.0; // [0,1] - distance from the middle
|
||||||
locR[ iDir ] = ( 1 - r * r ) * 0.25;
|
// locR[ iDir ] = ( 1 - r * r ) * 0.25;
|
||||||
}
|
}
|
||||||
//locR[0] = locR[1] = 0.25;
|
//locR[0] = locR[1] = 0.25;
|
||||||
// intersect the 2 lines and move a node
|
// intersect the 2 lines and move a node
|
||||||
|
@ -1267,7 +1267,7 @@ namespace SMESH
|
|||||||
{theBounds[0],theBounds[3],theBounds[5]},
|
{theBounds[0],theBounds[3],theBounds[5]},
|
||||||
{theBounds[1],theBounds[3],theBounds[5]}};
|
{theBounds[1],theBounds[3],theBounds[5]}};
|
||||||
|
|
||||||
int aMaxId = 0, aMinId = aMaxId;
|
int aMaxId = 0;
|
||||||
theMaxBoundPrj = vtkMath::Dot(theDirection,aBoundPoints[aMaxId]);
|
theMaxBoundPrj = vtkMath::Dot(theDirection,aBoundPoints[aMaxId]);
|
||||||
theMinBoundPrj = theMaxBoundPrj;
|
theMinBoundPrj = theMaxBoundPrj;
|
||||||
for(int i = 1; i < 8; i++){
|
for(int i = 1; i < 8; i++){
|
||||||
@ -1278,7 +1278,6 @@ namespace SMESH
|
|||||||
}
|
}
|
||||||
if(theMinBoundPrj > aTmp){
|
if(theMinBoundPrj > aTmp){
|
||||||
theMinBoundPrj = aTmp;
|
theMinBoundPrj = aTmp;
|
||||||
aMinId = i;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vtkFloatingPointType *aMinPnt = aBoundPoints[aMaxId];
|
vtkFloatingPointType *aMinPnt = aBoundPoints[aMaxId];
|
||||||
|
@ -2191,7 +2191,6 @@ bool StdMeshers_Quadrangle_2D::ComputeReduced (SMESH_Mesh & aMesh,
|
|||||||
int nb1 = nb;
|
int nb1 = nb;
|
||||||
int nr1 = nr;
|
int nr1 = nr;
|
||||||
int nt1 = nt;
|
int nt1 = nt;
|
||||||
int nl1 = nl;
|
|
||||||
|
|
||||||
if (nr == nl) {
|
if (nr == nl) {
|
||||||
if (nb < nt) {
|
if (nb < nt) {
|
||||||
@ -2200,7 +2199,6 @@ bool StdMeshers_Quadrangle_2D::ComputeReduced (SMESH_Mesh & aMesh,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (nb == nt) {
|
else if (nb == nt) {
|
||||||
nl1 = nb; // and == nt
|
|
||||||
nr1 = nb; // and == nt
|
nr1 = nb; // and == nt
|
||||||
if (nl < nr) {
|
if (nl < nr) {
|
||||||
nt1 = nl;
|
nt1 = nl;
|
||||||
@ -2216,7 +2214,7 @@ bool StdMeshers_Quadrangle_2D::ComputeReduced (SMESH_Mesh & aMesh,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// number of rows and columns
|
// number of rows and columns
|
||||||
int nrows = nr1 - 1; // and also == nl1 - 1
|
int nrows = nr1 - 1;
|
||||||
int ncol_top = nt1 - 1;
|
int ncol_top = nt1 - 1;
|
||||||
int ncol_bot = nb1 - 1;
|
int ncol_bot = nb1 - 1;
|
||||||
// maximum number of bottom elements for "tree" simple reduce 3->1
|
// maximum number of bottom elements for "tree" simple reduce 3->1
|
||||||
|
@ -2093,13 +2093,22 @@ bool _ViscousBuilder::smoothAndCheck(_SolidData& data,
|
|||||||
distToIntersection = Precision::Infinite();
|
distToIntersection = Precision::Infinite();
|
||||||
double dist;
|
double dist;
|
||||||
const SMDS_MeshElement* intFace = 0, *closestFace = 0;
|
const SMDS_MeshElement* intFace = 0, *closestFace = 0;
|
||||||
|
#ifdef __myDEBUG
|
||||||
|
const SMDS_MeshElement* *closestFace = 0;
|
||||||
int iLE = 0;
|
int iLE = 0;
|
||||||
|
#endif
|
||||||
for ( unsigned i = 0; i < data._edges.size(); ++i )
|
for ( unsigned i = 0; i < data._edges.size(); ++i )
|
||||||
{
|
{
|
||||||
if ( data._edges[i]->FindIntersection( *searcher, dist, data._epsilon, &intFace ))
|
if ( data._edges[i]->FindIntersection( *searcher, dist, data._epsilon, &intFace ))
|
||||||
return false;
|
return false;
|
||||||
if ( distToIntersection > dist )
|
if ( distToIntersection > dist )
|
||||||
distToIntersection = dist, closestFace = intFace, iLE = i;
|
{
|
||||||
|
distToIntersection = dist;
|
||||||
|
#ifdef __myDEBUG
|
||||||
|
iLE = i;
|
||||||
|
closestFace = intFace;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#ifdef __myDEBUG
|
#ifdef __myDEBUG
|
||||||
if ( closestFace )
|
if ( closestFace )
|
||||||
@ -3811,7 +3820,7 @@ bool _ViscousBuilder::addBoundaryElements()
|
|||||||
|
|
||||||
// Find out orientation and type of face to create
|
// Find out orientation and type of face to create
|
||||||
|
|
||||||
bool reverse = false, tria = false, isOnFace;
|
bool reverse = false, isOnFace;
|
||||||
|
|
||||||
map< TGeomID, TopoDS_Shape >::iterator e2f =
|
map< TGeomID, TopoDS_Shape >::iterator e2f =
|
||||||
data._shrinkShape2Shape.find( getMeshDS()->ShapeToIndex( E ));
|
data._shrinkShape2Shape.find( getMeshDS()->ShapeToIndex( E ));
|
||||||
@ -3834,8 +3843,6 @@ bool _ViscousBuilder::addBoundaryElements()
|
|||||||
!_ignoreShapeIds.count( e2f->first ))
|
!_ignoreShapeIds.count( e2f->first ))
|
||||||
F = *pF;
|
F = *pF;
|
||||||
}
|
}
|
||||||
|
|
||||||
tria = true;
|
|
||||||
}
|
}
|
||||||
// Find the sub-mesh to add new faces
|
// Find the sub-mesh to add new faces
|
||||||
SMESHDS_SubMesh* sm = 0;
|
SMESHDS_SubMesh* sm = 0;
|
||||||
|
@ -414,7 +414,7 @@ sizeHint() const
|
|||||||
{
|
{
|
||||||
if( cachedSizeHint().isValid() )
|
if( cachedSizeHint().isValid() )
|
||||||
return cachedSizeHint();
|
return cachedSizeHint();
|
||||||
|
return QTableWidget::sizeHint();
|
||||||
// QSize sh = QTableWidget::sizeHint();
|
// QSize sh = QTableWidget::sizeHint();
|
||||||
// if( sh.width() < 400 )
|
// if( sh.width() < 400 )
|
||||||
// sh.setWidth( 400 );
|
// sh.setWidth( 400 );
|
||||||
|
@ -299,10 +299,12 @@ QString StdMeshersGUI_NbSegmentsCreator::storeParams() const
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ( hasConv )
|
if ( hasConv )
|
||||||
|
{
|
||||||
if ( data.myConv )
|
if ( data.myConv )
|
||||||
valStr += "; " + tr("SMESH_CUT_NEG_MODE");
|
valStr += "; " + tr("SMESH_CUT_NEG_MODE");
|
||||||
else
|
else
|
||||||
valStr += "; " + tr("SMESH_EXP_MODE");
|
valStr += "; " + tr("SMESH_EXP_MODE");
|
||||||
|
}
|
||||||
|
|
||||||
return valStr;
|
return valStr;
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
int V[6];
|
int V[6];
|
||||||
int S[4]; // Signature du T4 courant
|
int S[4]; // Signature du T4 courant
|
||||||
int NG[4]; // Num. globaux des sommets
|
//int NG[4]; // Num. globaux des sommets
|
||||||
|
|
||||||
// Acquisition maillage initial
|
// Acquisition maillage initial
|
||||||
//cout << chrono() << " - Acquisition du maillage initial" << endl;
|
//cout << chrono() << " - Acquisition du maillage initial" << endl;
|
||||||
@ -264,7 +264,7 @@ int main(int argc, char *argv[])
|
|||||||
for (int is = 0; is < 4; is++)
|
for (int is = 0; is < 4; is++)
|
||||||
{
|
{
|
||||||
int ng = *(MAILLAGE1->CNX[TETRA4] + 4 * it4 + is);
|
int ng = *(MAILLAGE1->CNX[TETRA4] + 4 * it4 + is);
|
||||||
NG[is] = ng;
|
//NG[is] = ng;
|
||||||
S[is] = *(POSN + ng - 1);
|
S[is] = *(POSN + ng - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user