-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
aSOrigin->setChecked( true );
#ifndef MINDIST_ENABLE_ELEMENT
aFElem->setEnabled( false ); // NOT AVAILABLE YET
- aSElem->setEnabled( false ); // NOT AVAILABLE YET
+ //aSElem->setEnabled( false ); // NOT AVAILABLE YET
#endif
#ifndef MINDIST_ENABLE_OBJECT
aFObject->setEnabled( false ); // NOT AVAILABLE YET
- aSObject->setEnabled( false ); // NOT AVAILABLE YET
+ //aSObject->setEnabled( false ); // NOT AVAILABLE YET
#endif
myDX->setReadOnly( true );
myDY->setReadOnly( true );
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( 1 );
aCells->InitTraversal();
- for( vtkIdType idType = 0, *pts, npts; aCells->GetNextCell( npts, pts ); idType++ )
+ vtkIdType const *pts(nullptr);
+ for( vtkIdType idType = 0, npts; aCells->GetNextCell( npts, pts ); idType++ )
aCellLocationsArray->SetValue( idType, aCells->GetTraversalLocation( npts ) );
aGrid->SetCells( aCellTypesArray, aCellLocationsArray, aCells );
aCellLocationsArray->Delete();
if ( isOrigin ) {
x2 = y2 = z2 = 0.;
}
- else {
+ else if ( mySecond->checkedId() == NodeTgt ) {
coord = s2->GetMesh()->GetNodeXYZ( result.node2 );
x2 = coord[0]; y2 = coord[1]; z2 = coord[2];
}
+ else
+ {
+ x2 = result.maxX; y2 = result.maxY; z2 = result.maxZ;
+ }
createPreview( x1, y1, z1, x2, y2, z2 );
displayPreview();
}
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( 12 );
aCells->InitTraversal();
- for( vtkIdType idType = 0, *pts, npts; aCells->GetNextCell( npts, pts ); idType++ )
+ vtkIdType const *pts(nullptr);
+ for( vtkIdType idType = 0, npts; aCells->GetNextCell( npts, pts ); idType++ )
aCellLocationsArray->SetValue( idType, aCells->GetTraversalLocation( npts ) );
aGrid->SetCells( aCellTypesArray, aCellLocationsArray, aCells );
aCellLocationsArray->Delete();