0031485: Data Exchange - Export STEP in nonmanifold mode looses all faces except one
authorjgv <jgv@opencascade.com>
Sun, 7 Jun 2020 19:04:39 +0000 (22:04 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 10 Jun 2020 17:41:40 +0000 (20:41 +0300)
Small correction in STEPControl_ActorWrite::TransferCompound - take into account the case when a subshape has type TopAbs_FACE.

src/STEPControl/STEPControl_ActorWrite.cxx
tests/bugs/step/bug31485 [new file with mode: 0644]

index 6a6ee5b..a1de838 100644 (file)
@@ -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 (file)
index 0000000..db3cc18
--- /dev/null
@@ -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