]> OCCT Git - occt.git/commitdiff
0032556: Data Exchange - A toroidal part of solid is corrupted while writing or readi...
authordpasukhi <dpasukhi@opencascade.com>
Fri, 3 Sep 2021 11:42:02 +0000 (14:42 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 3 Sep 2021 17:19:54 +0000 (20:19 +0300)
Fix STEP writing Wire for periodic surface

src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx
tests/bugs/step/bug25989
tests/bugs/step/bug32556 [new file with mode: 0644]

index b5176d2d7f482277751bf9a611979f51f74b46fd..5ee5a6e1242f522af0b2077429515fcdf2b08b6c 100644 (file)
@@ -197,8 +197,8 @@ void TopoDSToStep_MakeStepWire::Init(const TopoDS_Wire& aWire,
 
 //#11 ItW.Init(ForwardWire, aTool.CurrentFace());
 //#11 for (;ItW.More();ItW.Next()) {
-    Handle(ShapeFix_Wire) STW = new ShapeFix_Wire;
-    STW->Load (ForwardWire);
+    Handle(ShapeFix_Wire) STW =
+      new ShapeFix_Wire(ForwardWire, aTool.CurrentFace(), Precision::Confusion());
     STW->FixReorder();
     Handle(ShapeExtend_WireData) sbwd = STW->WireData();
     Standard_Integer nb = sbwd->NbEdges();
index efcc5f47a1f651cbb9ed39ed35f0de04d6bd9b5b..4d4651ed1efdac694eafe2bdf230886017291da2 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO OCC25989 ALL: Error : The volume of result shape is"
-
 puts "========"
 puts "OCC25989"
 puts "========"
diff --git a/tests/bugs/step/bug32556 b/tests/bugs/step/bug32556
new file mode 100644 (file)
index 0000000..05aba8e
--- /dev/null
@@ -0,0 +1,30 @@
+puts "========================"
+puts "0032556: Data Exchange - A toroidal part of solid is corrupted while writing or reading STEP file"
+puts "========================"
+
+# Create fused shape
+ptorus a1 5 3
+plane pp 5 0 -5
+pcylinder a2 pp 2 10
+bfuse a a1 a2 
+
+# Write fused shape
+testwritestep ${imagedir}/${casename}.stp a
+# Read fused shape
+testreadstep ${imagedir}/${casename}.stp res
+
+file delete ${imagedir}/${casename}.stp
+
+# Check fused shape
+checkshape res f
+checknbshapes res -edge 12 -vertex 7
+checkprops res -s 649.9
+
+# Display result fused shape
+clear
+smallview
+donly res
+isos res 0
+fit
+isos res 2
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png