An exercise of the Tesseract.
My employer before Perceptive Software had a logo that ‘could have been’ a Tesseract.
Source code available here on GoogelSVN.
It has been a few years since I was fascinated over random dot sterograms; 3D without glasses or special technology, just have to cross your eyes.. and a headache afterward.
For my most recent enrichment, this is my first exercise using WPF. I am implementing a STL binary decoder in C#. Will work on the ascii decoder next.
Visual Studio 2008 DecoderExercise project available on GoogleSVN.
One of the nice thing about Visual Studio is your language choice. Regardless of your preference for C#, C++ or VB, the underlining API is the same. So, it is a surprise to me that the FTPWebRequest example is missing a VB implementation. As an exercise assigned, I am porting the C# example into VB for those whom feel left out. Here is my dialog application that allows you to navigate to a directory, connect to ftp server and put file(s) onto server. For test comparison, I have also make the sample code into a DLL for testing. Here is my class library of the MSDN-C# example.
An interesting LinkedIn discussion brought on by Zhonghai Deng. Here is my exercise displaying frequency plots for 2X interpolation via nearest-neighbor, linear, and cubic. The original image is a rect function (10 pixels x 1 pixels) All interpolated images are scaled 2X to (20 pixels x 1 pixel) with Adobe photoshop. See the result sinc function comparison and/or download the mathematica file and source images.
Made some minor enhancement on the year old android application, XLOsketch. Like the first implementation, accelerometer is required.
Correction from version 1.0, the drawing path appropriately draws downward as you would expect with gravity. The steeper the angle, the faster it travels.
Also, there is a pause-continue option. When paused, user has the control to change the stroke thickness.
Prerequisite to building a Rhino plugin, I need to validate my understanding of the sketchfab upload process. I begin with a python script from the API page, my new token and a sample lamp OBJ file.
type in ‘pythonw upload.py’ and a successful upload delivers a screen dump of the file transfer along with an id and validating success confirmation.
My credential works and now I am ready to write my own uploader test in C#. From the API and python script, I gather the four necessary steps; 1) load CAD file, 2) convert to base64, 3) build JSON, 4) upload/post JSON.
Rhino v4 supports plugin development with Visual Studio 2008, C#, VB and C++. The simplest for me is a C# dialog application with default controls and OpenFileDialog module.
Using FileStream, CAD file is read in as a byte array.
Since some CAD files (STL, PLY) can be in binary or ASCII format, a base64 conversion is used. Thanks to C#, the conversion is available in the System.Convert library.
Following Sketchfab API, I am creating a JSON string with below function. After conversion to a byte array, HttpWebRequest uploads my content to sketchfab server.
Upon a successful upload, I receive a confirmation id and ‘success : true’.
It is exciting working on my first Rhino plugin with C#, Visual Studio 2008. The body of code samples is massive (over 150+). From McNeel’s dialog example, I am able to incorporate the test code user interface.
The challenge is getting access to the mesh data. It seems that each example requires user to select data and I am at a loss how. Might you share some wisdom ? Here is my source code for ExporterTest and RhinoExporter (experiment).
Happy to have found the most recent Rhino 5 API documentation online.
Exciting opportunity to develop exporter(s) for sketchfab. The offer is to implement exporter plugin(s) for popular CAD software in exchange for sketchfab account for a year. There are already three such implementations: AutoDesk-3dMax, Blender and Google-SketchUp. I am looking into Rhino and Meshlab.
Rhino v5 beta is available in Mac OSX and Windows. Python scripting is a big feature I have been anticipating for sometime. Sadly, I did not witness its functionality in OSX beta WIP. Any suggestion(s) ? Windows Rhino v5 is only available for licensed Rhino users. So, I downloaded Rhino v4 evaluation which does not support python. Pray to the Rhino deity that the documentation and SDK is excellent and writing a C# plugin will be a cinch !
Meshlab is an open source project with seemingly good documentation on wiki. But apparently there is nothing under ‘plugin’ ? I did find these plugin examples and this official documentation which includes instruction on C++ plugin development as well as the project location and compile. Meshlab is compiled with QT. Might QT Creator be the magical tool I seek ?
Before the actual implementation, I thought to make a prototype. The API specification is available on sketchfab, token is provided upon sign up. My prototype is in C#; got it working quickly (praise to a good language, tools and user community, thank you!) So, here is the Visual Studio 2005 C# application for uploading your CAD file to sketchfab. Feel free to use this source code for your next exporter implementation (if it is helpful).
Last year I implemented four decoders (wireframe-basic) for formats: STL, PLY, OFF and OBJ. The decoders were based on Devon Govett’s bmp decoder. The bmp decoder loaded binary data via AJAX and type cast as uint8Array.
Unfortunately, IE9 and prior versions didn’t support uint8Array type (IE10 does, horay) ! So, for the ASCII only CAD formats (OBJ, OFF), I re-wrote their decoders to keep the returned data in ASCII.
I extracted the AJAX into its own common Loader class for re-usability across multiple decoders. In addition, thanks to Eric Bidelman’s article on local file access, I am adding local file load capability to the Loader class in my OBJ decoder.
A byproduct of handling ASCII data is the possibility of line parsing with Regular Expression as I have learned from Three.js’ very own Mr. Doob. This is somewhat put into practice in my work-in-progress Three.js-OFF-decoder.