PyNite icon indicating copy to clipboard operation
PyNite copied to clipboard

Custom Quad Local Axes & Improvements to VTK Contour Rendering

Open bjhowie opened this issue 2 months ago • 2 comments

I'm aware that the VTK rendering in the Visualization module is being deprecated, but I've made some changes for my own project that I think dramatically improve the look of the quad and plate contour plots and would be good to include in PyNite. Namely, I have added a subdivision layer that improves the resolution of the underlying scalar field, resulting in smoother looking plots. I've also added an option to use banded contours instead of the default continous colour scale. By default, I've also added an edge extraction filter in order to better see the outline of the individual plates.

Following the issue raised previously (#192), I've also implemented user-defined quad local axes via the use of a vector defined for each quad that gets projected onto the quad to form the local x axis. The local y & z axes are defined as before. There is however a situation where the defined vector is normal to the plane of the quad, in which case another vector needs to be chosen to form the local x axis. I have just defaulted to using the previous definition (the node3 -> node4 vector) in such cases, and also when the local axis vector is set to 'None'. My preference would be to try and align the local y axs with the global y axs when it isn't possible to align the x axes, but this is less backward compatible. By default, the quads now align their local x axis to the global x axis, requiring a slight change to the tank test case telling the quad to use the previous local axis definition.

I have also stored the materal name as an instance attribute for quads and plates to make it consistent with the Member3D class.

All tests are passing.

bjhowie avatar May 07 '24 13:05 bjhowie