Archived issue #0033901
The conversion from STP file format to GLB format encountered an error (information loss).
Description
We used the OCC API to convert from STP to GLB, but an error occurred. After conversion, there was damage on the curved surfaces, and some triangular facets were missing.
STP file before conversion:Attachment 4 (STP)
→ Attachment 7 (PNG)
GLB file after conversion: Attachment 3 (GLB)
→ Attachment 2 (PNG) & Attachment 1 (PNG)
STP file before conversion:Attachment 4 (STP)
→ Attachment 7 (PNG)
GLB file after conversion: Attachment 3 (GLB)
→ Attachment 2 (PNG) & Attachment 1 (PNG)
Steps to reproduce
We used the step_to_glb method in the attached code for conversion, mainly utilizing TopoDS_Compound, BRep_Builder, and Prs3d_Drawer for processing.
Please confirm whether this issue is due to a bug in OCC, causing information loss during conversion?
Please confirm whether this issue is due to a bug in OCC, causing information loss during conversion?
Additional information
LOG("DEBUG data conversion");
TopoDS_Compound aCompound;
BRep_Builder aBuildTool;
aBuildTool.MakeCompound(aCompound);
for (TDF_LabelSequence::Iterator aRootIter(aRootLabels); aRootIter.More(); aRootIter.Next())
{
const TDF_Label& aRootLabel = aRootIter.Value();
TopoDS_Shape aRootShape;
if (XCAFDoc_ShapeTool::GetShape(aRootLabel, aRootShape))
{
aBuildTool.Add(aCompound, aRootShape);
}
}
// perform meshing
Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer(); // holds visualization defaults /* 保留可视化默认值 */
BRepMesh_IncrementalMesh anAlgo;
anAlgo.ChangeParameters().Deflection = 0.1;
anAlgo.ChangeParameters().Angle = 20.0 * M_PI / 180.0; // 20 degrees
anAlgo.ChangeParameters().InParallel = true;
anAlgo.SetShape(aCompound);
anAlgo.Perform();
LOG("DEBUG data conversion finished");
TopoDS_Compound aCompound;
BRep_Builder aBuildTool;
aBuildTool.MakeCompound(aCompound);
for (TDF_LabelSequence::Iterator aRootIter(aRootLabels); aRootIter.More(); aRootIter.Next())
{
const TDF_Label& aRootLabel = aRootIter.Value();
TopoDS_Shape aRootShape;
if (XCAFDoc_ShapeTool::GetShape(aRootLabel, aRootShape))
{
aBuildTool.Add(aCompound, aRootShape);
}
}
// perform meshing
Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer(); // holds visualization defaults /* 保留可视化默认值 */
BRepMesh_IncrementalMesh anAlgo;
anAlgo.ChangeParameters().Deflection = 0.1;
anAlgo.ChangeParameters().Angle = 20.0 * M_PI / 180.0; // 20 degrees
anAlgo.ChangeParameters().InParallel = true;
anAlgo.SetShape(aCompound);
anAlgo.Perform();
LOG("DEBUG data conversion finished");
Public activity
4 archived notes
Participants are labeled by their role within this record.
Commenter 3
Please do not add members unrelated to this issue to monitoring users.
Please do not add members unrelated to this issue to monitoring users.
Attachment 1 (PNG) (130,316 bytes)
Attachment 2 (PNG) (123,113 bytes)
Attachment 3 (GLB) (186,748 bytes)
Attachment 4 (STP) (180,377 bytes)
Attachment 5 (CPP) (14,585 bytes)
Attachment 6 (H) (179 bytes)
Attachment 7 (PNG) (314,800 bytes)
Commenter 4
Are you referring to the assignment to Commenter 1?
It seems that the personnel were assigned automatically, and I didn't make any special settings.
Sorry, I'm not very familiar with this process.
Are you referring to the assignment to Commenter 1?
It seems that the personnel were assigned automatically, and I didn't make any special settings.
Sorry, I'm not very familiar with this process.
Dear Commenter 4 and Commenter 3
Mantis is used for keeping history or having private tickets (in parallel with Jira).
All new bug reports need to be shared in GitHub: https://github.com/Open-Cascade-SAS/OCCT/issues/154
In case if you need commercial (high-priority) support, need to contact client service by contact form in our web site (https://dev.opencascade.org/webform/contact_us) or https://occt3d.com/custom-software-development-services/
In case of community report, please share your ticket in GitHub
[signature removed]Dmitrii.
Mantis is used for keeping history or having private tickets (in parallel with Jira).
All new bug reports need to be shared in GitHub: https://github.com/Open-Cascade-SAS/OCCT/issues/154
In case if you need commercial (high-priority) support, need to contact client service by contact form in our web site (https://dev.opencascade.org/webform/contact_us) or https://occt3d.com/custom-software-development-services/
In case of community report, please share your ticket in GitHub
[signature removed]Dmitrii.