[EN]
Good morning, I am trying to simulate the passage of a trajectory through a mesh. This trajectory has a series of points and movements, each movement goes from one point to the next and has a determined speed. My final intention is to load a mesh that is a large cube, load it in .vtu format with all cells hidden, and have this trajectory reveal the cells it intersects along the way. For now, my idea is to first create a mapping to know at what moment which cells are activated, but I don’t know how to activate them or how to intersect the trajectory with the mesh. I have tried using a CellLocator, but it either doesn’t work for some reason or I am not using it correctly. I can’t figure out how to perform this simulation and see the cells being activated in the RenderWindow. I’m currently programming in C#.
[ES]
Buenos días, estoy intentando simular el paso de una trayectoria por una malla, esta trayectoria tiene una serie de puntos y de movimientos, cada movimiento se mueve de un punto al siguiente y tiene una velocidad determinada. Mi intención final es, cargar una malla que sea un cubo grande, lo cargo en formato .vtu y con todas las celdas ocultas, y que esta trayectoria vaya mostrando las celdas que corta a su paso, de momento mi idea es hacer un mapeado primero para saber en qué instante se activan qué celdas, pero no sé ni como activarlas ni como hacer el corte de la trayectoria con la malla, he intentado usar un CellLocator pero o no funciona por alguna razón o no lo estoy utilizando correctamente. No se me ocurre como puedo hacer esta simulación y poder ver en pantalla como se van activando las celdas en la RenderWindow. Lo estoy programando en C#.
Hello,
What have you done so far in terms of code?
regards,
PC
Hi! Thank you for your answer! Currently, I’ve programmed the parser for the Karel code files and stored the points in a list of doubles. The linear movements are stored in a new object that contains the destination point, the speed of the movement, and the precision for the trajectory. I also have a vtkUnstructuredGrid of the mesh, which I’m trying to activate its cells. The missing part is the simulation to perform the movements. I’ve also mapped the instants when the points of the trajectory (vtkLine) are being activated (the instant when the trajectory “grows” to that point). All this is programmed in 3D and C#.