Since founding Castle View Design in the summer, this website has been growing from a simple three page presence to something which will hopefully become a good showcase of what we can undertake.
One of the key eye-catching things which I wanted to add was interactive models, rather than static jpeg images of cad models. Also this site is built on WordPress, so I set about looking for a WordPress plugin which could manage this. There seemed to be a few solutions out there, but the following method works quite well.
Hosting models remotely
There’s a site called p3d.in which allows models to be uploaded and stored remotely. It then gives you the code to embed 3d views of those models into your WordPress posts or pages.
It’s free to register, and uploading a model is pretty painless. The only additional step required is that models need to be in Wavefront OBJ format.
Getting models into OBJ format
SolidWorks can’t export directly to OBJ but luckily there’s a freely available macro which does the job easily. Download from here
and follow the instructions in the Readme file.
Note – You do actually need to install the macro as a toobar button. I don’t know why it doesn’t work from the regular ‘run macro’ dialogue but it doesn’t!
Once saved in OBJ format you can upload the file into your newly created p3d.in account.
Putting the 3d image box into your WordPress
Firstly you need to have the iFrame plugin installed and activated in your WordPress blog. From your admin screen, do a search to find it, install and activate. I didn’t need to change anything else!
Then, go back to p3d.in and select the model you want to show. The bottom icon on the left is ‘Share or embed this model’. Select this, and go for the option of Self-hosted WordPress blog. It then gives you the code to copy and paste into your WordPress post/page text area.
Here’s an interactive example using our CVD logo as the sample model: