Made the curve tool preserve the rotation origin

issue: MatterHackers/MatterControl#4967
Curved meshes should have their origin at the center of the curve radius [$112]
This commit is contained in:
LarsBrubaker 2022-01-30 08:18:43 -08:00
parent d0dcb3af05
commit f400bf0d96
2 changed files with 18 additions and 5 deletions

View file

@ -446,7 +446,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
case Align.Origin:
// find the origin in world space of the item
var itemOrigin = Vector3Ex.Transform(Vector3.Zero, item.WorldMatrix());
var itemOrigin = Vector3Ex.Transform(Vector3.Zero, item.WorldMatrix(this));
translate[axis] = alignTo - itemOrigin[axis] + offset;
break;
}
@ -471,7 +471,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
return anchorBounds.MaxXYZ[axis];
case Align.Origin:
return Vector3Ex.Transform(Vector3.Zero, SelectedObject.WorldMatrix())[axis];
return Vector3Ex.Transform(Vector3.Zero, SelectedObject.WorldMatrix(this))[axis];
default:
throw new NotImplementedException();