1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-07-15 12:35:51 +03:00
occt/tests/bugs/step/bug_ocp1949
ikochetkova f1cb756901
Data Exchange, Step Export - Ignoring unit factors during tessellation export (#577)
Provide unit factors into the tessellation export methods.
2025-06-20 15:38:33 +01:00

45 lines
1.0 KiB
Plaintext

puts "================================================"
puts "OCP-1949: Apply a scaling transformation to STEP"
puts "================================================"
puts ""
pload OCAF
Close D1 -silent
Close D2 -silent
ReadGltf D1 [locate_data_file bug_ocp1948_PSU_Cartoning_subunit__right-01.01.01.03-CART-03_green_bottom.glb]
# apply parameters for tessellation export
set conf "
provider.STEP.OCC.write.schema : 5
provider.STEP.OCC.write.tessellated : 1
"
WriteFile D1 "$imagedir/${casename}.stp" -conf ${conf}
ReadFile D2 "$imagedir/${casename}.stp"
XGetOneShape a1 D1
XGetOneShape a2 D2
# check center of gravity
set pos1 [vprops a1]
set pos2 [vprops a2]
set REF_X [lindex $pos1 9]
set REF_Y [lindex $pos1 12]
set REF_Z [lindex $pos1 15]
set tol 1e-4
if {([expr abs($REF_X - [lindex $pos2 9])] > $tol) ||
([expr abs($REF_Y - [lindex $pos2 12])] > $tol) ||
([expr abs($REF_Z - [lindex $pos2 15])] > $tol)} {
puts "Error: wrong position of the imported model."
}
# cleaning
Close D1
Close D2
file delete "$imagedir/${casename}.stp"