Part: Handle zero scale in TopoShape::_makeTransform

With this commit the TopoShape::_makeTransform() use makeGTransform() if scale is zero to avoid crash. Fixes #14562
This commit is contained in:
Jolbas
2024-06-10 21:18:07 +02:00
committed by Chris Hennes
parent ce42dd717c
commit 8fe547df94

View File

@@ -4198,7 +4198,8 @@ bool TopoShape::_makeTransform(const TopoShape &shape,
if(checkScale) {
try {
auto type = rclTrf.hasScale();
if (type != Base::ScaleType::Uniform && type != Base::ScaleType::NoScaling) {
if ((type != Base::ScaleType::Uniform && type != Base::ScaleType::NoScaling)
|| (type == Base::ScaleType::Uniform && rclTrf.determinant3() == 0.0)) {
makeGTransform(shape,rclTrf,op,copy);
return true;
}