Showing posts with label 3D Scanning. Show all posts
Showing posts with label 3D Scanning. Show all posts

Thursday, October 1, 2015

makeup for 3D printed parts

yes, among the many things yours truly could do: 3D prints, 3D scans, CNC mill; but his lack in the department of aesthetics is severe. Same as everything pretty, makeup must be applied for aesthetics reasons.

If you recalled many full moons ago, yours truly http://shin-ajaran.blogspot.sg/2015/03/seal-deal-digitally-fabricated-personal.html  created a personal seal using only digital fabrication techniques.  The 3D printer of choice is still the ultimaker2, materials of choice is PLA, and 3D prints at 100micron layer height. 100 micron seems to be pushing the envelop for desktop based 3D printers. This choice of layer height and without makeup is good enough to ornate yours truly office. Assuming the 3D printed object need to be used to handle other materials with "fine" particles as the by product of the material, it falls short. The grooves between each layer of prints could possibly habours dirt, or worst, sickness inducing bacteria. Hence, there were some suggestions on the Internet on how to do post treatment to PLA 3D printed parts  aka makeup to achieve water tight, smooth finish, and the pinnacle of all post treatment/makeup: food safe grade, i.e food debris will not be caught in-between the layers and prohibits bacteria growth on 3D printed parts.

The suggestions for post treatment aka makeup for 3D printed parts. Some suggested to use food grade PLA, but the grooves between the layers are still a nuisance to human health, and boon to bacteria. Sandblasting on the 3D printed parts to get a smooth matt finish, doable, but access to machine might be prohibitive. Coating the 3D printed parts with food safe resin, definitely doable. your truly have not got the chance to do any of the above, yet.

So, the adventure begins at bangkok mini maker faire and yours truly chance upon "solution X aka solution 555" (5 in thai language rhymes with ha) for post treatment of 3D printed parts, by one of the makers presented there.


Saw the makeup demo on PLA 3D printed parts, and was quite intrigue at the speed of the post production of 3D printed parts; yours truly can't wait to get his paws on them. unfortunately, he is such as cheapo and bought the cheapest air ticket without check-in luggage. Of course you know the airport security is very tight and will not allow liquid > 100ml per bottle on board. tough luck. yours truly struck a deal with native partners, co sharing 400g and 500g bottles of "solution 555" into smaller bottles < 100ml . yours truly could not sleep, due to the fact of the access to 120ml worth of solution 555 makes him keep waking up at night. Yes, yours truly is an impulsive buyer, buying things that caught the cat's curiosity. He walked away with the last set of solution 555 kit available for sale on that rainy day, without means to bring it back to aiur.

Social capital plays a big part in how yours truly manage the issue of getting it back without paying extra for check-in luggage, nor breaking any laws. The rest was history.

the full kit: 500g of grey and 400g of white. yes, instructions is in thai language.

The first victim to be applied with solution 555 makeup. 3D printed lion head from a previous project: ultimaker2, 100micron layer height, PLA
closeup: sorry for the lousy picture quality. yours truly used a 2year old phone camera for this.
mix 3 part from grey bottle and 1 part from white bottle. gettin ready to makeup with the mixture.
can you tell which is with makeup and which is without makeup?
ooops... yours trully missed a spot.

conclusion: money well spent on "solution 555". after the first layer of makeup, the visible lines along the layers smoothed, it has a glossy look, and definitely would be better with more layers of makeup. The 3D printed part earned the permission to be relocated in the house from his missus. 



Monday, November 18, 2013

Supposedly quick and easy install guide to 3D scanning with Kinect and Reconstructme

