From 7c9e1d71b83f42d6be94253270295e42cbba7f1c Mon Sep 17 00:00:00 2001 From: seanth Date: Wed, 17 Jan 2024 07:38:48 -0600 Subject: [PATCH] Update DXFLoader.cpp Changed order of operations for insert positioning and scaling. Need to position the inserts before scaling it, otherwise the position ends up up being position*scale --- code/AssetLib/DXF/DXFLoader.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/AssetLib/DXF/DXFLoader.cpp b/code/AssetLib/DXF/DXFLoader.cpp index 161a91826..0979b44a6 100644 --- a/code/AssetLib/DXF/DXFLoader.cpp +++ b/code/AssetLib/DXF/DXFLoader.cpp @@ -372,6 +372,10 @@ void DXFImporter::ExpandBlockReferences(DXF::Block& bl,const DXF::BlockMap& bloc // XXX order aiMatrix4x4 trafo, tmp; aiMatrix4x4::Translation(-bl_src.base,trafo); + //Need to translate position before scaling the insert + //otherwise the position ends up being the position*scaling + //STH 2024.01.17 + trafo *= aiMatrix4x4::Translation(insert.pos,tmp); trafo *= aiMatrix4x4::Scaling(insert.scale,tmp); //trafo *= aiMatrix4x4::Translation(insert.pos,tmp);