From 36cc58f85d55ab670bd78ca003d583f7167fa6e9 Mon Sep 17 00:00:00 2001 From: jgv Date: Sun, 7 Jun 2020 22:04:39 +0300 Subject: [PATCH] 0031485: Data Exchange - Export STEP in nonmanifold mode looses all faces except one Small correction in STEPControl_ActorWrite::TransferCompound - take into account the case when a subshape has type TopAbs_FACE. --- src/STEPControl/STEPControl_ActorWrite.cxx | 4 +++- tests/bugs/step/bug31485 | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/step/bug31485 diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index 6a6ee5b351..a1de838efe 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -1315,7 +1315,9 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound (const Handle(T NonManifoldGroup->Append(aSubShell); } } - else if (!isManifold && (aSubShape.ShapeType() == TopAbs_SHELL) ) { + else if (!isManifold && + (aSubShape.ShapeType() == TopAbs_SHELL || aSubShape.ShapeType() == TopAbs_FACE)) + { RepItemSeq->Append(aSubShape); NonManifoldGroup->Append(aSubShape); } diff --git a/tests/bugs/step/bug31485 b/tests/bugs/step/bug31485 new file mode 100644 index 0000000000..db3cc1826e --- /dev/null +++ b/tests/bugs/step/bug31485 @@ -0,0 +1,15 @@ +puts "=====================================================================" +puts "OCC31485: Export STEP in nonmanifold mode looses all faces except one" +puts "=====================================================================" +puts "" + +brestore [locate_data_file bug31485.brep] a + +param write.step.nonmanifold 1 + +testwritestep comp_nonmanifold.step a +testreadstep comp_nonmanifold.step result + +checkshape result + +checknbshapes result -face 3 -- 2.20.1