A process for aligning an optical component by plastic deformation comprises finding a desired position of an optical axis of the optical component relative to a rest position of the optical axis of the optical component. The component forms a component shape on a printed circuit board layout. The movement of the profiling surface relative to the die can closely controlled to shape the encapsulant to a desired form.