visualize boxes in paraview

Bug #1026474 reported by Christian Jakob
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Fix Released
Wishlist
Unassigned

Bug Description

VTKRecorder should export boxes for post processing with Paraview.

Changed in yade:
importance: Undecided → Wishlist
Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

I would try to implement, if it is not too complicated ... Surely need some help on it!

Revision history for this message
Anton Gladky (gladky-anton) wrote : Re: [Bug 1026474] Re: visualize boxes in paraview

Hi Christian,

I would recommend you to have a look, how facets are exporting [1], [2].
It should be something similar.

Be careful, VTKRecorder is a little messy.

Anton

[1] https://github.com/yade/trunk/blob/master/pkg/dem/VTKRecorder.cpp#L138
[2] https://github.com/yade/trunk/blob/master/pkg/dem/VTKRecorder.cpp#L345

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

I already started ...

for facets vtkTriangle is used, but boxes are cuboids. There is no vtkCuboid for that, so what to do?
Divide the cuboid into rectangles and use vtkRectangle?

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

Do we need this boxesCells for vtk?
It should contain id of the body and id of the points (in this case 8 points per body). I dont know how to implement it, in interactions intrsCells is based on vtkLine (2 points), while in facets facetsCells is based on vtkTriangle (3 points). So what to do with the 8 points from a cuboid?

Please give me a hint how to proceed in lines 406,413,418 and 514 here:

https://github.com/jakob-ifgt/trunk/blob/7d204b604218ea6c3e11a91f982ea2290e46c734/pkg/dem/VTKRecorder.cpp

Thanks in advance,

Christian

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :
Revision history for this message
Anton Gladky (gladky-anton) wrote :

It seems, there is something wrong with an order of setting points.

Anton

Revision history for this message
Anton Gladky (gladky-anton) wrote :

It should be fixed in f01916a9.

Christian, I have applied your patches, but decided to fix the issue with rectangles.
If you are not agreed, feel free to provide a patch.

Thanks.

Anton

Changed in yade:
status: New → Fix Released
Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

Great job Anton!

I think it is the best way to handle boxes with vtk exporter.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.