compile final trim constraint