exportToSTL {AFM}R Documentation

Export an AFM Image as a STL format file.

Description

Export an AFMImage as a STL format file thanks to the rgl package. The STL file can be used as an input for a 3D printing software tool.

exportToSTL is compatible with slicr (http://slic3r.org) version 1.2.9 (GPL v3 licence).
In order to 3D print the AFM Image with slic3r, do as following:

Usage

exportToSTL(AFMImage3DModelAnalysis, AFMImage, stlfullfilename)

Arguments

AFMImage3DModelAnalysis

an AFMImage3DModelAnalysis

AFMImage

an AFMImage from Atomic Force Microscopy

stlfullfilename

directory and filename to save as a stl file

Author(s)

M.Beauvais

Examples

## Not run: 
library(AFM)
data("AFMImageOfRegularPeaks")
AFMImage<-AFMImageOfRegularPeaks
# calculate the 3D model : surface and the faces
AFMImage3DModelAnalysis<-new ("AFMImage3DModelAnalysis")
AFMImage3DModelAnalysis<-calculate3DModel(AFMImage3DModelAnalysis= AFMImage3DModelAnalysis,
                                          AFMImage= AFMImage)
# export the 3D model to file
exportDirectory=tempdir()
print(paste("saving model in ", exportDirectory))
exportToSTL(AFMImage3DModelAnalysis=AFMImage3DModelAnalysis,
            AFMImage=AFMImage, 
            stlfullfilename=paste(exportDirectory, "myFile.stl", sep="/"))

## End(Not run)

[Package AFM version 2.0 Index]