mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0031050: Data Exchange - XmlXCAF persistence stores triangulation-only Faces without any geometry
BRepTools_ShapeSet now ignores myWithTriangles flag in case if triangulation is the only geometry representation.
This commit is contained in:
@@ -215,7 +215,7 @@ void BRepTools_ShapeSet::AddGeometry(const TopoDS_Shape& S)
|
||||
Handle(BRep_TFace) TF = Handle(BRep_TFace)::DownCast(S.TShape());
|
||||
if (!TF->Surface().IsNull()) mySurfaces.Add(TF->Surface());
|
||||
|
||||
if (myWithTriangles) { // for XML Persistence
|
||||
if (myWithTriangles || TF->Surface().IsNull()) { // for XML Persistence
|
||||
Handle(Poly_Triangulation) Tr = TF->Triangulation();
|
||||
if (!Tr.IsNull()) myTriangulations.Add(Tr);
|
||||
}
|
||||
@@ -751,7 +751,7 @@ void BRepTools_ShapeSet::WriteGeometry(const TopoDS_Shape& S,
|
||||
OS << " " << 0;
|
||||
OS << "\n";
|
||||
}
|
||||
if (myWithTriangles) { // for XML Persistence
|
||||
if (myWithTriangles || TF->Surface().IsNull()) { // for XML Persistence
|
||||
if (!(TF->Triangulation()).IsNull()) {
|
||||
OS << 2;
|
||||
OS << " ";
|
||||
|
Reference in New Issue
Block a user