A couple comments that may be of some help.
WRT #1. The MDL example "imodelvisitor" has a method that may be of help called: Reporter::ReportFacetSet. A few key lines are:
imodelvisitor\Reporter.cpp:843: int pCount = pFacets->GetPointCount(); imodelvisitor\Reporter.cpp:844: int fCount = pFacets->GetPointIndexCount(); imodelvisitor\Reporter.cpp:852: ReportDpoint3d (L"Facet_Point",*pFacets->GetPoint(i),loopNodeP,Adjustment_None); imodelvisitor\Reporter.cpp:855: const Int32 * pFacetIndex = pFacets->GetPointIndices();
WRT #4
When implementing an IElementGraphicsProcessor consider the two output options for _ProduceGPAs and _ProduceFacets, taking careful note of the "param comments" of each:
struct IElementGraphicsProcessor { //! Allow open curves, closed curves, and regions to be output as a GPArray. Necessary for collecting //! higher level graphics such as complex strings, complex shapes, and regions. //! @param[in] isCurved Graphics output would contain non-linear geometry. //! @note When returning true you also need to implement _ProcessGPA. virtual bool _ProduceGPAs (bool isCurved) const {return true;} //! Allow surface and solid geometry to be output as a facet set. //! @param[in] isIndexedPoly Output will be from a call to AddIndexPolys, ex. mesh element. //! @return true to output facets for surface and solid geometry. //! @note When returning true you also need to implement _ProcessFacets. virtual bool _ProduceFacets (bool isIndexedPoly) const {return isIndexedPoly;}
FYI. Imodelvisitor sample also has some code for working with GPAs here: imodelvisitor\Reporter.cpp:872:void Reporter::ReportGPArray
HTH,
Bob