# Extending the auxiliary geometry extension

**URL:** https://discourse.kitware.com/t/extending-the-auxiliary-geometry-extension/100
**Category:** Using SMTK
**Created:** [May 4, 2018, 2:44pm UTC](https://discourse.kitware.com/t/extending-the-auxiliary-geometry-extension/100 "2018-05-04T14:44:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dcthomp](https://discourse.kitware.com/user_avatar/discourse.kitware.com/dcthomp/32/10_2.png) [@dcthomp](https://discourse.kitware.com/u/dcthomp)
#### Post date: [May 4, 2018, 2:44pm UTC](https://discourse.kitware.com/t/extending-the-auxiliary-geometry-extension/100/1 "2018-05-04T14:44:57Z")

</div>

@Haocheng_Liu I see at least part of the problem you have with the RGG session. It needs not only to indicate that the `.rgg` file can be loaded but also to add it to the VTK cache. Since it adds dependencies beyond VTK, it should not be in the vtkSMTKSourceExt library. I think the best path forward is to

- Modify `vtkModelMultiBlockSource.cxx` to call `smtk::common::Extension::visitAll(...)` instead of calling `canHandle` on the instance of `vtkAuxiliaryGeometryExtension` that it creates. It should still create that instance and query it for the cached geometry.
- Add a method to `vtkAuxiliaryGeometryExtension` that subclasses can call to add a vtkDataObject to the cache. Call it `addCacheEntry()`.
- Have a new `smtk::bridge::rgg::AuxiliaryGeometryExtension` class inherit `vtkAuxiliaryGeometryExtension` and call `addCacheEntry()` inside its `canHandle()` override.

---

<div class="post-metadata">

### Author: ![Haocheng\_Liu](https://discourse.kitware.com/user_avatar/discourse.kitware.com/haocheng_liu/32/36_2.png) [@Haocheng\_Liu](https://discourse.kitware.com/u/Haocheng_Liu)
#### Post date: [May 5, 2018, 3:27am UTC](https://discourse.kitware.com/t/extending-the-auxiliary-geometry-extension/100/2 "2018-05-05T03:27:02Z")

</div>

[SMTK MR1111](https://gitlab.kitware.com/cmb/smtk/merge_requests/1111) addresses the issue.
