A 3D finite element model is developed to study heat exchange during metal selective laser melting (SLM). The approach is conducted on the scale of the part to be formed, using a level set framework to track the interface between the constructed workpiece and non-melted powder, and interface between the gas domain and the successive powder bed layers. In order to keep sustainable the computational efficiency, the powder bed deposition and the energy input are simplified by the scale of an entire layer or fractions of each layer. Layer fractions are identified directly from a description of the global laser scan plan of the part to be built. Each fraction is heated during a time interval corresponding to the exposure time to the laser beam, and then cooled down during a time interval equal to the scan time for the considered layer fraction. The global heat transfer through the part under additive construction and through the powder material non-exposed to the laser beam is simulated. To reduce the computational cost, a refining and de-refining mesh adaptation is carried out with a conform mesh strategy. Mesh sensitivity tests and validation of energy conservation are discussed. The proposed model is able to predict the temperature distribution and evolution in the constructed workpiece and non-melted powder during the SLM process at the macroscale, for parts of complex geometry.Application is shown for a nickel based alloy (IN718), but the numerical model can be easily extended to other materials by using their data sets.