Additive manufacturing of thermosetting polymer nanocomposites