Skip to content

Model representation and resource tree for ParaView.

David Thompson requested to merge dcthomp/smtk:additional-representations into master

This commit contains many changes from @alvaro.sanchez and me to address:

  • Color-by-entity and -by-volume mode for the model representation. In cases where the begin() entity is invalid, volumeOfEntity() would return an entity not flagged as being a volume. In order to get access to an EntityRef's color property, pqRepresentation provides a smtk::model::ManagerPtr to the vtkSMTKModelRepresentation object. The appropriate EntityRef is queried from model::ManagerPtr (Resource) depending on the active coloring mode; color-by-entity uses direclty its entity color and color-by-volume uses the color of the 0th volume bounded by the entity.
  • Use pqSMTKResource's model::Manager instead of a global instance.
  • Representation subtypes (points, wireframe, surface, surface with edges) for the model representation.
  • Line color for the model representation.
  • Representation class location. Move the server-side classes to the PV server extension and add pqProxy subclasses to the appcomponents extension. This is necessary to avoid cyclic dependencies between the representation and the resource panel (which will soon display/modify the representation's visibility information).
  • Move DescriptivePhrase subclasses (that describe content) into a PhraseContent class, instances of which are owned by DescriptivePhrase. This separates the hierarchy of subjects from the content of the subject so that attributes of the subject can be overridden via the decorator pattern. This leaves phrase lists with improper descriptions at the moment since the common/union flag values are not set properly (among other things).
  • Displaying "eyeball" visibility icon selectively -- only when the PhraseContent advertises it as available is it rendered and active.
  • Use the new visitor method of vtkCompositeDataDisplayAttributes to fetch per-view block visibility information from mappers and add methods to set the per-block visibility, although this is not complete yet. This requires us to bump VTK and PV forward, which in turn requires us to Fix build issues due to changes in wrapping.
    • Fixes errors: No rule to make target '*Hierarchy'.
    • Manually excludes classes that do not need wrapping.
  • Try to keep ENTITYID out of SMTK except for the vtkModelMultiBlockSource.
  • Attach UUID to both the multiblock metadata and the actual vtkDataObject instance. The latter is preferrable in almost every instance since it is then possible for methods passed only a data object to get its UUID. This is necessary for the PV representation's visibility modification queries to work properly since, when iterating over visibility entries in vtkCompositeDataDisplayAttribute, only the block is available, not its metadata.
  • Add missing parts to representation xml: property to enable/disable multi-block inspector coloring.
  • Create and make representations visible by default in new views. pqApplyBehavior makes the model visible on the initial view. Additional views need to create and make their representations visible, this is done through pqSMTKBehavior.
  • Fix some crashes by holding a weak ref to the selection.

Merge request reports