Getting the cell near to the surface points created using Surface Panel.


In some of the applications for post processing, the points on the surfaces created for Post-processing needs to be accessed so that required quantities can be calculated using a user defined function.
After creation of surface/rake/line/point/etc you know its id. let's say it is pid
You can get the surface structure pointer for this point using
Surface *surf = &SurfaceList[pid];
The number of points on this surface will be surf->np

You can get the cx-cell associated with i-th point using
CX_Cell_Id c = surf->points[i].cell; /* see Surf_Point structure */

You can get the cell and thread from this cx-cell using macro
cell_t cell = RP_CELL(&c);
Thread *t = RP_THREAD(&c);

once you get the cell and thread pointer you can get the value at this point.





Show Form
No comments yet. Be the first to add a comment!