//=======================================================================
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() ||
{
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
//=======================================================================
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();
// 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 );
return;
Handle(SALOME_InteractiveObject) anIO = anActor->getIO();
- //mySelectionMgr->clearSelected();
- //mySelectionMgr->AddIObject(anIO, false);
SALOME_ListIO aList;
aList.Append(anIO);
mySelectionMgr->setSelectedObjects(aList, false);
# 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.
{
return myPoints;
}
- if (( myNbPonits > 0 ) &&
+ if (( u2node.size() > 0 ) &&
( u2node.begin()->first < 0 || u2node.rbegin()->first > 1 ))
{
return myPoints;
}
}
- //centerIntErrorIsSmall = true;
- //bndErrorIsSmall = true;
+ centerIntErrorIsSmall = true; // 3D_mesh_Extrusion_00/A3
+ bndErrorIsSmall = true;
if ( !centerIntErrorIsSmall )
{
// Compensate the central error; continue adding projection
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;
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() );
}
{
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;
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;