Library is hosting interesting workshops of 3D scanning, 3D printing and also ebook making next week. So I thought of bringing my sixpence 3D scanning kit that uses an ardunino turntable, an android phone for image acquisition, and 123D catch to generate a 3D model, and also a "known" 3D scanning solution that is made up of M$ Kinect, and ReconstructMe to the maker space event. Back in London, I have used/tested/setup a rig for 3D scanning using the latter on my own laptop (dell XPS. Installation (ReconstructMe console v0.6.0-405 + OpenNI + PrimeSense) was a breeze. So I assume I would only take 1 hour or so to setup, but in reality............

Installation supposed to be a breeze (as per the setup in London). Somehow, fate took the other turn and I have spent my weekends hiding in my office battling compatibility between kinect drivers<--->Graphic Card drivers <->OpenNI drivers<-->ReconstructMe versions.

The lastest version of ReconstructMeQT suppose to work out of the box in 2 steps. First, install the kinect drivers on windows, lastly install ReconstructMeQT. Because my installation does not work out of the box, therefore I have an adventure over the weekends to find the possible solution.

Now, before you attempt to install ReconstructMe, please do this 
step0
2. Install the latest version of the NVidia graphic card driver (v3XX.YY) or ATi Radeon
3. If you have not install any Kinect drivers on windows, GOOD! Otherwise, uninstall the device and delete the drivers. Device Manager-> Right click on the  Kinect devices that is installed under as XBOX kinect or kinect for windows or NUI kinect or Libfree kinect->uninstall (and check on the box that says delete the driver file)

The very general steps after step0 are
1. Install Kinect Drivers 
2. Insall OpenNI drivers 
3. Install ReconstructMe 

Step1: Install drivers for kinect on windows (32bit or 64bit)
Kinect drivers come in a few flavours. Choose either one of the flavours to work with ReconstructMe. The two major camps are PrimeSense (SensorKinect093-Bin-Win64-v5.1.2.1 or SensorKinect-unstable or Sensor-Win32-5.1.6.6-Redist) and M$ (KinectSDK-v1.8-Setup or KinectRunTime v1.7). I have tried all of the variety on 3 laptops, yielding different results with ReconstructMe.




















Step2: Install OpenNI (OpenNI-Windows-x86-2.2.0.33 or OpenNI-Windows-x64-2.1.0 or OpenNI-Win32-1.5.7.10-Dev or OpenNI-Win64-1.5.7.10-Dev)
Note: Step2 not required if using ReconstructMeQT

Step3: Install ReconstructMeQT (ReconstructMe Setup-1.2.95). The supposed Finishing Step.
Somehow, in laptopA the GUI hangs at initialization, laptopB, the GUI crashes.

Step3.1: Install ReconstructMe Console (ReconstructMe_Installer_NonCommercial_405)
Somehow, in laptopA the command window hangs at initialization; laptopB, the graphic card chosen by the ReconstructMe is Intel HD4000 instead of GT630M, and crashes after capturing


Sadly, nothing work on my work laptopA. Then I took another laptopB to test, and then another laptopC. 
The laptops are defined as:
laptopA: intel i7, 8GB ram, windows7 32bit (Yes, I know this is dumb, due to some ****. please spare me the embarrassment), and NVS3100M. 

laptopB: intel i5, 8GB ram, windows7 64bit, GT630M (with intel HD4000). 

laptopC: intel C2D, 4GB ram, windows7 32bit, ATi Radeon HD3400 (not in compatibility matrix).  

Unsatisfied with the outcomes, I have brute-force possible combination (with some smart guessing on the combination of course) of drivers (very tedious, I am really tired from the mundane installing and uninstalling regime) to get 3D scanning to work on my 3 laptops.

my winning recipe works on LaptopB by
1. Install KinectSDK-v1.8-Setup
2. Install OpenNI-Win32-1.5.7.10-Dev [yes, a 32bit OpenNI driver on a 64bit windows 7. Weird, but it works. Installing 64bit OpenNI drivers game me load of problems such as OpenNI drivers not found]
3. Install ReconstructMe_Installer_NonCommercial_405 (v0.6.0-405)
4. Modify scanner parameter with "ReconstructMe.exe --device 1 --scan --sensor mskinect,0 --config cfg/volume_1m_highres.txt" without the quotes 

phewwwww.... now, lets do some 3D scanning!!!!!

demo at the SP library. picture courtesy of kylie the librarian.
https://www.facebook.com/media/set/?set=a.601997073170940.1073741862.106331659404153&type=3


















I would love to find some time to get skanect to work, as a counter example to ReconstructMe. Time, is scarce and I only have 24 hours per day.

Friday, November 15, 2013

sixpence 3D scanning kit

While I was spending my summer in London typing away on my thesis. One of my extra curricular activities was to pop over next door Institute of Making to make some interesting stuff. At one of the workshops, we did some 3D scanning using both open source such as reconstructme + kinect, and also proprietary solution, the Next Engine. Scanning a human object using the kinect at the absent of a scanning rig is really tiresome. Holding the laptop, the kinect, and power supply circling the subject at incremental steps is tedious. Nonetheless, here I present to you: yours truly in meshlab.


Over the weekends, I thought of an idea of making dirt cheap 3D scanning with existing items. What I mean existing items, are items on my desk such as an android mobile phone, arduino, and servo. While researching on cloud computing and it's application, I discovered a really cool website http://apps.123dapp.com/catch/ that leverages on cloud computing to generate a 3D model based on multiple pictures of an object. Taking (at most 70) pictures of an object at 360 degrees manually without a rig is really tiring. So, my weekend project for the 3D scanning kit to automatically take pictures at 360 degrees of a subject without human intervention; can be decomposed to 4 sub parts. part1: I need a turntable of some sort to rotate my subject 360degress. part 2: There must be some sort of communication channel between my turntable and the picture taking apparatus. part3: picture taking apparatus must be capable of receiving commands. part4: upload pictures to 123D catch to generate the 3D model.

part1: turntable
turntable with subject container

manually to take pictures
if you wonder what is the pen doing there


Parts needed. An arduino, full rotation servo, code.
The full rotation servo (FRS) I got on hand was picked up from a rubbish dump. Upon testing, it is still functioning, how lucky. Here comes the interesting problem. With the use of the example code of sweep from arduino, the FRS is behaving erratically. It does not stop exactly at 15 degrees and continue to spin. Reason being, the servo is modified; the "horn" on a gear inside the servo is broken off. tough luck using standard code. So, I have to come out with a scheme to stop the FRS at every 15degrees via code.

As for the container of the subject. I have used newspaper to create the background for the subject. Such that when the 3D model generating algorithm is running, the patterns on the newspaper can be used as the reference point. That is according to the guide of the 123D catch.

Part2: communication
parts needed: android device (API level 17 onwards), OTG cable
Reluctant quite I am, to purchase a bluetooth shield for arduino for communication. Furthermore, I am using an android phone running android 4.3 (API level 19). In this particular version, it supports direct USB connection from say a keyboard or mouse to the android phone via microUSB or OTG cable ( USB typeA female to microUSB male). It is much more cost effective for me to use OTG than the bluetooth shield.

A quick look at the opensource community, I stumble upon this github https://github.com/dtbaker/android-arduino-usb-serial i believe was forked from https://code.google.com/p/usb-serial-for-android/. Many thanks to the open source contributors for allowing me to quickly try out code for USB serial from android <--> arduino. Just a point to note, the baud rate for the android is 115200, so arduino must setup serial at the same baudrate. 

combining part1 and 2, I have devised a scheme for my 3D scanning kit. Arduino turn the turntable every 15degrees, send ASCII characters to android device to signal for taking a picture
The code for arduino is here 
Another point to note: print out the serial data received on android to prove the assumption that it is going to be the same as per received on hyper terminal. I learnt it the hard way.

Part3: multiple picture taking on android device without human intervention.

There are excellent tutorials such as this and this for writing manual code to use the android device's camera to take ONE picture. Having wrote my last android app from scratch on my HTC magic, android 1.6 (API level 4), I assumed that I would have not any issues using the API for android 4.3 (API level 19). Besides that, having use MIT app inventor for mockup and POC without writing code from ground up, and using the standard features following the standard methodology; left me jaded when it comes to developing android app.

The SOP for taking a picture on android device via camera API is quite straightforward. Create an activity. Add a button to listen to a an event to take a picture. Add a view to the frame layout for the preview from the camera. Save the picture to the device's memory. After picture is taken, refresh the preview. I assumed that I would only spend 4 hours max after office hours to write a piece of code that would automatically take multiple pictures without user intervention (nobody click on the button to take picture). Little did I for see I would stare at the code for a few nights, wrestling with the android code framework finding out where are the crashes; due to the nature of pictureCallBack(), onPictureTaken(), and refresh preview were supposed to be used. The experience and amount of code I have tried to challenge my assumptions such as race condition, critical section, multi threading that I thought might be the root cause of the crashes warrant for a lengthy post by itself.

Nonetheless, after staring and experimenting for few nights straight, i present to you The code of this android app that is hosted on github

Part 4: upload pictures to 123D catch

Combing part1,2,3, setup a stand for the android device to take pictures.

copy the 31 images from android phone to be uploaded to the 123D catch

Generate a 3D model from the pictures uploaded

Note: no model generated (I got a blank screen after the supposed completion of 123D catch[online]), and I have waited close to 30min to save the project, but without success.
Edit: I have tried to take a few shots of the same subject manually and upload to 123D catch, just to prove my assumption (pictures taken by my app is not usable) is wrong. Surprisingly, no models generated too. really weird

Some fine tuning is required: I noticed the picture taken by my android device was out of focus. Maybe that is the reason why the model was not generated. pictures generated from sixpence 3D scanning kit do work!

Edit: I placed my subject too close to the lens, hence the depth of field caused the blurry images akin to blur subject and clear background. I am still trying to find the API that allows for macro mode auto focus.

Edit: For some weird reasons, 123D catch online version does not work on my laptop. I have left it running over night and the next day I check my computer, still no model generated. However, the 123D offline version does work, using the pictures generated by sixpence 3D scanning kit.
uploading pictures
processing the capture into 3D model
sitting there looking pretty


THIS IS SPARTAAAAAAAAAAAAA!!!!


A quick view in meshlab. further manipulations are needed before 3D printing. For starters, the newspaper background got to go.



update:
the 3D model opened in meshmixer. the news paper portion is selected and then deleted by pressing key "x"


there are a few gaps need to be fixed in the edited 3D model before it can be printed.

the 3D model is edited into a watertight model, ready for the 3D printer.
the 3D printed model








Tuesday, October 15, 2013

assemble an open source 3D printer reprap prussa mendel

Collection of pictures taken while assembling an open source 3D printer, the reprap prussa mendel.
the parts

the extruder
the frame partial

roller for the heated bed
extruder support bars
frame partial
frame without the electronics and wiring
wiring the extruder
final assembly
first print
second print