3D Scanner

Introduction

 * The handheld 3D scanner is a "Light Pattern Scanner." It projects a predetermined light pattern onto the object being scanned and reads the return values to establish geometry. It is able to detect edges, curves, and darker patterns or designs on the object's surface. The 3D scanner software used is VX Elements 5.
 * ME Dept. Individuals with access to scanner:
 * 1) Dr. Odom
 * 2) IEW Grad. Student
 * 3) Bill Magnie - Shop Supervisor
 * 4) Becky Schoenberg – ME Dept. Administrative Assistant

Rules for Using the 3D Scanner

 * 1) If the scanner is not in your hands, it needs to be placed on a flat surface at least 6 inches away from any edges.
 * 2) When moving the scanner, make sure it is placed in the carrying case and the locks are secure.
 * 3) When you are finished using the scanner, it needs to be given to the IEW Grad Student you obtained it from.

Available Scanners
Select the scanner most appropriate to your use. Go!Scan20 vs Go!Scan50

Quick Guide
The process above is described in more detail throughout this document.

Scanner Setup
Follow these steps in order. Physical Setup:
 * 1) Place the laptop and 3D scanner on work surface. Recommended: Tables that you can easily walk around. Please open the scanner box right side up to prevent possible damage.
 * 2) Plug the power supply to an outlet.
 * 3) Connect the power supply to the USB cable.
 * 4) Plug the USB cable into the computer's USB port.
 * 5) Plug the USB cable into the scanner.

Software Setup:
 * 1) Turn on the laptop.
 * 2) Start-up VX Elements software from the laptop's desktop.
 * 3) Apply positioning targets to the object to be scanned. Make sure that at least 2 targets are visible from any potential scanning viewpoint. The targets are not free ($0.25 each), save them if possible, and avoid damaging the front facing or the adhesive backing. Please use the less adhesive targets (- sign on packaging) unless the use of the more adhesive ones (+ sign on packaging) are required.
 * 4) Activate the selected scanner by clicking Configure, Product Manager, selecting the name of your scanner, and pressing 'Activate').
 * 5) Click the large arrow on the right to proceed to the main interface.

Calibration
Before you begin The calibration process can be tricky. A couple of tips are listed below: You will be using the calibration plate to configure the scanner. There are three indicators in the VxElements program.
 * Top indicator is asking you to tilt wrist to the left or to the right
 * Left indicator is asking you to tilt wrist up and down
 * Right indicator is asking you to move the scanner height up and down

Instructions
 * 1) Open the calibration plate and set it on a stable surface.
 * 2) Do not touch the calibration plate surface, as the oils from your skin can damage it and affect the calibration.
 * 3) Click "Calibration" at the top of the screen.
 * 4) Point the scanner at the calibration plate and begin scanning. Slowly rotate the scanner and pull the scanner away from the calibration plate as directed on the VX Elements program.
 * 5) Close the calibration plate when you are finished, and return it to the carrying case.
 * 6) You are now ready to scan your object.

Calibration Tutorial Description: To calibrate the scanner, use the calibration plate provided in the carrying case. Hold down the trigger and align the handheld scanner with the dots on the calibration plate. Tilt the scanner up or down to align it with the computer. Then slowly begin backing it up until the full board is shown on the screen. When done properly, the handheld scanner should now be calibrated and synchronized with the software. 4cdUKqbjg7k youtu.be/4cdUKqbjg7k
 * Watch the Calibration Tutorial below.

Configuration
Shutter Time Often, the Automatic shutter option (in Scanner Parameters) will suffice. Manual shutter time can be changed for a specific part of a contrasted textured object. The following is a general guide for adjusting the shutter speed. Configure the shutter time according to the type of surface being scanned. The darker the surface, the longer the shutter time. Steps:
 * 1) Click Scanner Config. in the top left corner. ScanConfig.png
 * 2) Aim at the object, pull the trigger, and scan the object. The image below will appear on the screen. The goal is to have as much yellow as possible from the object.

