Unable to get "COMPLEX_TRIANGULATED_SURFACE_SET" from graphical PMI shapes in a STEP file

Hi!

I'm developing an application that translates a STEP file into an X3D file.
Recently, I'm trying to translate the graphical PMI shapes from a STEP file and visualize them.
I'm using OCCT 7.5.0.

I'm currently testing the NIST CTC models. I've attached two of them. Please find the zip file.
nist_ctc_03.png shows that all graphical PMIs were well tessellated and visualized.
nist_ctc_04.png shows that no graphical PMI was tessellated and visualized.

After comparing two STEP files as texts, my assumption is that OCCT currently does not support and translate "COMPLEX_TRIANGULATED_SURFACE_SET", a type of STEP entities, that is presented in ctc_04 but not in ctc_03.
Also, I couldn't find a code that deals with "COMPLEX_TRIANGULATED_SURFACE_SET" from the following link: https://github.com/Open-Cascade-SAS/OCCT/tree/master/src/StepVisual
I might be wrong on this matter.

Oddly, CAD Assistant can successfully visualize graphical PMIs in both models.

A part of my code to get the graphical PMI shapes from a STEP file is as follows.
Please let me know If I'm doing something wrong and how to solve this.

Thank you!

----------------------------------------------------------------------------------------
Handle(TDocStd_Document) doc = new TDocStd_Document("MDTV-XCAF");
Handle(XCAFDoc_DimTolTool) m_gdtTool= XCAFDoc_DocumentTool::DimTolTool(doc->Main());

TDF_LabelSequence label_geoms;
m_gdtTool->GetGeomToleranceLabels(label_geoms);
int geomSize = label_geoms.Length();

// Geometric Tolerances
for (int i = 1; i <= geomSize; ++i)
{
const TDF_Label& label_geom = label_geoms.Value(i);

Handle(XCAFDoc_GeomTolerance) aGeomAttr;
label_geom.FindAttribute(XCAFDoc_GeomTolerance::GetID(), aGeomAttr);

if (!aGeomAttr.IsNull())
{
Handle(XCAFDimTolObjects_GeomToleranceObject) aGeomObject = aGeomAttr->GetObject();
const TopoDS_Shape& graphicalPMIShape = aGeomObject->GetPresentation();
........................
(Followed by codes that tessellates and stores the above graphical PMI shape.)
}
}

Kirill Gavrilov's picture

my assumption is that OCCT currently does not support and translate "COMPLEX_TRIANGULATED_SURFACE_SET"

Indeed, triangulation entities are not yet supported by OCCT STEP translator.

Oddly, CAD Assistant can successfully visualize graphical PMIs in both models.

No, it doesn't - probably you've been confused by semantic / pre-tessellated PMI options in CAD Assistant.

Soonjo Kwon's picture

Thank you for the answer!

1. I see the issue was first reported two years ago. It seems this cannot be easily implemented..
Is it going to be supported in the upcoming release 7.6.0?
Is there another way to make it work at the moment?

2. Yes. I was confused. Pre-tessellated PMI does not show up.

Kirill Gavrilov's picture

It seems this cannot be easily implemented..
Is it going to be supported in the upcoming release 7.6.0?

It doesn't look like anybody working on this feature. This, however, doesn't mean that it is difficult to implement - there is a plenty of other feature requests / bugs to process in OCCT, so that less critical issues just go out of focus. You may always consider proposing a patch yourself or use support program to push features / bugs important for your project faster.