Embedding process

resolves #4023 

@SimonSapin @jdm