The Automatic shutter option will change the shutter time automatically while scanning. Note that unchecking Capture texture will speed up scanning if the texture is not needed for the user's purposes. Resolution Resolution refers to the level of details that the scanner can acquire so select the right resolution based on feature details needed. Low resolution does not mean low accuracy. Flat surfaces do not need require a high resolution because they do not need a lot of small triangles to describe their geometry. Low resolution will increase speed of data acquisition. High resolution will be needed for detailed surfaces because more smart triangle will be needed.
 * Adjust the resolution under Scan Parameters.

Scanning Preparation
What you need to know about scanning different part materials Objects with matte materials will scan the best. Dark materials, transparent materials and reflective materials may not be received properly. Use masking tape or paint to alter the part for the scan. Deciding how to position the scanning object Take some time to decide on the best way to rig your part for scanning. Making the object stationary and moving the scanner around it may work the best. Suspend the object or lay it flat on a surface. Using a turntable (in the box with the scanner)or hang the part in the air depends on how easy it is to scan the most important features. Be aware of the color of the surfaces the camera will pick up behind the object. Black surfaces are the best background because the scanner does not pick up black surfaces very well if at all. After you have decided on the setup the positioning parameters (see below) will make the scan easier. Targets To set up the part place positioning targets on and/or around the part that you wish to scan. There are three types of positioning targets available: NOTE: Please use the less adhesive (- sign on packaging) targets unless the use of the more adhesive (+ sign on packaging) ones are required. Positioning the targets Place targets on long flat surfaces, long cylindrical surfaces, patterns, or spherical shapes. Add dots around the part if is too small, you need different angles or to facilitate better quality scan. Two dots should always visible from any angle. Don't place targets on deep curves or drastic geometry. Keep the targets clean and free from dirt. Position Parameters After you have set up your part, choosing the position parameters will help you scan. You will have needed to: There are several options for parameters to choose from The image below shows the most common slipping errors you might see in a scan:
 * 1) Positioning Target with Black Contour and light adhesive (retail: $60 USD)
 * 2) Positioning Target with Black Contour and strong adhesive (retail: $65 USD)
 * 3) Positioning Pyramids
 * 1) Chosen a clean, non-textured black surface to position your part against
 * 2) Positioned or laid down your part as securely as possible
 * 3) Placed targets on and around the part
 * Select which marker type you use the most (Remember: the positioning targets are often called 'Black contour' in VxElements)
 * Select one of the parameters from the list below that best fit your needs
 * 1) Targets Required: You must use targets all over the part
 * 2) Semi-rigid scan: Allows for micro slipping and is the best one to use if you are scanning a body part
 * 3) Natural Features: Using natural color to create targets and improves tracking
 * 4) Show positioning status: Provides multiple markers and indicators that will help you diagnose tracking problems (shown below)
 * 1) Translation slippage problem (as a line)
 * 2) Translation + rotation slippage problem (as a cylinder)
 * 3) Rotation slippage problem (as a circle)
 * 4) 2D translation slippage problem (as a plane)
 * 5) 3D rotation slippage problem (as a sphere)

Scanning the Object
Slow, smooth movements will allow the scanner to achieve the most accurate levels of detail and is most effective in preventing holes in the resulting object mesh. NOTE: The scanner reads the object from the bottom camera below the pistol grip, not above. This WILL feel counter-intuitive while you are scanning.
 * 1) To begin scanning, hold down the trigger on the pistol grip. (Releasing the trigger will stop the scan, but not cancel it.)
 * 2) While holding the trigger down and scanning, complete the scan of the object slowly. The goal is to scan all faces of the object while having two positioning targets in view of the scanner at all times. The dots being used by the scanner at the moment will show up as red.
 * 3) While scanning, keep track of the distance gauge on the software window, or on the top of the pistol grip. The top light means the scanner is too close, the bottom indicates it is too far, and the middle light indicates a proper distance from the object.
 * 4) When resuming a scan, make sure to align the 3D scanner to the positioning targets last recorded in the software window. The software will not allow you to resume scanning while pointed at a section of the part not previously scanned.

While your scanning if you release the trigger or when tracking is lost, the current frame seen by the scanner is dark purple. To resume tracking aim in the direction of the last positioned frame or line it up with any captured target.

Resume Scan Another tool you can use if you lose tracking is the resume scan. Select with a rectangle the area you would like to resume scanning with. You can choose any place on the object. If the area you choose does not have enough model information the rectangle will appear as red.

