Package org.jmol.export
Class _StlExporter
java.lang.Object
org.jmol.export.___Exporter
org.jmol.export.__CartesianExporter
org.jmol.export._VrmlExporter
org.jmol.export._StlExporter
STereoLithography file format exporter
for 3D printing.
Based on _VrmlExporter by Bob Hanson;
diverts the output() method to do nothing and
delivers only triangle sets.
Note that no attempt is made here to ensure that
surfaces are closed.
Also, an inefficient mechanism that involves creating a
full in-memory representation of the data is used. If this
turns out to be problematic, it might be possible to use
random access, but the applet does not have that capability,
and certainly JavaScript does not.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteArrayOutputStreamprivate Stringprivate boolean(package private) javajs.util.Lst<javajs.util.M4>private javajs.util.M4private javajs.util.M4private intprivate javajs.util.OCFields inherited from class org.jmol.export._VrmlExporter
fontChild, fontFace, fontSize, fontStyle, tempQ1, tempQ2, tempQ3, useTableFields inherited from class org.jmol.export.__CartesianExporter
canCapCylinders, noColor, sphereMatrix, viewpointFields inherited from class org.jmol.export.___Exporter
apertureAngle, backgroundColix, cameraDistance, cameraPosition, center, commandLineOptions, commentChar, degreesPerRadian, depthZ, export3D, exportScale, exportType, fileName, fixedRotationCenter, gdata, lightSource, lineWidthMad, out, privateKey, referenceCenter, scalePixelsPerAngstrom, screenHeight, screenWidth, slabZ, solidOnly, tempP1, tempP2, tempP3, tempV1, tempV2, tm, vwr -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected voidprotected voidoutputAttr(String attr, float x, float y, float z) protected voidoutputAttrPt(String attr, javajs.util.T3 pt) protected voidprotected voidprotected voidoutputCircle(javajs.util.P3 pt1, javajs.util.P3 pt2, float radius, short colix, boolean doFill) protected voidoutputGeometry(javajs.util.T3[] vertices, javajs.util.T3[] normals, short[] colixes, int[][] indices, short[] polygonColixes, int nVertices, int nPolygons, javajs.util.BS bsPolygons, int faceVertexMax, javajs.util.Lst<Short> colorList, Map<Short, Integer> htColixes, javajs.util.P3 offset) protected voidprotected voidoutputRotation(javajs.util.A4 a) (package private) voidprotected voidprotected voidprivate voidwriteFacet(javajs.util.T3[] vertices, int[] face, int i, int j, int k) private voidwriteFloat(float f) private voidwritePoint(String s, javajs.util.T3 p) Methods inherited from class org.jmol.export._VrmlExporter
getDef, getViewpoint, output, outputAppearance, outputChildShapeClose, outputChildShapeStart, outputCloseTag, outputColorIndices, outputColors, outputCone, outputCylinder, outputCylinderChildScaled, outputDefChildFaceSet, outputEllipsoid, outputFace, outputFaceSetClose, outputFaceSetStart, outputFooter, outputInitialTransform, outputNormals, outputQuaternionFrame, outputShapeClose, outputShapeStart, outputSolidPlate, outputSphere, outputSurface, outputTextPixel, outputTransRot, outputTriangle, outputUseChildCloseMethods inherited from class org.jmol.export.__CartesianExporter
drawAtom, drawCircle, drawCylinder, drawEllipse, drawPixel, drawTextPixel, fillConeScreen, fillCylinderScreen, fillCylinderScreenMad, fillEllipsoid, fillSphere, fillTriangle, getCameraPosition, getCoordinateMap, getModelCenter, getNormalMap, outputIndices, plotImage, setSphereMatrixMethods inherited from class org.jmol.export.___Exporter
drawFilledCircle, drawSurface, finalizeOutput2, fixScreenZ, getByteCount, getColorList, getConeMesh, getExportDate, getJmolPerspective, getRotationMatrix, getRotationMatrix, getTriad, getTriadC, initializeOutput, initOutput, opacityFractionalFromArgb, opacityFractionalFromColix, outputComment, outputJmolPerspective, outputVertex, outputVertices, rgbFractionalFromArgb, rgbFractionalFromColix, round, round, setTempVertex, translucencyFractionalFromColix
-
Field Details
-
isDebug
private boolean isDebug -
header
-
oc
private javajs.util.OC oc -
bos
-
m4
private javajs.util.M4 m4 -
lstMatrix
javajs.util.Lst<javajs.util.M4> lstMatrix -
m4a
private javajs.util.M4 m4a -
nTri
private int nTri
-
-
Constructor Details
-
_StlExporter
public _StlExporter()
-
-
Method Details
-
outputHeader
protected void outputHeader()- Overrides:
outputHeaderin class_VrmlExporter
-
pushMatrix
protected void pushMatrix()- Overrides:
pushMatrixin class_VrmlExporter
-
popMatrix
protected void popMatrix()- Overrides:
popMatrixin class_VrmlExporter
-
output
- Overrides:
outputin class___Exporter
-
outputChildStart
protected void outputChildStart()- Overrides:
outputChildStartin class_VrmlExporter
-
outputChildClose
protected void outputChildClose()- Overrides:
outputChildClosein class_VrmlExporter
-
outputRotation
protected void outputRotation(javajs.util.A4 a) - Overrides:
outputRotationin class_VrmlExporter
-
outputAttrPt
- Overrides:
outputAttrPtin class_VrmlExporter
-
outputAttr
- Overrides:
outputAttrin class_VrmlExporter
-
outputGeometry
protected void outputGeometry(javajs.util.T3[] vertices, javajs.util.T3[] normals, short[] colixes, int[][] indices, short[] polygonColixes, int nVertices, int nPolygons, javajs.util.BS bsPolygons, int faceVertexMax, javajs.util.Lst<Short> colorList, Map<Short, Integer> htColixes, javajs.util.P3 offset) - Overrides:
outputGeometryin class_VrmlExporter
-
writeFacet
private void writeFacet(javajs.util.T3[] vertices, int[] face, int i, int j, int k) -
finalizeOutput
- Overrides:
finalizeOutputin class___Exporter
-
outputCircle
protected void outputCircle(javajs.util.P3 pt1, javajs.util.P3 pt2, float radius, short colix, boolean doFill) - Overrides:
outputCirclein class_VrmlExporter
-
plotText
- Overrides:
plotTextin class_VrmlExporter
-
writePoint
-
writeFloat
private void writeFloat(float f)
-