3D - 2D file formats

(Michael) #1

Hello folks, I’m asking here in hopes of help (forlorn?!).

I’m working with 3D datasets, they are like medical CT and PET images, I am using Amide to manipulate them. I hope to import data for a planar image (a scan of one view; that is jpg or tiff. It would become one slice.)

Is anyone familiar enough with software for such formats to know if I am too hopeful? The data for 3D printers must be similar. My 3D files were DICOM, Amide can import them.

In hope a nd with curiosity

(Max Bainrot) #2


So generally to go from 2D to 3D with something like openSCAD you need it
to be in DXF format, you then import it into it and perform an extruder
which converts it into a 3D object that you then export into say an STL.

You then feed the STL into the slicer which then generates the gcode that
will run the 3D printer

I believe with some minor hair pulling you can convert a raster format such
as jpeg or PNG to DXF using another open tool called Inkscape

With CT/MRI scans you may be able to get the STL/obj file out of it,
completely avoiding the intermediate steps. Easiest “no frills” way of
getting a slice from an STL/obj file is either with slic3r mesh mixer to do
2x plane cuts and export the STL (slic3r is another slicer)


(Michael) #3

Thanks Max. I’ll set off down an experimental path. But was the comment about STL/log files for the inverse process? Of delving into the files I have from the scanner? As opposed to generating something to emulate them.

(Michael) #4

PS Inkscape seems to be for vector graphics. Unlikely to be what I need??

btw I am a complete novice. to even think in 3D has been painful :slight_smile:

(Max Bainrot) #5

Forgot to summarise the workflow.

Assuming you’re only able to get JPEGs/PNG’s out of the imaging software
the workflow would be something like

  1. Convert raster to DXF format
  2. Import DXF into openSCAD and extrude the 2d image to the desired height
    and export into STL
  3. Slice the STL with appropriate settings for the 3D printer (I believe at
    the space we have a nice profile setup on the PC that runs the lulzbot)
  4. Feed the gcode to the 3d printer either through an SD card (a untethered
    print) or via the software on the PC (tethered print)

For a case of using a 3d model from the imaging software

  1. perform planar slicing/mesh clean up via something like mesh mixer (if
    others know alternatives please do chime in). Very important if there are
    intersecting shells otherwise the slicer might get confused.
  2. slice via the slicer
  3. print

(Max Bainrot) #6

Yeah Inkscape is a vector graphics program but I vaguely remember using it
to generate DXF files for openSCAD.

DXF is one of the formats that I know are importable into openSCAD, it’s
used in CAD drawings and I think it has been used for printing too.

No worries, we have electronics Wednesdays and there should be someone
around hopefully who can get you started. I am not familiar with the
lulzbot but if I can make it in I am sure i can probably work it out.

(Chris Small) #7

Inkscape is vector graphics but I think it’s a little like metapost in that it treats drawing objects as paths. I haven’t played with it, much, but if you’re into stuff like calligraphy, and have a tablet, it’s very good for that sort of thing.