Need help with getting actual cut position on rotated item

Hello guys. For a week, I was trying to make wood cutting system, but I got a problem with log rotation, which can be described by this image:
image
(Greyish is how it “cuts”, and bright is what I receive)
So, as you can see, I want saw to cut log at green place, but, due to rotation, it cuts at the yellow place.
Is there any way I can fix this?
Note: I use CFrame math and not raycasts.

local function AlignSaw(LogCFrame, SawCFrame)
	local SawLookVector = SawCFrame.LookVector
	local SawUpVector = SawLookVector:Cross(LogCFrame.RightVector).Unit
	local SawRightVector = SawUpVector:Cross(SawLookVector).Unit
end
local SawCFrame = AlignSaw(Log.CFrame, Saw.PrimaryPart.CFrame * CFrame.Angles(0, -math.pi/2, 0))
local AngleToSaw = -SawCFrame:Inverse().RightVector:Dot(Log.CFrame.RightVector)
if AngleToSaw > 0.95 or AngleToSaw < -0.95 then
	--This part is fine
else
	local SawMark = SawCFrame:Inverse() * Log.CFrame
	if (SawMark.Z < Log.Size.X / 2 and -SawMark.Z < Log.Size.X / 2) then
		local Size1 = SawMark.Z + Log.Size.X / 2
		local Size2 = Log.Size.X - Size1
		local Offset1 = (Size1 - Log.Size.X) / 2
		local Offset2 = (Log.Size.X - Size2) / 2

		Display.Size = Vector3.new(0.01, Log.Size.Y + 0.01, Log.Size.Y + 0.01)
		Display.CFrame = Log.CFrame * CFrame.new(-SawMark.Z - Log.Size.X * AngleToSaw, 0, 0)
		if Display.Parent ~= workspace then
			Display.Parent = workspace
			Log1.Parent = workspace
			Log2.Parent = workspace
		end
	else
		Display.Parent = nil
		Log1.Parent = nil
		Log2.Parent = nil
	end
end