rfuDls9KGqI Begin Scanning Description: At this point we are ready to scan. It is recommended you find a turntable, or similar setup that will allow you to easily rotate what you want to scan, or have sufficient room to walk around it. Hit the “scan” button, and start scanning. This is the trigger and there are three lights on the top, one light says you’re too close, the other says you’re too far away, and the middle say you’re good. After holding the trigger, on the left side on the screen, a bar will appear and does the same thing as the lights on top of the scanner.
 * Watch Begin Scanning Video Tutorial below (https://www.youtube.com/watch?v=rfuDls9KGqI)

_JN630MEUIs Resume Scan Description: When you stop scanning and you want to resume, you have to hit the “Resume scan” button. Then find the last spot that was scanned on the software to resume scanning. The software needs to resume from the last recorded position. You need to look for it until you get the green square on the screen. A red square means it’s not the right spot.
 * Watch Resume Scan Video Tutorial below (https://www.youtube.com/watch?v=_JN630MEUIs)

xyvbhtO9eGM Rendered Model Description: This video shows the rendered scan of the Thermos on the computer screen.
 * Watch Rendered Model Video Tutorial below (https://www.youtube.com/watch?v=xyvbhtO9eGM)

Post-scan Editing
'You can edit the model in the Edit scan mode or mesh mode (click Send to Vxmodel''). Typically, initial edits, such as removing the floor the object was sitting on, are done in the Edit scan mode. The mesh mode has more options so it is recommended for most edits. The steps below describe a typical editing process.'''
 * 1) Click the Edit Scan button on the top toolbar. If a floor was scanned that is not desired in the final product, remove as much as possible first. Select the desired surface to remove and press DELETE. Remember to hold down CTRL while selecting multiple surfaces.
 * 2) After removing the floor surface, exit Edit Scan mode and create the mesh of the object by selecting the Create Mesh tool from the top toolbar. By right-clicking the mesh on the navigation tree to the left of the screen, you can duplicate the mesh to preserve a version before any future edits.
 * 3) NOTE: Checking the box next to the item in the navigation tree toggles visibility of that item in the interface. Leave only the mesh being edited visible.
 * 4) Use the Clean Mesh tool from the top toolbar to remove some of the isolated pieces of the scan.
 * 5) Fill holes in the scan with the "Hole Filler" tool. Start with the "Adaptive" filling method. Sometimes it will not work and the "Curvature" or "Flat" option will need to be used instead.
 * 6) NOTE: It is highly recommended to exit and re-enter the "Hole Filler" tool after every hole. Otherwise clicking "Undo" will reset every action since entering the tool.
 * 7) The "Bridging" tool can be used when a large hole needs to be divided so that the software can better fill it with the correct geometry. This tool is accessed from the left side of the "Hole Filler" menu. It works by selecting two edges and a middle point on each side of the space to be bridged.
 * 8) Smoothing tools and others can be used.
 * 9) Any holes, isolated pieces, singularities, or discontinuities will cause problems when trying to export the mesh to SolidWorks so try to catch them all in advance.

