mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
Data Exchange, Gltf Reader - Implement non-uniform scaling in Gltf Import #503
Apply non-uniform scale factors directly to the triangulation during Gltf import. Add flag for turning on/off (on by default) this behavior. OCP-1948
This commit is contained in:
21
tests/de_mesh/gltf_read/cartoning
Normal file
21
tests/de_mesh/gltf_read/cartoning
Normal file
@@ -0,0 +1,21 @@
|
||||
puts "========"
|
||||
puts "OCP-1948: Implement non-uniform scaling in Gltf Import"
|
||||
puts "========"
|
||||
Close D -silent
|
||||
ReadGltf D [locate_data_file bug_ocp1948_PSU_Cartoning_subunit__right-01.01.01.03-CART-03_green_bottom.glb]
|
||||
|
||||
XGetOneShape s D
|
||||
checknbshapes s -face 87 -compound 21
|
||||
checktrinfo s -tri 16473 -nod 15835
|
||||
|
||||
# check center of gravity
|
||||
set REF_X 18300.5
|
||||
set REF_Y -9484
|
||||
set REF_Z 129.844
|
||||
set tol 1e-4
|
||||
set pos [vprops s]
|
||||
if {([expr abs($REF_X - [lindex $pos 9])] > $tol) ||
|
||||
([expr abs($REF_Y - [lindex $pos 12])] > $tol) ||
|
||||
([expr abs($REF_Z - [lindex $pos 15])] > $tol)} {
|
||||
puts "Error: wrong position of the imported model."
|
||||
}
|
@@ -128,6 +128,7 @@ provider.GLTF.OCC.read.use.mesh.name.as.fallback : 1
|
||||
provider.GLTF.OCC.read.skip.late.data.loading : 0
|
||||
provider.GLTF.OCC.read.keep.late.data : 1
|
||||
provider.GLTF.OCC.read.print.debug.message : 0
|
||||
provider.GLTF.OCC.read.apply.scale : 1
|
||||
provider.GLTF.OCC.write.comment :
|
||||
provider.GLTF.OCC.write.author :
|
||||
provider.GLTF.OCC.write.trsf.format : 0
|
||||
|
Reference in New Issue
Block a user