mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@ -244,7 +244,8 @@ void Foam::fieldVisualisationBase::setField
|
||||
const scalar position,
|
||||
const word& colourFieldName,
|
||||
vtkPolyDataMapper* mapper,
|
||||
vtkRenderer* renderer
|
||||
vtkRenderer* renderer,
|
||||
vtkPolyData* pData
|
||||
) const
|
||||
{
|
||||
mapper->InterpolateScalarsBeforeMappingOn();
|
||||
@ -269,7 +270,6 @@ void Foam::fieldVisualisationBase::setField
|
||||
mapper->SetScalarRange(range_.first(), range_.second());
|
||||
|
||||
// Set to use either cell or point data
|
||||
vtkPolyData* pData = mapper->GetInput();
|
||||
const char* fieldName = colourFieldName.c_str();
|
||||
if (pData->GetCellData()->HasArray(fieldName) == 1)
|
||||
{
|
||||
@ -439,7 +439,7 @@ void Foam::fieldVisualisationBase::addGlyphs
|
||||
{
|
||||
glyph->Update();
|
||||
|
||||
setField(position, colourFieldName, glyphMapper, renderer);
|
||||
setField(position, colourFieldName, glyphMapper, renderer, data);
|
||||
|
||||
glyphMapper->Update();
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -158,7 +158,8 @@ protected:
|
||||
const scalar position,
|
||||
const word& colourFieldName,
|
||||
vtkPolyDataMapper* mapper,
|
||||
vtkRenderer* renderer
|
||||
vtkRenderer* renderer,
|
||||
vtkPolyData* pData
|
||||
) const;
|
||||
|
||||
//- Add glyphs
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -110,7 +110,7 @@ void Foam::functionObjectLine::addGeometryToScene
|
||||
|
||||
vtkSmartPointer<vtkPolyDataMapper> mapper =
|
||||
vtkSmartPointer<vtkPolyDataMapper>::New();
|
||||
setField(position, fieldName_, mapper, renderer);
|
||||
setField(position, fieldName_, mapper, renderer, lines->GetOutput());
|
||||
|
||||
actor_->SetMapper(mapper);
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ void Foam::functionObjectSurface::addGeometryToScene
|
||||
vtkSmartPointer<vtkPolyDataMapper>::New();
|
||||
mapper->SetInputConnection(surf->GetOutputPort());
|
||||
|
||||
setField(position, fieldName_, mapper, renderer);
|
||||
setField(position, fieldName_, mapper, renderer, surf->GetOutput());
|
||||
|
||||
surfaceActor_->SetMapper(mapper);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user