Open RobPasMue opened 1 year ago
Not sure this is possible with out current pyvista setup... Colors are usually assigned to actors, and pygeom only ever has 1 actor - the top level design component. Either have to iterate through multiblocks in that one actor, or use multiple actors if we want to implement this color-syncing. Lmk if you see something different.
We made a soft decision to implement this by having multiple actors - either at the component level or body level. Color can be passed from SC API using DesignBody.GetColor(). Probably best to pass this color in the Tessellation message.
Having multiple actors also allows us to have cheaper transform operations. You could now do something like actor.user_matrix = self.get_world_transform()
instead of transforming the PolyData tessellation. Hopefully speeds up plotting significantly.
DesignBody.GetColor()
is not exposed on linux yet, so this would be a windows-only feature.
Partially possible via #1357 - now we have to implement the plotter logic to use this color value.
As part of the JSON information, whenever it is send back, we also get information on the color of each body/component. We should make use of it when plotting.