Fix regressions

This commit is contained in:
eap 2016-11-25 17:24:41 +03:00
parent 7ea81bbe6e
commit 979d9c81fc
6 changed files with 23 additions and 17 deletions

View File

@ -3489,7 +3489,8 @@ void SMESHGUI_FilterDlg::UnRegisterFilters()
//=======================================================================
void SMESHGUI_FilterDlg::insertFilterInViewer()
{
if (SVTK_Selector* aSelector = SMESH::GetSelector()) {
if (SVTK_Selector* aSelector = SMESH::GetSelector())
{
SMESH::ElementType anEntType = (SMESH::ElementType)myTable->GetType();
if (myFilter[ myTable->GetType() ]->_is_nil() ||
@ -3499,7 +3500,8 @@ void SMESHGUI_FilterDlg::insertFilterInViewer()
{
SMESH::RemoveFilter(getFilterId(anEntType), aSelector);
}
else {
else
{
Handle(SMESHGUI_PredicateFilter) aFilter = new SMESHGUI_PredicateFilter();
aFilter->SetPredicate(myFilter[ myTable->GetType() ]->GetPredicate());
SMESH::RemoveFilter(getFilterId(anEntType), aSelector); //skl for IPAL12631
@ -3659,7 +3661,7 @@ SMESH_Actor* SMESHGUI_FilterDlg::getActor()
//=======================================================================
void SMESHGUI_FilterDlg::selectInViewer (const int theType, const QList<int>& theIds)
{
if (mySelectionMgr == 0 || myMesh->_is_nil())
if (mySelectionMgr == 0 || myMesh->_is_nil() )
return;
mySelectionMgr->clearFilters();
@ -3667,7 +3669,8 @@ void SMESHGUI_FilterDlg::selectInViewer (const int theType, const QList<int>& th
// Set new selection mode if necessary
Selection_Mode aSelMode = getSelMode(theType);
SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
if ( aViewWindow && aViewWindow->SelectionMode()!=aSelMode) {
if ( aViewWindow && aViewWindow->SelectionMode() != aSelMode )
{
mySelectionMgr->clearSelected();
mySelectionMgr->clearFilters();
SMESH::SetPointRepresentation( aSelMode == NodeSelection );
@ -3680,8 +3683,6 @@ void SMESHGUI_FilterDlg::selectInViewer (const int theType, const QList<int>& th
return;
Handle(SALOME_InteractiveObject) anIO = anActor->getIO();
//mySelectionMgr->clearSelected();
//mySelectionMgr->AddIObject(anIO, false);
SALOME_ListIO aList;
aList.Append(anIO);
mySelectionMgr->setSelectedObjects(aList, false);

View File

@ -263,7 +263,7 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm):
# on curve from 0 to 1 (additionally it is neecessary to check
# orientation of edges and create list of reversed edges if it is
# needed) and sets numbers of segments between given points (default
# values are equals 1
# values are 1)
# @param points defines the list of parameters on curve
# @param nbSegs defines the list of numbers of segments
# @param reversedEdges is a list of edges to mesh using reversed orientation.

View File

@ -450,7 +450,7 @@ const std::vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool isXCons
{
return myPoints;
}
if (( myNbPonits > 0 ) &&
if (( u2node.size() > 0 ) &&
( u2node.begin()->first < 0 || u2node.rbegin()->first > 1 ))
{
return myPoints;

View File

@ -4892,8 +4892,8 @@ bool StdMeshers_Sweeper::ComputeNodes( SMESH_MesherHelper& helper,
}
}
//centerIntErrorIsSmall = true;
//bndErrorIsSmall = true;
centerIntErrorIsSmall = true; // 3D_mesh_Extrusion_00/A3
bndErrorIsSmall = true;
if ( !centerIntErrorIsSmall )
{
// Compensate the central error; continue adding projection

View File

@ -704,9 +704,9 @@ namespace {
tgtMeshDS->SetNodeOnEdge( n, tgtE, srcU );
if ( !tgtFace.IsPartner( srcFace ))
{
bool isOk = true;
edgeHelper.SetSubShape( tgtE );
edgeHelper.GetNodeU( tgtE, n, 0, &isOk );
double tol = BRep_Tool::Tolerance( tgtE );
bool isOk = edgeHelper.CheckNodeU( tgtE, n, srcU, 2 * tol, /*force=*/true );
if ( !isOk ) // projection of n to tgtE failed (23395)
{
double sF, sL, tF, tL;
@ -717,7 +717,6 @@ namespace {
tgtMeshDS->SetNodeOnEdge( n, tgtE, tgtU );
gp_Pnt newP = BRepAdaptor_Curve( tgtE ).Value( tgtU );
double dist = newP.Distance( tgtP );
double tol = BRep_Tool::Tolerance( tgtE );
if ( tol < dist && dist < 1000*tol )
tgtMeshDS->MoveNode( n, newP.X(), newP.Y(), newP.Z() );
}

View File

@ -992,10 +992,6 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
{
const std::vector<double>& aPnts = _fpHyp->GetPoints();
std::vector<int> nbsegs = _fpHyp->GetNbSegments();
if ( theReverse )
std::reverse( nbsegs.begin(), nbsegs.end() );
if ( nbsegs.empty() )
nbsegs.push_back( 1 );
// sort normalized params, taking into account theReverse
TColStd_SequenceOfReal Params;
@ -1033,6 +1029,16 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
uVec.back() = theLastU;
// divide segments
if ( theReverse )
{
if ((int) nbsegs.size() > Params.Length() + 1 )
nbsegs.resize( Params.Length() + 1 );
std::reverse( nbsegs.begin(), nbsegs.end() );
}
if ( nbsegs.empty() )
{
nbsegs.push_back( 1 );
}
Params.InsertBefore( 1, 0.0 );
Params.Append( 1.0 );
double eltSize, segmentSize, par1, par2;