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:
Use "File> Repair STL file..." menu option to create a file with the obj extension.
Use "Add" button below the menu to display your AFM Image on the print board
Right click on your AFM image. Use "Scale> uniformely" option, Set "15
Usage
exportToSTL(AFMImage3DModelAnalysis, AFMImage, stlfullfilename)
Arguments
AFMImage3DModelAnalysis |
|
AFMImage |
an |
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]