0

Layers or Groups in Exporter

Anonymous 10 years ago 0
This discussion was imported from CodePlex

Capn_K wrote at 2013-07-30 03:59:

I'm looking at implementing an Exporter that can write 'named layers' (aka 'groups' ) that are defined when the model is created.

At the moment, I'm not entirely sure where to start.

Our code is creating objects using ExtrudedVisual3d and QuadVisual3d which end up as direct children of the viewport.

I was thinking I could create a nested structure of ModelVisual3d elements under the viewport, each of which contains a set of children which make up that layer. But this wouldn't know about the 'name' of that layer.

Similarly, when exporting the decendant exporter class is not called until the base class has traversed down to the Geometry3dModel, at which point it's unaware of the ModelVisual3d which it belongs to.

The obj exporter is the only exporter that I can see which exports groups, but it creates a new group for each GeometryModel3d, which is not what I want in this case.

Should I be looking at Dependency Properties/Attached Properties to achieve this? But where to put them?

Clues? Suggestions?

objo wrote at 2013-09-08 08:48:

Yes, attached properties can be used to set the name of the groups. We could add this property into the library and implement support for it in the exporters. I understand the obj exporter also need some refactoring related to the grouping.

https://helixtoolkit.codeplex.com/workitem/9994