]> OCCT Git - occt.git/commitdiff
0025188: Data Exchange, Step Export - Losing shapes after import
authorichesnok <ichesnok@opencascade.com>
Fri, 19 Jan 2024 15:45:16 +0000 (15:45 +0000)
committervglukhik <vglukhik@opencascade.com>
Fri, 2 Feb 2024 12:10:51 +0000 (12:10 +0000)
Check on null for description added to WriteStep methods
(for product, product_definition and product_definition_formation)

src/RWStepBasic/RWStepBasic_RWProduct.cxx
src/RWStepBasic/RWStepBasic_RWProductDefinition.cxx
src/RWStepBasic/RWStepBasic_RWProductDefinitionFormation.cxx
tests/bugs/step/bug25168

index 63a8754ec56b98e4b9ea513af6665c4edac8c370..38efe202772e96cab1f1899f4bb2b3925ecf9c07 100644 (file)
@@ -91,7 +91,14 @@ void RWStepBasic_RWProduct::WriteStep
 
        // --- own field : description ---
 
-       SW.Send(ent->Description());
+       if (!ent->Description().IsNull())
+       {
+               SW.Send(ent->Description());
+       }
+       else
+       {
+               SW.SendUndef();
+       }
 
        // --- own field : frameOfReference ---
 
index 6ff8bb97d9810469a5d220eb82c75d6d0210e15d..3a64a4252957f4556db06b0bcac0bef7e81fdaea 100644 (file)
@@ -78,7 +78,14 @@ void RWStepBasic_RWProductDefinition::WriteStep
 
        // --- own field : description ---
 
-       SW.Send(ent->Description());
+       if (!ent->Description().IsNull())
+       {
+               SW.Send(ent->Description());
+       }
+       else
+       {
+               SW.SendUndef();
+       }
 
        // --- own field : formation ---
 
index 895908511e700ba1149a14f992b5122d5d500cae..cbc08a6d563e0c13c94a8fdcc1785a219905bea2 100644 (file)
@@ -71,7 +71,14 @@ void RWStepBasic_RWProductDefinitionFormation::WriteStep
 
        // --- own field : description ---
 
-       SW.Send(ent->Description());
+       if (!ent->Description().IsNull())
+       {
+               SW.Send(ent->Description());
+       }
+       else
+       {
+               SW.SendUndef();
+       }
 
        // --- own field : ofProduct ---
 
index 2d317cf6781e791bb281756b81e8357dfdfcb073..fca792b1ebbb6556984933a3c183c946a51ff0ec 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO OCC25188 ALL: Error: File "
-
 puts "========"
 puts "OCC25168"
 puts "========"