mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-14 02:30:33 +05:00
Fix regressions
1) 2D_mesh_QuadranglePreference_01/B5 ( StdMeshers_Quadrangle_2D.cxx ) 2) viscous_layers_01/B2, B8 ( StdMeshers_ViscousLayers.cxx ) + Fix compilation warning "variable may be used uninitialized"
This commit is contained in:
parent
1a28a08237
commit
65c1beab50
@ -1832,10 +1832,10 @@ void Length2D::GetValues(TValues& theValues)
|
||||
dynamic_cast<const SMDS_VtkFace*>(anElem);
|
||||
// use special nodes iterator
|
||||
SMDS_ElemIteratorPtr anIter = F->interlacedNodesElemIterator();
|
||||
long aNodeId[4];
|
||||
long aNodeId[4] = { 0,0,0,0 };
|
||||
gp_Pnt P[4];
|
||||
|
||||
double aLength;
|
||||
double aLength = 0;
|
||||
const SMDS_MeshElement* aNode;
|
||||
if(anIter->more()){
|
||||
aNode = anIter->next();
|
||||
@ -1957,7 +1957,7 @@ double MultiConnection2D::GetValue( long theElementId )
|
||||
SMDS_ElemIteratorPtr anIter = aFaceElem->nodesIterator();
|
||||
if (!anIter) break;
|
||||
|
||||
const SMDS_MeshNode *aNode, *aNode0;
|
||||
const SMDS_MeshNode *aNode, *aNode0 = 0;
|
||||
TColStd_MapOfInteger aMap, aMapPrev;
|
||||
|
||||
for (i = 0; i <= len; i++) {
|
||||
@ -2038,7 +2038,7 @@ void MultiConnection2D::GetValues(MValues& theValues)
|
||||
(anElem)->interlacedNodesElemIterator();
|
||||
else
|
||||
aNodesIter = anElem->nodesIterator();
|
||||
long aNodeId[3];
|
||||
long aNodeId[3] = {0,0,0};
|
||||
|
||||
//int aNbConnects=0;
|
||||
const SMDS_MeshNode* aNode0;
|
||||
@ -2511,7 +2511,7 @@ void FreeEdges::GetBoreders(TBorders& theBorders)
|
||||
interlacedNodesElemIterator();
|
||||
else
|
||||
aNodesIter = anElem->nodesIterator();
|
||||
long aNodeId[2];
|
||||
long aNodeId[2] = {0,0};
|
||||
const SMDS_MeshElement* aNode;
|
||||
if(aNodesIter->more()){
|
||||
aNode = aNodesIter->next();
|
||||
|
@ -644,7 +644,7 @@ namespace MED
|
||||
TIntVector aVec;
|
||||
aVec.resize(theMeshInfo->GetDim());
|
||||
for(int aAxe=0;aAxe<theMeshInfo->GetDim();aAxe++){
|
||||
ETable aATable;
|
||||
ETable aATable = eCOOR_IND1;
|
||||
switch(aAxe){
|
||||
case 0:
|
||||
aATable = eCOOR_IND1;
|
||||
|
@ -2739,7 +2739,7 @@ namespace MED
|
||||
}
|
||||
|
||||
if(aMaillageType == eSTRUCTURE && aGrilleType != eGRILLE_STANDARD){
|
||||
ETable aTable;
|
||||
ETable aTable = eCOOR_IND1;
|
||||
for(med_int anAxis = 1; anAxis <= aMeshInfo.myDim; anAxis++){
|
||||
switch(anAxis){
|
||||
case 1 :
|
||||
|
@ -311,7 +311,7 @@ SMESH_DeviceActor
|
||||
vtkIdType aNbCells = aGrid->GetNumberOfCells();
|
||||
aScalars->SetNumberOfComponents(1);
|
||||
aScalars->SetNumberOfTuples(aNbCells);
|
||||
double* range;// = aScalars->GetRange();
|
||||
double* range = 0;// = aScalars->GetRange();
|
||||
|
||||
myVisualObj->UpdateFunctor(theFunctor);
|
||||
|
||||
|
@ -321,8 +321,8 @@ int SMESH_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
|
||||
// rnv begin
|
||||
// Customization of the vtkScalarBarActor to show distribution histogram.
|
||||
bool distrVisibility = (numColors == (int)this->myNbValues.size());
|
||||
vtkPoints *distrPts;
|
||||
vtkCellArray *distrPolys;
|
||||
vtkPoints *distrPts = 0;
|
||||
vtkCellArray *distrPolys = 0;
|
||||
vtkUnsignedCharArray *distColors = 0;
|
||||
int numDistrPts = 0, numPositiveVal=0, maxValue=0;
|
||||
if(!distrVisibility)
|
||||
|
@ -1512,7 +1512,7 @@ void SMESH_MeshEditor::QuadTo4Tri (TIDSortedElemSet & theElems)
|
||||
gp_XY uv [9]; uv[8] = gp_XY(0,0);
|
||||
gp_XYZ xyz[9];
|
||||
vector< const SMDS_MeshNode* > nodes;
|
||||
SMESHDS_SubMesh* subMeshDS;
|
||||
SMESHDS_SubMesh* subMeshDS = 0;
|
||||
TopoDS_Face F;
|
||||
Handle(Geom_Surface) surface;
|
||||
TopLoc_Location loc;
|
||||
@ -3249,7 +3249,7 @@ bool SMESH_MeshEditor::TriToQuad (TIDSortedElemSet & theElems,
|
||||
if ( startElem ) {
|
||||
// Get candidates to be fused
|
||||
const SMDS_MeshElement *tr1 = startElem, *tr2 = 0, *tr3 = 0;
|
||||
const SMESH_TLink *link12, *link13;
|
||||
const SMESH_TLink *link12 = 0, *link13 = 0;
|
||||
startElem = 0;
|
||||
ASSERT( mapEl_setLi.find( tr1 ) != mapEl_setLi.end() );
|
||||
set< SMESH_TLink >& setLi = mapEl_setLi[ tr1 ];
|
||||
@ -8203,7 +8203,7 @@ SMESH_MeshEditor::SewFreeBorder (const SMDS_MeshNode* theBordFirstNode,
|
||||
//const SMDS_MeshNode* faceNodes[ 4 ];
|
||||
|
||||
const SMDS_MeshNode* sideNode;
|
||||
const SMDS_MeshElement* sideElem;
|
||||
const SMDS_MeshElement* sideElem = 0;
|
||||
const SMDS_MeshNode* prevSideNode = theSideFirstNode;
|
||||
const SMDS_MeshNode* prevBordNode = theBordFirstNode;
|
||||
nBordIt = bordNodes.begin();
|
||||
@ -8228,7 +8228,7 @@ SMESH_MeshEditor::SewFreeBorder (const SMDS_MeshNode* theBordFirstNode,
|
||||
{
|
||||
const SMDS_MeshElement* elem = invElemIt->next();
|
||||
// prepare data for a loop on links coming to prevSideNode, of a face or a volume
|
||||
int iPrevNode, iNode = 0, nbNodes = elem->NbNodes();
|
||||
int iPrevNode = 0, iNode = 0, nbNodes = elem->NbNodes();
|
||||
vector< const SMDS_MeshNode* > faceNodes( nbNodes, (const SMDS_MeshNode*)0 );
|
||||
bool isVolume = volume.Set( elem );
|
||||
const SMDS_MeshNode** nodes = isVolume ? volume.GetNodes() : & faceNodes[0];
|
||||
@ -8776,7 +8776,7 @@ void SMESH_MeshEditor::InsertNodesIntoLink(const SMDS_MeshElement* theElemen
|
||||
}
|
||||
// decide how to split a quadrangle: compare possible variants
|
||||
// and choose which of splits to be a quadrangle
|
||||
int i1, i2, iSplit, nbSplits = nbLinkNodes - 1, iBestQuad;
|
||||
int i1, i2, iSplit, nbSplits = nbLinkNodes - 1, iBestQuad = 0;
|
||||
if ( nbFaceNodes == 3 ) {
|
||||
iBestQuad = nbSplits;
|
||||
i4 = i3;
|
||||
@ -10410,7 +10410,7 @@ void SMESH_MeshEditor::DoubleElements( const TIDSortedElemSet& theElements )
|
||||
|
||||
// get an element type and an iterator over elements
|
||||
|
||||
SMDSAbs_ElementType type;
|
||||
SMDSAbs_ElementType type = SMDSAbs_All;
|
||||
SMDS_ElemIteratorPtr elemIt;
|
||||
vector< const SMDS_MeshElement* > allElems;
|
||||
if ( theElements.empty() )
|
||||
|
@ -1613,7 +1613,7 @@ const SMDS_MeshNode* SMESH_MesherHelper::GetMediumNode(const SMDS_MeshNode* n1,
|
||||
|
||||
// get type of shape for the new medium node
|
||||
int faceID = -1, edgeID = -1;
|
||||
TopoDS_Edge E; double u [2];
|
||||
TopoDS_Edge E; double u [2] = {0.,0.};
|
||||
TopoDS_Face F; gp_XY uv[2];
|
||||
bool uvOK[2] = { true, true };
|
||||
const bool useCurSubShape = ( !myShape.IsNull() && myShape.ShapeType() == TopAbs_EDGE );
|
||||
|
@ -499,7 +499,7 @@ static gp_XY project (const SMDS_MeshNode* theNode,
|
||||
MESSAGE( "SMESH_Pattern: point projection FAILED");
|
||||
return gp_XY(0.,0.);
|
||||
}
|
||||
double u, v, minVal = DBL_MAX;
|
||||
double u =0, v =0, minVal = DBL_MAX;
|
||||
for ( int i = theProjectorPS.NbExt(); i > 0; i-- )
|
||||
if ( theProjectorPS.SquareDistance( i ) < minVal ) {
|
||||
minVal = theProjectorPS.SquareDistance( i );
|
||||
@ -2339,7 +2339,7 @@ bool SMESH_Pattern::sortSameSizeWires (TListOfEdgesList & theWire
|
||||
// " \t vertex: " << vGcVec[iW].X() << " " << vGcVec[iW].Y() << endl;
|
||||
double minDist = DBL_MAX;
|
||||
gp_XY & wGc = vGcVec[ iW ];
|
||||
int bIndex;
|
||||
int bIndex = 0;
|
||||
for ( int iB = 0; iB < nbWires; iB++ ) {
|
||||
if ( bndFound[ iB ] ) continue;
|
||||
double dist = ( wGc - gcVec[ iB ] ).SquareModulus();
|
||||
|
@ -608,7 +608,7 @@ namespace
|
||||
// Get parameters of export operation
|
||||
|
||||
QString aFilename;
|
||||
SMESH::MED_VERSION aFormat;
|
||||
SMESH::MED_VERSION aFormat = SMESH::MED_V2_2;
|
||||
// Init the parameters with the default values
|
||||
bool aIsASCII_STL = true;
|
||||
bool toCreateGroups = false;
|
||||
@ -6047,6 +6047,12 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
|
||||
continue;
|
||||
|
||||
TPlaneData aPlaneData;
|
||||
aPlaneData.AbsoluteOrientation = false;
|
||||
aPlaneData.RelativeOrientation = 0;
|
||||
aPlaneData.Distance = aPlaneData.Angle[0] = aPlaneData.Angle[1] = 0;
|
||||
aPlaneData.X = aPlaneData.Y = aPlaneData.Z = 0;
|
||||
aPlaneData.Dx = aPlaneData.Dy = aPlaneData.Dz = 0;
|
||||
|
||||
aPlaneData.Id = aClippingPlaneId;
|
||||
|
||||
ok = false;
|
||||
|
@ -537,7 +537,7 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
|
||||
myNbMidFaceNodes = 0;
|
||||
myNbCenterNodes = 0;
|
||||
|
||||
int aNumRows;
|
||||
int aNumRows = 0;
|
||||
|
||||
switch (myGeomType) {
|
||||
case SMDSEntity_Quad_Edge:
|
||||
@ -768,7 +768,7 @@ bool SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
|
||||
}
|
||||
}
|
||||
|
||||
SMESH::ElementType anElementType;
|
||||
SMESH::ElementType anElementType = SMESH::ALL;
|
||||
long anElemId = -1, nbElemsBefore = 0;
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
|
||||
switch (myGeomType) {
|
||||
@ -1055,7 +1055,7 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
|
||||
|
||||
// process groups
|
||||
if ( !myMesh->_is_nil() && myEntry != aCurrentEntry ) {
|
||||
SMESH::ElementType anElementType;
|
||||
SMESH::ElementType anElementType = SMESH::ALL;
|
||||
switch ( myGeomType ) {
|
||||
case SMDSEntity_Quad_Edge:
|
||||
anElementType = SMESH::EDGE; break;
|
||||
@ -1371,8 +1371,8 @@ void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
|
||||
for ( int row = 0; row < myTable->rowCount(); row++ )
|
||||
myTable->item( row, 1 )->setText("");
|
||||
|
||||
int* aFirstColIds;
|
||||
int* aLastColIds;
|
||||
int* aFirstColIds = 0;
|
||||
int* aLastColIds = 0;
|
||||
|
||||
switch (myGeomType) {
|
||||
case SMDSEntity_Quad_Edge:
|
||||
|
@ -766,7 +766,7 @@ bool SMESHGUI_ClippingDlg::AddPlane ( SMESH::TActorList theActorList,
|
||||
double aDir[2][3] = {{0, 0, 0}, {0, 0, 0}};
|
||||
static double aCoeff = vtkMath::Pi()/180.0;
|
||||
|
||||
int anOrientation;
|
||||
int anOrientation = 0;
|
||||
if ( thePlane->PlaneMode == SMESH::Absolute )
|
||||
anOrientation = thePlane->myAbsoluteOrientation;
|
||||
else if ( thePlane->PlaneMode == SMESH::Relative )
|
||||
@ -1436,7 +1436,7 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam()
|
||||
static double aCoeff = vtkMath::Pi()/180.0;
|
||||
|
||||
double aRot[2] = { getRotation1(), getRotation2() };
|
||||
int anOrient;
|
||||
int anOrient = 0;
|
||||
if ( aPlane->PlaneMode == SMESH::Absolute )
|
||||
anOrient = CBAbsoluteOrientation->currentIndex();
|
||||
else if ( aPlane->PlaneMode == SMESH::Relative )
|
||||
@ -1623,8 +1623,8 @@ void SMESHGUI_ClippingDlg::absolutePlaneToRelative ( double theOrigin[3], double
|
||||
double eps = 0.0001;
|
||||
|
||||
int anOrientation = CBRelativeOrientation->currentIndex();
|
||||
double aDirection[3];
|
||||
double aRotation1, aRotation2;
|
||||
double aDirection[3] = { 0.,0.,0. };
|
||||
double aRotation1 = 0, aRotation2 = 0;
|
||||
switch( anOrientation ) {
|
||||
case 0:
|
||||
aDirection[0] = theDir[0] + eps;
|
||||
|
@ -936,7 +936,7 @@ bool SMESHGUI_GroupDlg::onApply()
|
||||
QStringList anEntryList;
|
||||
|
||||
SMESH::SMESH_GroupBase_var resultGroup;
|
||||
bool isCreation, isConversion = false;
|
||||
bool isCreation = false, isConversion = false;
|
||||
|
||||
SUIT_OverrideCursor wc;
|
||||
|
||||
|
@ -1227,7 +1227,7 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
|
||||
int shapeID = pos->shapeID;
|
||||
if ( shapeID > 0 ) {
|
||||
QString shapeType;
|
||||
double u, v;
|
||||
double u = 0, v = 0;
|
||||
switch ( pos->shapeType ) {
|
||||
case GEOM::EDGE:
|
||||
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_EDGE" );
|
||||
@ -1747,7 +1747,7 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
|
||||
int shapeID = pos->shapeID;
|
||||
if ( shapeID > 0 ) {
|
||||
QString shapeType;
|
||||
double u, v;
|
||||
double u = 0, v = 0;
|
||||
switch ( pos->shapeType ) {
|
||||
case GEOM::EDGE:
|
||||
shapeType = SMESHGUI_ElemInfo::tr( "GEOM_EDGE" );
|
||||
|
@ -1308,7 +1308,7 @@ bool SMESHGUI_SewingDlg::ClickOnApply()
|
||||
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
|
||||
|
||||
int aConstructorId = GetConstructorId();
|
||||
SMESH::SMESH_MeshEditor::Sew_Error anError;
|
||||
SMESH::SMESH_MeshEditor::Sew_Error anError = SMESH::SMESH_MeshEditor::SEW_OK;
|
||||
|
||||
if (aConstructorId == 0)
|
||||
{
|
||||
|
@ -930,6 +930,7 @@ void SMESH_Block::refineParametersOnFace( const gp_Pnt& thePoint,
|
||||
{
|
||||
// find UV of thePoint on the FACE
|
||||
Standard_Real U,V;
|
||||
U=V=0;
|
||||
|
||||
const TFace& tface = myFace[ theFaceID - ID_FirstF ];
|
||||
if ( !tface.Surface() ) return;
|
||||
@ -1778,7 +1779,7 @@ bool SMESH_Block::FindBlockShapes(const TopoDS_Shell& theShell,
|
||||
|
||||
if ( V000.IsNull() ) {
|
||||
// find vertex 000 - the one with smallest coordinates
|
||||
double minVal = DBL_MAX, minX, val;
|
||||
double minVal = DBL_MAX, minX = DBL_MAX, val;
|
||||
for ( int i = 1; i <= 8; i++ ) {
|
||||
const TopoDS_Vertex& v = TopoDS::Vertex( vfMap.FindKey( i ));
|
||||
gp_Pnt P = BRep_Tool::Pnt( v );
|
||||
@ -1822,7 +1823,7 @@ bool SMESH_Block::FindBlockShapes(const TopoDS_Shell& theShell,
|
||||
return false;
|
||||
}
|
||||
TopTools_ListIteratorOfListOfShape f001It, f000It ( f000List );
|
||||
int i, j, iFound1, iFound2;
|
||||
int i, j, iFound1=0, iFound2=0;
|
||||
for ( j = 0; f000It.More(); f000It.Next(), j++ )
|
||||
{
|
||||
if ( NB_FACES_BY_VERTEX == 6 && j % 2 ) continue; // each face encounters twice
|
||||
|
@ -1194,7 +1194,7 @@ bool SMESH_MeshAlgos::IsOut( const SMDS_MeshElement* element, const gp_Pnt& poin
|
||||
dist.back() = dist.front();
|
||||
// find the closest intersection
|
||||
int iClosest = -1;
|
||||
double rClosest, distClosest = 1e100;;
|
||||
double rClosest = 0, distClosest = 1e100;;
|
||||
gp_Pnt pClosest;
|
||||
for ( i = 0; i < nbNodes; ++i )
|
||||
{
|
||||
|
@ -4485,7 +4485,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
||||
|
||||
// --> try to find SUB-MESHES containers for each type of submesh
|
||||
for ( int j = GetSubMeshOnVertexTag(); j <= GetSubMeshOnCompoundTag(); j++ ) {
|
||||
const char* name_meshgroup;
|
||||
const char* name_meshgroup = 0;
|
||||
if ( j == GetSubMeshOnVertexTag() )
|
||||
name_meshgroup = "SubMeshes On Vertex";
|
||||
else if ( j == GetSubMeshOnEdgeTag() )
|
||||
|
@ -4076,7 +4076,7 @@ SMESH::long_array* SMESH_Mesh_i::GetNodesId()
|
||||
SMESH::ElementType SMESH_Mesh_i::GetElementType( const CORBA::Long id, const bool iselem )
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
SMESH::ElementType type;
|
||||
SMESH::ElementType type = SMESH::ALL;
|
||||
SMESH_TRY;
|
||||
|
||||
if ( _preMeshInfo )
|
||||
@ -4224,7 +4224,7 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID,
|
||||
SMESH::ElementType SMESH_Mesh_i::GetSubMeshElementType(const CORBA::Long ShapeID)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
SMESH::ElementType type;
|
||||
SMESH::ElementType type = SMESH::ALL;
|
||||
|
||||
SMESH_TRY;
|
||||
if ( _preMeshInfo )
|
||||
|
@ -3050,7 +3050,7 @@ namespace
|
||||
_Node* orderNodes [20];
|
||||
TGeomID orderShapeIDs[20];
|
||||
size_t nbN = 0;
|
||||
TGeomID id, *pID;
|
||||
TGeomID id, *pID = 0;
|
||||
for ( e = edges.begin(); e != edges.end(); ++e )
|
||||
{
|
||||
if (( id = _grid->_shapes.FindIndex( SMESH_MesherHelper::IthVertex( 0, *e ))) &&
|
||||
|
@ -1367,7 +1367,7 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes,
|
||||
|
||||
// find the other edges of theFace and orientation of e1
|
||||
TopoDS_Edge e1, e2, eTop;
|
||||
bool rev1, CumOri = false;
|
||||
bool rev1 = false, CumOri = false;
|
||||
TopExp_Explorer exp( theFace, TopAbs_EDGE );
|
||||
int nbEdges = 0;
|
||||
for ( ; exp.More(); exp.Next() ) {
|
||||
|
@ -3155,7 +3155,7 @@ bool StdMeshers_Prism_3D::initPrism(Prism_3D::TPrismTopo& thePrism,
|
||||
|
||||
// find vertex 000 - the one with smallest coordinates (for easy DEBUG :-)
|
||||
TopoDS_Vertex V000;
|
||||
double minVal = DBL_MAX, minX, val;
|
||||
double minVal = DBL_MAX, minX = 0, val;
|
||||
for ( TopExp_Explorer exp( botSM->GetSubShape(), TopAbs_VERTEX );
|
||||
exp.More(); exp.Next() )
|
||||
{
|
||||
|
@ -519,7 +519,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh& aMesh,
|
||||
// for each node of the down edge find nearest node
|
||||
// in the first row of the regular grid and link them
|
||||
for (i = 0; i < stop; i++) {
|
||||
const SMDS_MeshNode *a, *b, *c, *d;
|
||||
const SMDS_MeshNode *a, *b, *c=0, *d;
|
||||
a = uv_e0[i].node;
|
||||
b = uv_e0[i + 1].node;
|
||||
gp_Pnt pb (b->X(), b->Y(), b->Z());
|
||||
@ -533,6 +533,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh& aMesh,
|
||||
}
|
||||
else {
|
||||
// find in the grid node c, nearest to the b
|
||||
c = 0;
|
||||
double mind = RealLast();
|
||||
for (int k = g; k <= iup; k++) {
|
||||
|
||||
@ -734,6 +735,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh& aMesh,
|
||||
gp_Pnt pb (b->X(), b->Y(), b->Z());
|
||||
|
||||
// find node c in the grid, nearest to the b
|
||||
c = 0;
|
||||
int near = g;
|
||||
if (i == stop - 1) { // up bondary reached
|
||||
c = quad->uv_grid[nbhoriz*(jup + 1) - 2].node;
|
||||
@ -2138,7 +2140,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh & aMesh,
|
||||
npl.Append(uv_el[i].normParam);
|
||||
}
|
||||
|
||||
int dl,dr;
|
||||
int dl = 0, dr = 0;
|
||||
if (OldVersion) {
|
||||
// add some params to right and left after the first param
|
||||
// insert to right
|
||||
@ -2380,7 +2382,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh & aMesh,
|
||||
TColgp_SequenceOfXY UVtmp;
|
||||
double drparam = npr.Value(nr) - npr.Value(nnn-1);
|
||||
double dlparam = npl.Value(nnn) - npl.Value(nnn-1);
|
||||
double y0,y1;
|
||||
double y0 = 0, y1 = 0;
|
||||
for (i=1; i<=drl; i++) {
|
||||
// add existed nodes from right edge
|
||||
NodesC.SetValue(nb,i+1,uv_er[nnn+i-2].node);
|
||||
@ -3296,7 +3298,11 @@ bool StdMeshers_Quadrangle_2D::computeReduced (SMESH_Mesh & aMesh,
|
||||
|
||||
vector<UVPtStruct> curr_base = uv_eb, next_base;
|
||||
|
||||
UVPtStruct nullUVPtStruct; nullUVPtStruct.node = 0;
|
||||
UVPtStruct nullUVPtStruct;
|
||||
nullUVPtStruct.node = 0;
|
||||
nullUVPtStruct.x = nullUVPtStruct.y = nullUVPtStruct.u = nullUVPtStruct.y = 0;
|
||||
nullUVPtStruct.param = 0;
|
||||
|
||||
|
||||
int curr_base_len = nb;
|
||||
int next_base_len = 0;
|
||||
@ -4108,7 +4114,7 @@ bool StdMeshers_Quadrangle_2D::check()
|
||||
StdMeshers_FaceSidePtr wire = wireVec[0];
|
||||
|
||||
// find a right angle VERTEX
|
||||
int iVertex;
|
||||
int iVertex = 0;
|
||||
double maxAngle = -1e100;
|
||||
for ( int i = 0; i < wire->NbEdges(); ++i )
|
||||
{
|
||||
@ -5145,6 +5151,8 @@ void StdMeshers_Quadrangle_2D::updateSideUV( FaceQuadStruct::Side& side,
|
||||
for ( iS = 0; iS < q->side.size(); ++iS )
|
||||
if ( side.grid == q->side[ iS ].grid )
|
||||
break;
|
||||
if ( iS == q->side.size() )
|
||||
continue;
|
||||
bool isOut;
|
||||
if ( !q->side[ iS ].IsReversed() )
|
||||
isOut = ( q->side[ iS ].from > iCur || q->side[ iS ].to-1 <= iCur );
|
||||
|
@ -931,7 +931,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
||||
|
||||
case GEOMETRIC_1D:
|
||||
{
|
||||
double a1 = _value[ BEG_LENGTH_IND ], an;
|
||||
double a1 = _value[ BEG_LENGTH_IND ], an = 0;
|
||||
double q = _value[ END_LENGTH_IND ];
|
||||
|
||||
double U1 = theReverse ? l : f;
|
||||
|
@ -94,7 +94,7 @@
|
||||
#include <string>
|
||||
|
||||
#ifdef _DEBUG_
|
||||
//#define __myDEBUG
|
||||
#define __myDEBUG
|
||||
//#define __NOT_INVALIDATE_BAD_SMOOTH
|
||||
#endif
|
||||
|
||||
@ -2890,7 +2890,7 @@ bool _ViscousBuilder::findShapesToSmooth( _SolidData& data )
|
||||
{
|
||||
TGeomID iV = getMeshDS()->ShapeToIndex( vIt.Value() );
|
||||
vector<_LayerEdge*>& eV = edgesByGeom[ iV ]._edges;
|
||||
if ( eV.empty() ) continue;
|
||||
if ( eV.empty() || eV[0]->Is( _LayerEdge::MULTI_NORMAL )) continue;
|
||||
gp_Vec eDir = getEdgeDir( E, TopoDS::Vertex( vIt.Value() ));
|
||||
double angle = eDir.Angle( eV[0]->_normal );
|
||||
double cosin = Cos( angle );
|
||||
@ -4727,39 +4727,42 @@ bool _ViscousBuilder::smoothAndCheck(_SolidData& data,
|
||||
continue;
|
||||
if ( eos._edges[i]->FindIntersection( *searcher, dist, data._epsilon, eos, &intFace ))
|
||||
{
|
||||
return false;
|
||||
// commented due to "Illegal hash-positionPosition" error in NETGEN
|
||||
// on Debian60 on viscous_layers_01/B2 case
|
||||
// Collision; try to deflate _LayerEdge's causing it
|
||||
badEdges.clear();
|
||||
badEdges.push_back( eos._edges[i] );
|
||||
eosC1[0] = & eos;
|
||||
int nbBad = invalidateBadSmooth( data, helper, badEdges, eosC1, infStep );
|
||||
if ( nbBad > 0 )
|
||||
return false;
|
||||
// badEdges.clear();
|
||||
// badEdges.push_back( eos._edges[i] );
|
||||
// eosC1[0] = & eos;
|
||||
// int nbBad = invalidateBadSmooth( data, helper, badEdges, eosC1, infStep );
|
||||
// if ( nbBad > 0 )
|
||||
// return false;
|
||||
|
||||
badEdges.clear();
|
||||
if ( _EdgesOnShape* eof = data.GetShapeEdges( intFace->getshapeId() ))
|
||||
{
|
||||
if ( const _TmpMeshFace* f = dynamic_cast< const _TmpMeshFace*>( intFace ))
|
||||
{
|
||||
const SMDS_MeshElement* srcFace =
|
||||
eof->_subMesh->GetSubMeshDS()->GetElement( f->getIdInShape() );
|
||||
SMDS_ElemIteratorPtr nIt = srcFace->nodesIterator();
|
||||
while ( nIt->more() )
|
||||
{
|
||||
const SMDS_MeshNode* srcNode = static_cast<const SMDS_MeshNode*>( nIt->next() );
|
||||
TNode2Edge::iterator n2e = data._n2eMap.find( srcNode );
|
||||
if ( n2e != data._n2eMap.end() )
|
||||
badEdges.push_back( n2e->second );
|
||||
}
|
||||
eosC1[0] = eof;
|
||||
nbBad = invalidateBadSmooth( data, helper, badEdges, eosC1, infStep );
|
||||
if ( nbBad > 0 )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ( eos._edges[i]->FindIntersection( *searcher, dist, data._epsilon, eos, &intFace ))
|
||||
return false;
|
||||
else
|
||||
continue;
|
||||
// badEdges.clear();
|
||||
// if ( _EdgesOnShape* eof = data.GetShapeEdges( intFace->getshapeId() ))
|
||||
// {
|
||||
// if ( const _TmpMeshFace* f = dynamic_cast< const _TmpMeshFace*>( intFace ))
|
||||
// {
|
||||
// const SMDS_MeshElement* srcFace =
|
||||
// eof->_subMesh->GetSubMeshDS()->GetElement( f->getIdInShape() );
|
||||
// SMDS_ElemIteratorPtr nIt = srcFace->nodesIterator();
|
||||
// while ( nIt->more() )
|
||||
// {
|
||||
// const SMDS_MeshNode* srcNode = static_cast<const SMDS_MeshNode*>( nIt->next() );
|
||||
// TNode2Edge::iterator n2e = data._n2eMap.find( srcNode );
|
||||
// if ( n2e != data._n2eMap.end() )
|
||||
// badEdges.push_back( n2e->second );
|
||||
// }
|
||||
// eosC1[0] = eof;
|
||||
// nbBad = invalidateBadSmooth( data, helper, badEdges, eosC1, infStep );
|
||||
// if ( nbBad > 0 )
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
// if ( eos._edges[i]->FindIntersection( *searcher, dist, data._epsilon, eos, &intFace ))
|
||||
// return false;
|
||||
// else
|
||||
// continue;
|
||||
}
|
||||
if ( !intFace )
|
||||
{
|
||||
@ -5387,7 +5390,7 @@ bool _Smoother1D::smoothComplexEdge( _SolidData& data,
|
||||
_offPoints[i]._len = avgLen;
|
||||
}
|
||||
|
||||
double fTol;
|
||||
double fTol = 0;
|
||||
if ( !surface.IsNull() ) // project _offPoints to the FACE
|
||||
{
|
||||
fTol = 100 * BRep_Tool::Tolerance( F );
|
||||
@ -5414,7 +5417,7 @@ bool _Smoother1D::smoothComplexEdge( _SolidData& data,
|
||||
int i = _iSeg[ is2nd ];
|
||||
int di = is2nd ? -1 : +1;
|
||||
bool projected = false;
|
||||
double uOnSeg, uOnSegDiff, uOnSegBestDiff = Precision::Infinite(), uOnSegPrevDiff;
|
||||
double uOnSeg, uOnSegDiff, uOnSegBestDiff = Precision::Infinite(), uOnSegPrevDiff = 0;
|
||||
int nbWorse = 0;
|
||||
do {
|
||||
gp_Vec v0p( _offPoints[i]._xyz, pExtreme[ is2nd ] );
|
||||
@ -8844,7 +8847,7 @@ bool _ViscousBuilder::refine(_SolidData& data)
|
||||
TopoDS_Edge geomEdge;
|
||||
TopoDS_Face geomFace;
|
||||
TopLoc_Location loc;
|
||||
double f,l, u;
|
||||
double f,l, u = 0;
|
||||
gp_XY uv;
|
||||
vector< gp_XYZ > pos3D;
|
||||
bool isOnEdge;
|
||||
|
@ -300,6 +300,8 @@ namespace VISCOUS_2D
|
||||
double _D; // _vec1.Crossed( _vec2 )
|
||||
double _param1, _param2; // intersection param on _seg1 and _seg2
|
||||
|
||||
_SegmentIntersection(): _param1(0), _param2(0), _D(0) {}
|
||||
|
||||
bool Compute(const _Segment& seg1, const _Segment& seg2, bool seg2IsRay = false )
|
||||
{
|
||||
// !!! If seg2IsRay, returns true at any _param2 !!!
|
||||
@ -1819,7 +1821,7 @@ bool _ViscousBuilder2D::shrink()
|
||||
// x-x-x-x-----x-----x----
|
||||
// | | | | e1 e2 e3
|
||||
|
||||
int isRShrinkedForAdjacent;
|
||||
int isRShrinkedForAdjacent = 0;
|
||||
UVPtStructVec nodeDataForAdjacent;
|
||||
for ( int isR = 0; isR < 2; ++isR )
|
||||
{
|
||||
|
@ -293,7 +293,7 @@ void StdMeshersGUI_DistrPreview::update()
|
||||
|
||||
int size = graph.length()/2;
|
||||
double* x = new double[size], *y = new double[size];
|
||||
double min_x, max_x, min_y, max_y;
|
||||
double min_x = 0, max_x = 0, min_y = 0, max_y = 0;
|
||||
for( int i=0; i<size; i++ )
|
||||
{
|
||||
x[i] = graph[2*i];
|
||||
|
@ -72,13 +72,13 @@ int main(int argc, char *argv[])
|
||||
debug = false;
|
||||
string ficMEDin;
|
||||
string ficMEDout;
|
||||
float xNormal;
|
||||
float yNormal;
|
||||
float zNormal;
|
||||
float xm;
|
||||
float ym;
|
||||
float zm;
|
||||
float tolerance;
|
||||
float xNormal = 0;
|
||||
float yNormal = 0;
|
||||
float zNormal = 0;
|
||||
float xm = 0;
|
||||
float ym = 0;
|
||||
float zm = 0;
|
||||
float tolerance = 0;
|
||||
try
|
||||
{
|
||||
if (argc != 13)
|
||||
|
@ -84,7 +84,7 @@ int MESHCUT::positionNoeudPlan(int indiceNoeud)
|
||||
int MESHCUT::intersectionSegmentPlan(int it4, int na)
|
||||
{
|
||||
|
||||
int ngA, ngB; // Numéros des noeuds extrémités AB
|
||||
int ngA = -1, ngB = -1; // Numéros des noeuds extrémités AB
|
||||
float lambda, ps; //, ab; // ab = longueur AB
|
||||
float A[3], B[3];
|
||||
|
||||
|
@ -204,7 +204,7 @@ float Maillage::distanceNoeudMaille(int ngnoeud, int imaille, TYPE_MAILLE tm)
|
||||
int Maillage::noeudVoisin(int ngnoeud, int imaille, TYPE_MAILLE tm)
|
||||
{
|
||||
float x, y, z;
|
||||
int ngv;
|
||||
int ngv = -1;
|
||||
float x0 = XX[ngnoeud - 1];
|
||||
float y0 = YY[ngnoeud - 1];
|
||||
float z0 = ZZ[ngnoeud - 1];
|
||||
@ -557,13 +557,13 @@ void Maillage::inputMED(std::string fichierMED)
|
||||
ostringstream OSCOORD;
|
||||
|
||||
med_int nnoe = 0; // Nbre de noeuds
|
||||
med_float *coo1; // Table des coordonnées
|
||||
med_float *coo1 = 0; // Table des coordonnées
|
||||
// char nomcoo[mdim * MED_SNAME_SIZE + 1]; // Table des noms des coordonnées
|
||||
// char unicoo[mdim * MED_SNAME_SIZE + 1]; // Table des unités des coordonnées
|
||||
char *nomnoe;
|
||||
char *nomnoe = 0;
|
||||
|
||||
med_int *numnoe;
|
||||
med_int *nufano;
|
||||
med_int *numnoe = 0;
|
||||
med_int *nufano = 0;
|
||||
// med_grid_type rep;
|
||||
// med_bool inonoe, inunoe;
|
||||
// med_int profil[2] = { 2, 3 };
|
||||
@ -1133,7 +1133,7 @@ void Maillage::outputMED(std::string fichierMED)
|
||||
// float x, y, z;
|
||||
|
||||
med_int nnoe = nombreNoeudsMaillage; // Nombre de noeuds
|
||||
med_float *coo; // Table des coordonnées
|
||||
med_float *coo = 0; // Table des coordonnées
|
||||
|
||||
// Noms des coordonnées (variable nomcoo)
|
||||
char* nomcoo = new char[mdim * MED_SNAME_SIZE + 1];
|
||||
@ -1169,9 +1169,9 @@ void Maillage::outputMED(std::string fichierMED)
|
||||
|
||||
// Tables des noms, numeros, numeros de familles des noeuds
|
||||
// autant d'elements que de noeuds - les noms ont pout longueur MED_SNAME_SIZE
|
||||
char *nomnoe;
|
||||
char *nomnoe = 0;
|
||||
med_int *numnoe = NULL;
|
||||
med_int *nufano;
|
||||
med_int *nufano = NULL;
|
||||
med_bool inonoe = MED_FALSE;
|
||||
med_bool inunoe = MED_FALSE;
|
||||
|
||||
@ -1580,7 +1580,7 @@ int Maillage::NGLOBAL(TYPE_MAILLE typeMaille, int nlocal)
|
||||
TYPE_MAILLE Maillage::TYPE(int nglobal)
|
||||
{
|
||||
// Attention, les num. globaux commencent à 1, les num. locaux à 0
|
||||
TYPE_MAILLE resultat;
|
||||
TYPE_MAILLE resultat = (TYPE_MAILLE)-1;
|
||||
int cpt = 0;
|
||||
for (int itm = (int) POI1; itm <= (int) HEXA20; itm++)
|
||||
{
|
||||
|
@ -534,7 +534,7 @@ int MESHCUT::copieFichier(std::string source, std::string cible)
|
||||
|
||||
med_geometry_type MESHCUT::InstanceMGE(TYPE_MAILLE TYPE)
|
||||
{
|
||||
med_geometry_type typeBanaliseMED;
|
||||
med_geometry_type typeBanaliseMED = MED_NONE;
|
||||
|
||||
switch (TYPE)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user