← Back to team overview

yade-dev team mailing list archive

Re: Potential Blocks and Potential Particles - Documentation


Hi Boon,

thanks for you reply. Yes, I think that this marching cubes method
can work really good. The only missing thing is to make the caching
of calculated triangles correctly. Once the triangles for the shape
are calculated you can use them all the time, unless the body deforms or
is cut in half (I'm not sure if this can happen).

A thing to discuss: you could store cached triangles not inside
Gl1_PotentialParticle but inside PotentialParticle with Attr::hidden
or (Attr::hidden|Attr::noSave). For example see into
pkg/common/Cylinder.hpp as an example. In this way you will not need
this loop in pkg/common/Gl1_PotentialParticle.cpp line 112, and
automatically you have solved the problem what to draw when a body
was deleted or added to scene. Because you only recalculate marching
cubes for particular single body when you need to draw it and it
wasn't generated yet.

I hope that the post which I have just sent to mailing list about
object oriented design deficiencies of your code wasn't too harsh.
My apologies.

best regards

Chia Weng Boon said:     (by the date of Sat, 26 Jan 2019 11:12:40 +0800)

> Dear Janek,
> I will look into it. Thanks. In the python script, the vtk files at
> specific time intervals are output into the vtk folder.  I have been using
> ParaView mainly for visualisation for both Potential Particles and
> Potential Blocks.  The colour of the particles can also be changed in
> ParaView.  I suspect that the Marching Cube display is not showing the
> position and size of the particles correctly (I abandoned the marching
> cubes quite long ago, but agree that real time display with simulation is
> more user friendly)
> Let me check the example files again.
> Boon

Follow ups