]> OCCT Git - occt.git/commitdiff
0033011: Data Exchange - Backward compatibility XBF format
authordpasukhi <dpasukhi@opencascade.com>
Tue, 28 Jun 2022 13:10:13 +0000 (16:10 +0300)
committersmoskvin <smoskvin@opencascade.com>
Mon, 4 Jul 2022 15:58:05 +0000 (18:58 +0300)
Fixed problem with moving the attribute position.
Made the same positions as version 7.5 with adding to the end.

src/XCAFDoc/XCAFDoc_Dimension.cxx
tests/bugs/step/bug32731
tests/bugs/xde/bug33011 [new file with mode: 0644]

index 5347c340f561e5efe9424ba52a4ae81afbd89dc2..1ba7bdd4a297f476a733de516679529481d124dc 100644 (file)
@@ -37,7 +37,6 @@ enum ChildLab
   ChildLab_Type = ChildLab_Begin,
   ChildLab_Value,
   ChildLab_Qualifier,
-  ChildLab_AngularQualifier,
   ChildLab_Class,
   ChildLab_Dec,
   ChildLab_Modifiers,
@@ -52,6 +51,7 @@ enum ChildLab
   ChildLab_Presentation,
   ChildLab_Descriptions,
   ChildLab_DescriptionNames,
+  ChildLab_AngularQualifier,
   ChildLab_End
 };
 
index f5779f111e7ce6c230ea9c7277f579845a2280a8..a1b204ce88916176a4906cab90502cc469765788 100644 (file)
@@ -10,8 +10,8 @@ Close D -silent
 ReadStep D [locate_data_file bug32731_A5E46910589A.stp]
 
 #Checking
-XGetShape repr0 D 0:1:4:106:16
+XGetShape repr0 D 0:1:4:106:15
 checkgravitycenter repr0 -l -109.847 153.679 0 1e-7
 
-XGetShape repr1 D 0:1:4:56:16
+XGetShape repr1 D 0:1:4:56:15
 checkgravitycenter repr1 -l -68.7 123.272 -18.5624 1e-7
diff --git a/tests/bugs/xde/bug33011 b/tests/bugs/xde/bug33011
new file mode 100644 (file)
index 0000000..4d32025
--- /dev/null
@@ -0,0 +1,43 @@
+puts "=========="
+puts "0033011: Data Exchange - Backward compatibility XBF format"
+puts "=========="
+puts ""
+
+pload XDE
+pload OCAF
+
+Close D -silent
+
+# create test document
+box b 1 1 1
+box bb 2 0 0 1 1 1
+compound b bb c
+XNewDoc D
+XAddShape D c 0
+# 0:1:1:1
+XAddShape D b
+# 0:1:1:2
+explode b f
+# b_1 b_2 b_3 b_4 b_5 b_6
+XAddSubShape D b_1 0:1:1:1
+# 0:1:1:1:1
+XAddSubShape D b_1 0:1:1:2
+# 0:1:1:2:1
+
+XAddDimension D c b
+#0:1:4:1
+XSetDimensionType D 0:1:4:1 2
+XSetDimensionValue D 0:1:4:1 6
+XSetDimensionPlusMinusTol D 0:1:4:1 -0.001 0.002
+vertex v1 10 10 10
+vertex v2 20 20 20 
+XSetDimensionPoints D 0:1:4:1 v1 v2
+
+box pres 0.5 0.5 0.5
+XSetGDTPresentation D 0:1:4:1 pres "temp presentation"
+
+# DO NOT CHANGE THE LABEL
+XGetShape pres_shape D  0:1:4:1:15
+
+checknbshapes pres_shape -vertex 8 -edge 12 -wire 6 -face 6
+checkprops pres_shape -s 1.5 -eps 1e-2