3D Scanner question

I want to make a 3D scanner using an Arduino Leonardo, I saw a few projects, it generally involves 2 stepper motors and ain infrared sensor, one motor turns a table where the object is placed and another moves the sensor up and down. What I haven't seen explained is the 3D plotting software and how you capture and export the data from the infrared sensor. Any ideas?

“Capture” would mean to collect distance information from the sensor, and “export” generally uses Serial.print() to output those measurements, along with the step motor positions.

Precise IR sensors for distance measurement are expensive. Could you already find one that fits your needs?