mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
[Bug PAL7763] Length 2D and Border at Multi-Connection 2D during clipping incorrect
This commit is contained in:
parent
7dbc79c51d
commit
7dd674bbe4
@ -162,15 +162,14 @@ void SMESH_DeviceActor::SetUnstructuredGrid(vtkUnstructuredGrid* theGrid){
|
|||||||
//myIsShrinkable = theGrid->GetNumberOfCells() > 10;
|
//myIsShrinkable = theGrid->GetNumberOfCells() > 10;
|
||||||
myIsShrinkable = true;
|
myIsShrinkable = true;
|
||||||
|
|
||||||
myExtractGeometry->SetInput(theGrid);
|
myExtractUnstructuredGrid->SetInput(theGrid);
|
||||||
|
|
||||||
myExtractUnstructuredGrid->SetInput(myExtractGeometry->GetOutput());
|
|
||||||
myMergeFilter->SetGeometry(myExtractUnstructuredGrid->GetOutput());
|
myMergeFilter->SetGeometry(myExtractUnstructuredGrid->GetOutput());
|
||||||
|
|
||||||
theGrid = static_cast<vtkUnstructuredGrid*>(myMergeFilter->GetOutput());
|
myExtractGeometry->SetInput(myMergeFilter->GetOutput());
|
||||||
|
|
||||||
int anId = 0;
|
int anId = 0;
|
||||||
myPassFilter[ anId ]->SetInput( theGrid );
|
myPassFilter[ anId ]->SetInput( myExtractGeometry->GetOutput() );
|
||||||
myPassFilter[ anId + 1]->SetInput( myPassFilter[ anId ]->GetOutput() );
|
myPassFilter[ anId + 1]->SetInput( myPassFilter[ anId ]->GetOutput() );
|
||||||
|
|
||||||
anId++; // 1
|
anId++; // 1
|
||||||
@ -233,16 +232,14 @@ void SMESH_DeviceActor::SetControlMode(SMESH::Controls::FunctorPtr theFunctor,
|
|||||||
if(NumericalFunctor* aNumericalFunctor = dynamic_cast<NumericalFunctor*>(theFunctor.get())){
|
if(NumericalFunctor* aNumericalFunctor = dynamic_cast<NumericalFunctor*>(theFunctor.get())){
|
||||||
for(vtkIdType i = 0; i < aNbCells; i++){
|
for(vtkIdType i = 0; i < aNbCells; i++){
|
||||||
vtkIdType anId = myExtractUnstructuredGrid->GetInputId(i);
|
vtkIdType anId = myExtractUnstructuredGrid->GetInputId(i);
|
||||||
vtkIdType anId2 = myExtractGeometry->GetElemObjId(anId);
|
vtkIdType anObjId = myVisualObj->GetElemObjId(anId);
|
||||||
vtkIdType anObjId = myVisualObj->GetElemObjId(anId2);
|
|
||||||
double aValue = aNumericalFunctor->GetValue(anObjId);
|
double aValue = aNumericalFunctor->GetValue(anObjId);
|
||||||
aScalars->SetValue(i,aValue);
|
aScalars->SetValue(i,aValue);
|
||||||
}
|
}
|
||||||
}else if(Predicate* aPredicate = dynamic_cast<Predicate*>(theFunctor.get())){
|
}else if(Predicate* aPredicate = dynamic_cast<Predicate*>(theFunctor.get())){
|
||||||
for(vtkIdType i = 0; i < aNbCells; i++){
|
for(vtkIdType i = 0; i < aNbCells; i++){
|
||||||
vtkIdType anId = myExtractUnstructuredGrid->GetInputId(i);
|
vtkIdType anId = myExtractUnstructuredGrid->GetInputId(i);
|
||||||
vtkIdType anId2 = myExtractGeometry->GetElemObjId(anId);
|
vtkIdType anObjId = myVisualObj->GetElemObjId(anId);
|
||||||
vtkIdType anObjId = myVisualObj->GetElemObjId(anId2);
|
|
||||||
bool aValue = aPredicate->IsSatisfy(anObjId);
|
bool aValue = aPredicate->IsSatisfy(anObjId);
|
||||||
aScalars->SetValue(i,aValue);
|
aScalars->SetValue(i,aValue);
|
||||||
}
|
}
|
||||||
@ -361,8 +358,7 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor
|
|||||||
anIdList->SetNumberOfIds(2);
|
anIdList->SetNumberOfIds(2);
|
||||||
|
|
||||||
MultiConnection2D::MValues::const_iterator anIter = aValues.begin();
|
MultiConnection2D::MValues::const_iterator anIter = aValues.begin();
|
||||||
int i = 0;
|
for(vtkIdType aVtkId = 0; anIter != aValues.end(); anIter++,aVtkId++){
|
||||||
for(vtkIdType aVtkId; anIter != aValues.end(); anIter++,i++){
|
|
||||||
const MultiConnection2D::Value& aValue = (*anIter).first;
|
const MultiConnection2D::Value& aValue = (*anIter).first;
|
||||||
int aNode[2] = {
|
int aNode[2] = {
|
||||||
myVisualObj->GetNodeVTKId(aValue.myPntId[0]),
|
myVisualObj->GetNodeVTKId(aValue.myPntId[0]),
|
||||||
@ -373,7 +369,7 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor
|
|||||||
anIdList->SetId( 1, aNode[1] );
|
anIdList->SetId( 1, aNode[1] );
|
||||||
aConnectivity->InsertNextCell( anIdList );
|
aConnectivity->InsertNextCell( anIdList );
|
||||||
aCellTypesArray->InsertNextValue( VTK_LINE );
|
aCellTypesArray->InsertNextValue( VTK_LINE );
|
||||||
aScalars->SetValue(i,(*anIter).second);
|
aScalars->SetValue(aVtkId,(*anIter).second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user