usnistgov / STP2X3D

Translator from STEP format to X3D format
Other
77 stars 29 forks source link

ap242 GDT abnormal #10

Open N3GIS opened 1 year ago

N3GIS commented 1 year ago

image The ap242 STP format model, GDT does not display correctly.

The STP model download address for AP242. https://www.nist.gov/system/files/documents/noindex/2023/02/22/NIST_CTC_STEP_PMI.zip

soonjokwon commented 1 year ago

Hi. The current code highlights only the faces GD&T assigned, not graphic PMIs. GDTs are not shown correctly because the current OCCT does not successfully translate the graphic PMIs from STEP files.

N3GIS commented 1 year ago

This is indeed a bug in OCCT. I see that you have the following paragraph in your code:

// STEP_Reader.cpp ,In line 566 position double val = aDimObject->GetValue(); double lowerTolVal = aDimObject->GetLowerTolValue(); double lowerBoundVal = aDimObject->GetLowerBound(); double upperTolVal = aDimObject->GetUpperTolValue(); double upperBound = aDimObject->GetUpperBound();

Now that the val value has been obtained, I want to dynamically create a TDF_Label, assign the val value to the TDF_Label, and then convert the TDF_Label to TopoDS_Shape and add it to the gdt, I want to fix the OCCT bug in this way, but it didn't work, I don't know if it works.

soonjokwon commented 1 year ago

I know that the values can be obtained. These are "Semantic GDTs" from STEP files. But the problem is "Graphic GDTs" from STEP files. They are dots and lines that graphically represent the GDTs in 3D space. I don't think you can create Graphic from Semantic.