Fix 10545 by using position of array members

This commit is contained in:
Adrián Insaurralde Avalos
2023-11-11 15:12:17 -03:00
parent 47d68ac6a2
commit 9d03a07005
+4 -1
View File
@@ -102,7 +102,7 @@ int Exporter::addObject(App::DocumentObject *obj, float tol)
for (std::string & sub : expandSubObjectNames(obj, subObjectNameCache, 0)) {
Base::Matrix4D matrix;
auto sobj = obj->getSubObject(sub.c_str(), nullptr, &matrix);
auto linked = sobj->getLinkedObject(true, &matrix, false);
auto linked = sobj->getLinkedObject(true, &matrix, true);
auto it = meshCache.find(linked);
if (it == meshCache.end()) {
if (linked->isDerivedFrom(Mesh::Feature::getClassTypeId())) {
@@ -128,6 +128,9 @@ int Exporter::addObject(App::DocumentObject *obj, float tol)
Py_DECREF(pyobj);
}
}
else if (it->second.getTransform() != matrix) {
it->second.setTransform(matrix);
}
// Add a new mesh
if (it != meshCache.end()) {