Skip to content
bsutton edited this page Oct 22, 2011 · 11 revisions

The 3DC library provides for the manipulation of common graphics file formats (STL, AMF) including:

  • rotation
  • translations
  • unit conversion
  • merging
  • file format conversion

The 3DC library also provides a command line interface which supports all of the above functions.

Prerequisites

  • Java 1.6

Download

Download the 3dc.jar

Running

To run 3DC from the command line type:

to allow multiple 'single material' file formats such as STL to be combined into a single multi-material file format such as AMF. java -jar 3dc-1.0.jar

Command Line Arguments

-c | -colour Used by input files to assign a colour to the objects contained in the file. The output file must be able to support colour properties for this to have any meaning. Currently only AMF supports colour.

The colour option must come after the -i option.

e.g. -c red

-i | -input <inputfilename.ext> Defines an input file to be loaded an manipulated according to the arguments that follow after the filename.

e.g. -i input.stl

-v | -version Prints the version number of 3DC on startup.

3dc -v -i src/test/resources/cube.stl -u millimeter -material pla -colour red -i src/test/resources/kwartzlab.stl -u meter -material abs -r 0:0:0 -i src/test/resources/rook.amf -material pla -u micron -t 10:10:10 -r 180:0:180 -i src/test/resources/rook.stl -material pla -colour yellow -o src/test/resources/result.amf -u millimeter

The above command combines four files (cube.stl, kwartzlab.stl, rook.amf and rook.stl) into a single file called result.amf. As the four files are combined the are converted into a common unit of measure (millimeter) translated and rotated in the 3d co-ord plane and each input file is assigned a material and a colour.

Clone this wiki locally