Home »  » Work in progress » Converting crystal structures to printable files
Search Search  
Show: Today's Messages    Show Polls    Message Navigator
Converting crystal structures to printable files [message #46869] Thu, 12 April 2012 17:39 UTC Go to next message
avatar chemdr99  is currently offline chemdr99
Messages: 3
Registered: October 2011
Go to my shop
Junior Member
I work with crystals at my job (think diamonds, rubies, etc. but nothing so expensive) and I use a software known as Diamond crystal structure visualization which generates 3D renderings of the atomic arrangements of the atoms in crystal structures. It has all of the xyz coordinate data to produce 3D design files that would be printable, but it isn't formatted to save in any file type that is recognizable by typical design software (SketchUp, MeshLab, netfabb, etc.) If anyone has any ideas about how to go about importing this data, I would greatly appreciate it. I know I could just sit down and put in each atom by hand as spheres and connect them all with tapers, but the scale I want to use would take forever and if I already have the xyz data, I would rather just use that. The Diamond software is available as a demo download on their website, so if someone has the time (and inclination to help), you can download it and see for yourself.
Thanks in advance.


ChemDr
Re: Converting crystal structures to printable files [message #46873 is a reply to message #46869 ] Thu, 12 April 2012 18:15 UTC Go to previous messageGo to next message
avatar stonysmith  is currently offline stonysmith
Messages: 1874
Registered: August 2008
Go to my shop
Senior Member
moderator
Can you share a copy of such a file? Either publicly or thru PM would be fine.


Patience, Persistance, Politeness - the 3Ps will help us get us to Perfect Printed Products
Re: Converting crystal structures to printable files [message #46884 is a reply to message #46869 ] Thu, 12 April 2012 19:36 UTC Go to previous messageGo to next message
avatar stop4stuff  is currently offline stop4stuff
Messages: 3109
Registered: June 2010
Go to my shop
Senior Member
Try http://www.crystalimpact.com/diamond/faq.htm#vrml export

VRML2.0(97) a .wrl file is one of the filetypes Shapeways accepts. If Diamond outputs the VRML1.0 filetype, use Meshlab or NetFabb Basic to convert to whichever filetype you want to upload.

From Shapeways FAQ;
"You can upload STL, VRML2/97 (.wrl), COLLADA (.dae), X3D and OBJ files to Shapeways. Many modeling applications support these file formats. If you need to convert to them we recommend Accutrans or Meshlab."

If you don't need colour in the print, I recommend using NetFabb both for conversion (to stl) and error checking.

Paul
Re: Converting crystal structures to printable files [message #46898 is a reply to message #46884 ] Thu, 12 April 2012 22:20 UTC Go to previous messageGo to next message
avatar stonysmith  is currently offline stonysmith
Messages: 1874
Registered: August 2008
Go to my shop
Senior Member
moderator
chemdr99 and I are exchanging PM's about this... it seems the WRL witten out by "Diamond" is not directly compatible with Meshlab. I was able to get it to load into Truespace, and flip it to VRML2.0, but that's a kludgy way of dealing with it.

I'll post more as we figure out something.


Patience, Persistance, Politeness - the 3Ps will help us get us to Perfect Printed Products
Re: Converting crystal structures to printable files [message #46945 is a reply to message #46898 ] Fri, 13 April 2012 14:34 UTC Go to previous messageGo to next message
avatar henryseg  is currently offline henryseg
Messages: 197
Registered: July 2008
Go to my shop
Senior Member
If you have the coordinates of each atom, and a list of the edges to be drawn between atoms, then in principle it shouldn't be too hard to write a script to build the geometry from that data. I would use Rhino and the Python scripting interface.

You might find that the meshes used to visualise the geometry aren't watertight, or aren't very high resolution (e.g. tubes have only a small number of sides, when you'd prefer them to be rounder). Both of these issues aren't a problem for just drawing things on screen, the latter particularly when they lack of roundness can be hidden using shading.

So it might be better to rebuild from scratch, which also lets you play with the relative thickness of lines and size of balls around the atoms etc.
Re: Converting crystal structures to printable files [message #46946 is a reply to message #46945 ] Fri, 13 April 2012 15:04 UTC Go to previous messageGo to next message
avatar damocles  is currently offline damocles
Messages: 21
Registered: October 2011
Go to all my models
Junior Member
Do that, find surface atoms, assume atoms are mesh vertices, iteratively split any nontriangular surface facets, then write to ASCII STL. Should work, plus or minus some debugging. From there, go back and fiddle with vertex choice and initial facet choice to tweak the results if needed.

Alternately, output atoms as point clouds and try to fit a mesh in MeshLab (etc.). Less work, but probably less ideal results.
Re: Converting crystal structures to printable files [message #46949 is a reply to message #46945 ] Fri, 13 April 2012 15:50 UTC Go to previous messageGo to next message
avatar stonysmith  is currently offline stonysmith
Messages: 1874
Registered: August 2008
Go to my shop
Senior Member
moderator
I figured out a workflow to convert the Diamond software's output to STL format using a bit of manual editing and then using AccuTrans to do the actual conversion. I sent it to chemdr99 and he can share if he wants to.

====
I have been casually researching how to build models such as this. I've got a snippet of OpenSCAD code that will place the connecting cylinders between the sphere centers. The advantage would be tht with OpenSCAD, you could easily pick your number of facets and make the model very smooth. The trouble is positioning the spheres (atoms), and the Diamond software is doing a good job of that. Perhaps someone can work out the other info needed for calculating the relationship of the atoms in OpenSCAD.

====
Now if we could just print individual atoms for real Very Happy .. anybody up for a molecular printer? Talk about THIN walls Very Happy


Patience, Persistance, Politeness - the 3Ps will help us get us to Perfect Printed Products
Re: Converting crystal structures to printable files [message #46952 is a reply to message #46949 ] Fri, 13 April 2012 17:36 UTC Go to previous messageGo to next message
avatar chemdr99  is currently offline chemdr99
Messages: 3
Registered: October 2011
Go to my shop
Junior Member
Thanks to Stony, I have a sufficiently efficient workflow from crystal data (.cif) to printable .stl file. Probably due to the use of all-free programs, I have to go through a few programs, but it is well worth the few extra mouse clicks.

I start with the .cif crystal data file I open with Diamond (manipulation of the data in Diamond is a whole other message and something you can probably follow better from a tutorial website) and export as .wrl.
In Notepad, I manually increase the radii of the cylinders (atomic bonds) and spheres (atoms) to a more manageable size (right now using 0.15 as cylinder size and 0.5 as atom size - this could also probably be done in Diamond).
Then, open the edited .wrl file in AccuTrans 3D and export as an .x3d file.
This file is opened in Meshlab and resaved as .stl,
Finally, this .stl file is opened in netfabb where all scaling and error correction are performed and the final file is exported as an .stl file.

And there you have it. I find it efficient enough to get the desired results and you can see the fruits of much labor in my store.

www.shapeways.com/shops/thedoor

Thanks again to all for your help and suggestions and especially to Stony for the workflow and AccuTrans3D suggestion. God has really shown Himself in my once-reserved world of chemistry through these crystal structures and I am glad to finally be able to share them with everyone else. He shows up in the large places as well as the very tiny (nano-scale even) and even in a community of strangers connected by a common bond of creativity.


ChemDr
Re: Converting crystal structures to printable files [message #46953 is a reply to message #46952 ] Fri, 13 April 2012 17:37 UTC Go to previous message
avatar chemdr99  is currently offline chemdr99
Messages: 3
Registered: October 2011
Go to my shop
Junior Member
Stony - speaking of printing atoms, you would be surprised what kind of research goes on in academia. I know of a group that is building organs one cell at a time Shocked . Not quite atomic, but getting there


ChemDr

 
   
Previous Topic:Portal Themed Rings
Next Topic:Professor Severus Snape

Logo

Hello.

We're sorry to inform you that we no longer support this browser and can't confirm that everything will work as expected. For the best Shapeways experience, please use one of the following browsers:

Click anywhere outside this window to continue.