1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0031465: Data Exchange, RWObj_Reader - skip duplicating smooth groups

RWObj_Reader::pushSmoothGroup() now ignores smooth groups statements pointing to the same group.
This commit is contained in:
kgv
2020-03-26 13:48:09 +03:00
committed by bugmaster
parent 7f24b768c3
commit 85b147584e
2 changed files with 720 additions and 0 deletions

View File

@@ -704,6 +704,14 @@ void RWObj_Reader::pushSmoothGroup (const char* theSmoothGroupIndex)
{
aNewSmoothGroup.Clear();
}
if (myActiveSubMesh.SmoothGroup.IsEqual (aNewSmoothGroup))
{
// Ignore duplicated statements to workaround some weird OBJ files.
// Note that smooth groups are handled in different manner than groups and objects,
// which always flushed even with equal names.
return;
}
if (addMesh (myActiveSubMesh, RWObj_SubMeshReason_NewSmoothGroup))
{
myPackedIndices.Clear(); // vertices might be duplicated after this point...