A new tool a purchased a few months ago was a digital level, it can be set to degrees. Use it to mark the 40 degrees you are looking for.
But first snap a line down center length of the log, forming the peak. Then apply the 40 degrees.
I take it the gaps you are finding are because the round log is not perfect, hardly are they ever. If the bark is still on, leave it on(this is if you will be standing on it to score and juggle while hewing) or it will be slippery, and use a chalk which will show up well. If the bark is off, it should be dry. Even out any high spots such as knots of really rough bark with an axe and draw knife where the line will fall, it is not necessary to take it to the wood.
When snapping lines remember to always snap the line in the plumb direction, so when snapping the ridge line pull it straight up, it need not be forceful, a tight line with a light snap will do fine. You may not have to snap the bottoms of the 40 degree lines but I would rotate the log and dog it down so that the side you are hewing or chainsawing is in a plumb direction, check it as you progress down the log with what ever method you choose.
once that side is done rotate it so the flat side is up and the oppsite side is plumb, this will put the hewn side out of level but it is not necessary, the important aspect is the plumb/vertical line you are working on. Resnap the ridge line, as there may have been a bow up in the log and you will be able to lay the new ridge line within the timber where it really is. And proceed by surfacing the next side.
If you do want to snap the bottom of the 40 degree lines roll the log up side down so the angle of the side you are snapping is plumb and remember to snap the line in the plumb direction, if the line is snapped out of plumb it will cause a dip in the line.
Oh,
As a different approach you could, once all lines are snapped, saw kerfs across the timber connecting the lines, scoring with a saw, and pop them off with and axe. A method I recently saw on the Poland expedition.
Thanks for the opportunity to go over this, it is good practice, I probably left out some subtle details, such is life.