exportToSTL: Export an AFM Image as a STL format file.

Description Usage Arguments Author(s) Examples

View source: R/AFM3DPrinter.R

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

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## 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)

AFM documentation built on Oct. 23, 2020, 5:23 p.m.

Related to exportToSTL in AFM...