tMSPs7G2IaY Mesh Creation Description: You need to hold down control when you are selecting polygons on the scan. Holding down control will allow you to make further selections and adjustments to the highlighted area. First, remove the floor surrounding the model by selecting polygons and deleting. Now we can create the mesh by clicking the "Create Mesh" button. After creating the mesh, it's a good idea to make a copy of the original mesh so you have a backup in case something goes wrong. Deselect the original mesh and texture to see only the copy. Remove the parts that are floating. Clicking "Clean Mesh" fixes up some of the scan, and the rest can be cleaned using "Isolated Patches" and increasing the sensitivity. This should delete everything but the main part.
 * See the Mesh Creation Tutorial below (https://www.youtube.com/watch?v=tMSPs7G2IaY)

eNY42QOIaNI "Hole Filler" Description: Now, fill in holes on the scan. You want to start with "Adaptive Filling" at the beginning and see if that works. If it doesn't work, like in the video, try "Curvature" or "Flat" instead to see if that works. In this case, "Curvature" worked the best. Remember to close out of the Hole Filler every time you make a change. If you make multiple changes without closing the Hole Filler and something goes wrong, you will have to redo everything. This will cause the program to "Error Out" or Crash.
 * See the "Hole Filler" Tutorial below (https://www.youtube.com/watch?v=eNY42QOIaNI)

ovExdFw-6aM Bridging Description: In this case, we have a hole that has an ugly error in it. Select the polygons surrounding it that in order to create a more controlled gap to fill in with the "Hole Filler". To deselect polygons that you don't want to delete, or you may delete other parts of your model. The higher the quality of your scan, the less time you will need to spend getting it cleaned up. In this case, we will need to use the Bridge tool to separate this hole into more manageable pieces for the program to process. You need to pick a first point, a last point, and a middle point on both sides of the gap to define the bridge. Then use the "Hole Filler" tool to fill in the smaller holes. Repeat the process of bridging as needed until the program can fill in the holes.
 * See the Bridging Tutorial below (https://www.youtube.com/watch?v=ovExdFw-6aM)

Exporting
Note: Target data can also be exported as a .txt file. This is then typically imported in Matlab for further analysis.
 * 1) Decimate the mesh to reduce the number of triangles. This can be scaled by percentage or by entering in a desired number. 20,000 triangles is the maximum SolidWorks can handle. Check the max deviation box and enter a value (1mm works).
 * 2) Click the "Export" button on top toolbar. To export the scan as an .stl or other file format click Mesh. To export the target data as a .txt file click Scan Positioning Targets.
 * 3) Save as STL file type.

p2jj7DPcvqo Decimation Description: Now we need to use the "Decimate" tool. Right now we have 35,000 triangles, which needs to be reduced to less than 20,000 for it to work in SolidWorks. 10,000 is ideal. You can do this based on the percentage, or using the slider and checking the number again. It is important to turn on the maximum deviation of one millimeter to prevent deviation from the scanned shape. Click "Apply". The new mesh should look very similar to the original shape.The program has smoothing options if the mesh is rough.
 * See the Decimation Example Tutorial below (https://www.youtube.com/watch?v=p2jj7DPcvqo)

TNHzyLULBUg Exporting Tutorial Description: Once you have a satisfying mesh, you can export it for use in Solidworks. To do so, select the mesh, click "Export", then click "Mesh", and save it as an .STL file. Remember not to click "Export to Solidworks" because it will generate a graphic model that cannot be edited in SolidWorks.
 * See the Exporting Tutorial below (https://www.youtube.com/watch?v=TNHzyLULBUg)

Importing
To import a previous mesh or session file:
 * 1) Click File
 * 2) Click Open session
 * 3) Select the .csf file
 * 4) Click Open

Understanding Accuracy

 * The scanner uses 2 sources of information to complete the scan: geometry and targets
 * With good geometry and enough targets you should get a reasonable accuracy
 * The scanner does not pick up dark, reflective or transparent objects well

Max Solidworks STL File Size

 * Solidworks 2016-2019 Max STL file size: 20,000 polygons/triangles or 500,000 facets (25 MB binary format or 138 MB ASCII format)
 * Export meshes as binary STL files to save time (unless reading the data is required)
 * If above the max number of facets, try decimating the mesh. If still above the max, convert to the file to a 3D DXF and then import into Solidworks (Free software to convert: http://www.meshlab.net/)

Speeding up the Scan
When scanning if you do not use texture information, it will improve the frame rate.

Merging Meshes Together
If you have a complicated part it may be better to scan portions of the part in different sessions and merge the scans together. Use the mesh scan tool and choose one of the methods listed below:

Use common targets on the part from each scan to align the files together.
 * Targets Best-fit

Best-fit each scan using a pre-alignment done by the user (usually when there are not enough common targets on the part).
 * Surface Best-fit

Optimizes the global alignment between 3 or more meshes.
 * Global Registration

Saving Scanning Parameters for Later
If you are working on a long term project you can save your scanning parameters as the default parameters Go to Configure >> Session Parameters >> Save current settings and default parameters

Creators of this Tutorial
Kaizen Project, ME 410 - Updated, Summer 2019 3D Handheld Scanner Team - CATIA Course, Fall 2016
 * Austin Bebee
 * Camille Eddy
 * Jonathan Gomes
 * Abdullah Alobaysi
 * Parker Matthews
 * Nathan Pabst