[Bug] vtkPlanes: a change to the plane points or normals does not update the clip filters
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
Línea de trabajo
Empieza en Sources/Common/DataModel/Planes/index.js:290, donde se exponen los puntos y las normales, e inspecciona cómo informa vtkPlanes de su tiempo de modificación. La reproducción del issue muestra la salida obsoleta a través de vtkClipPolyData; ejecútala después de actualizar el comportamiento de MTime y confirma que xmin after es 0.5. Comprueba también el mismo comportamiento en vtkCutter, que, según el issue, depende del MTime de la función implícita.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug description
Sources/Common/DataModel/Planes/index.js:290 gives access to points and
normals through macro.setGet. vtkPlanes does not override getMTime.
If you move a plane with a change to these arrays and call their
modified(), the vtkPlanes MTime does not change. vtkClipPolyData and
vtkCutter use only the MTime of the implicit function, so they keep their
old output.
Steps to reproduce
- Run this code:
import vtkPoints from '@kitware/vtk.js/Common/Core/Points';
import vtkDataArray from '@kitware/vtk.js/Common/Core/DataArray';
import vtkPlanes from '@kitware/vtk.js/Common/DataModel/Planes';
import vtkPolyData from '@kitware/vtk.js/Common/DataModel/PolyData';
import vtkClipPolyData from '@kitware/vtk.js/Filters/Core/ClipPolyData';
const points = vtkPoints.newInstance();
points.setData(new Float32Array([0, 0, 0]), 3);
const normals = vtkDataArray.newInstance({
numberOfComponents: 3,
values: new Float32Array([1, 0, 0]),
});
const planes = vtkPlanes.newInstance();
planes.setPoints(points);
planes.setNormals(normals);
const quad = vtkPolyData.newInstance();
quad.getPoints().setData(
new Float32Array([-1, -1, 0, 1, -1, 0, 1, 1, 0, -1, 1, 0]),
3
);
quad.getPolys().setData(new Uint32Array([4, 0, 1, 2, 3]));
const clip = vtkClipPolyData.newInstance({ clipFunction: planes });
clip.setInputData(quad);
console.log('xmin before', clip.getOutputData().getBounds()[0]);
// Move the plane from x = 0 to x = 0.5.
points.setPoint(0, 0.5, 0, 0);
points.modified();
console.log('xmin after', clip.getOutputData().getBounds()[0]);
Detailed Behavior
The output is:
xmin before 0
xmin after 0
A new filter with the plane at x = 0.5 gives xmin 0.5. The old filter does
not execute again.
Expected Behavior
vtkPlanes.getMTime() includes the MTime of the points and the normals. The
filter executes again and xmin after is 0.5.
Environment
- vtk.js version: master (
67328bc3ef) - Browsers: Chromium (Playwright, Vitest 5 browser mode)
- OS: Windows 11
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.5k
- Forks
- 428
- Merge medio
- 5 d 9 h
- PR fusionados (30 d)
- 22
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Kitware/vtk-js
-
type: bug 🐞
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
type: bug 🐞
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 2 días
-
[Bug] vtkTransform: transformNormals and transformVectors do not mark the output as modifiedAbiertotype: bug 🐞
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 2 días
-
type: bug 🐞
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 2 días
-
type: bug 🐞
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 2 días
Todos los issues de Kitware/vtk-js
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
postcss/postcss.org#302 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ImranR98/apps.obtainium.imranr.dev#2000 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
routing: the tray panel's stage stands still with motion reduced while a request is in flightAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
microsoft/monaco-editor#5577 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Ebony-Vinyl/dsh-our-free-model#785 ·
Los mantenedores suelen responder en 1 día