Open ido-cu opened 2 years ago
When trying to scale a solid object with different scale factor for the X, Y, Z axis's, I get wrong result. e.g. When I try to scale a solid with a bounding box of size (2, 4, 4) only for the X axis with a factor of 2, like so:
XbimMatrix3D scaleMatrix = XbimMatrix3D.CreateScale(2, 1, 1); IXbimSolid solidAtOriginScaled = (IXbimSolid)solidAtOriginScaled.Transform(scaleMatrix);
solid is scaled on all axis's and not by the wanted factor.
Xbim.Essentials 5.1.323 Xbim.Geometry 5.1.403
I uploaded the source code of a small .net 6 testing application with a sample IFC file.
ScalingTest.zip
When running:
on a solid with a bounding box of size (2, 4, 4) I expect to get a solid scaled only on the X axis with bounding box of size (4,4,4).
I get a solid that is scaled in all directions and not in the desired scale.
When trying to scale a solid object with different scale factor for the X, Y, Z axis's, I get wrong result. e.g. When I try to scale a solid with a bounding box of size (2, 4, 4) only for the X axis with a factor of 2, like so:
XbimMatrix3D scaleMatrix = XbimMatrix3D.CreateScale(2, 1, 1); IXbimSolid solidAtOriginScaled = (IXbimSolid)solidAtOriginScaled.Transform(scaleMatrix);
solid is scaled on all axis's and not by the wanted factor.
Assemblies and versions affected:
Steps (or code) to reproduce the issue:
I uploaded the source code of a small .net 6 testing application with a sample IFC file.
ScalingTest.zip
Expected behavior:
When running:
XbimMatrix3D scaleMatrix = XbimMatrix3D.CreateScale(2, 1, 1); IXbimSolid solidAtOriginScaled = (IXbimSolid)solidAtOriginScaled.Transform(scaleMatrix);
on a solid with a bounding box of size (2, 4, 4) I expect to get a solid scaled only on the X axis with bounding box of size (4,4,4).
Actual behavior or exception details:
I get a solid that is scaled in all directions and not in the desired scale.