Compensated STL file generation
distort_stl is a command-line program used to produce warped or compensated STL file geometries from thermo-mechanical part scale simulations. Warped geometries can be used for part validation or to check if the distorted part will fit within tolerance in a model assembly. Compensated geometries alter the source STL using calculated displacements to correct for the predicted distortion, leading to a less distorted part when the compensated geometry is built in a powder bed machine. This function can also produce warped STLs from solid support structures. The usage for this program is as follows:
distort_stl input.txt
Where the input file has the following format:
*INPU: Netfabb Simulation input file name, without .in extension
a1 : input file name
*WARP: Warpage magnification factor
r1: magnification factor
This is the magnification factor that applies the modeled displacements to the source STL file. The default value -1 produces a fully compensated STL file. A value of 1 will give warped displacements to be used for post processing analysis or assembly fit checks.
Best practices: Only produce compensated STLs for production after the material properties and processing parameters for the intended build have been experimentally validated. Unless an iterative simulation-compensation process is executed by using the *REFG card to converge upon a compensated model, values other than -1 for compensation may be used to calibrate the compensation algorithm. This is due to the non-linearity of the compensation problem, which is not taken into account when performing a single simulation-compensation step. On a small part with measurable distortion print parts using values of -0.5 -0.75 and -1.0 to test the compensation efficacy.
*IOFF : Increment offset from end of analysis
i1: increment offset
This controls the increment that the STL file is produced from. The default value is -2. Range [- <ninc>, -1] or [1, <ninc>], where <ninc> is the number of solver increments with results. Negative *IOFF counts backwards from the end of the analysis, and positive *IOFF counts forwards from the beginning.
Best practices: The preferred increment for compensation is the increment after cool down, but before build plate release or removal. If compensation or warping is to be performed using geometries after this step, it is advised that plasticity should be turned on using *PPLA. If the part is to be heat treated, compensation should be performed after the heat treatment simulation process, before the removal of the part from the build plate. Consult *STRF for details about heat treatment simulation.
*NRLE: No relative excursion from the build plane
Default off. Apply only the XY plane distortion to a warped or compensated STL.
*RESU: Number of result components
*RESU i1 a1
i1: Number of result components: 1 for scalar, 3 for vector, or 6 for symmetric tensor.
a1: Result file extension name. See the table below.
By default, without using *RESU, distort_stl run on a mechanical analysis will return the displacement history. To override this, specify tensor order i1 and the file extension a1.
Result card | File extension | Description (tensor order) |
---|---|---|
OSIG | .sig.ens | Cauchy stress (6) |
OEPT | .ept.ens | Elastic strain (6) |
OEQP | .eqp.ens | Equivalent plastic strain (1) |
OMLT | .mlt.ens | Melt indicator (1) |
OEPP | .epp.ens | Plastic strain (6) |
OSD3 | .sd[123].ens | Principal stress directions (3) |
OSP3 | .sp[123].ens | Principal stress values (3) |
OSVM | .svm.ens | von Mises stress (1) |
q@"J | .tmp.ens | Temperature (1) |
Additional optional controls
*OUTP: Output STL file name(s) a1
output STL file name 1 a2
output STL file name 1 ...
By default the output name(s) will be <*INPU> <i> warp.stl, where <i> is indexed for each output STL according to *ASTL or *ISTL. Each *OUTP value must be unique, and cannot conflict with the input STL names under *STLF in the solver input file. If both *OUTP and *ISTL are used, then they must have the same number of arguments.
*NINT: Number of nodes for inverse distance weighted nearest neighbor interpolation
i1: number of nodes
Default value 10. Range (1, <nnode>), where <nnode> is the number of nodes in the solver mesh.
*EINT: Exponent for inverse distance weighted nearest neighbor interpolation
r1: exponent
Default value 1.0. Range (0, ∞)
*SNAP: Snapping tolerance
r1: snapping tolerance
Default value 1e-5. Range (0, ∞)
*MAXR: Maximum number of refinement levels
i1: maximum refinement levels
Default value 10. Range (1, ∞)
*MINE: Minimum edge length
r1: min length
Default value 0.5. Range (0, ∞)
*MAXE: Maximum edge length
r1: max length
Default value 3.0. Range (<*MINE>, ∞)
*RTOL: Refinement tolerance
Default value 1e-3. Range (0, ∞)
*FORM: Output STL file format
a1: a*1: output format, Either "a" or "b" where "a" = ascii format and "b" = binary format.
Default value "b".
*ISTL: STL ID(s) from list of part STLs in *STLF
i1
i2
i3
...
i1: STL ID
Default value 1. Range (1, <nstl>), where <nstl> is the total number of part STL files listed under *STLF in the solver input file. Support STLs do not count towards <nstl> unless the *SSTL card is used.
*ASTL: Output all STLs
Default off. Instead of using *ISTL to explicitly list each STL to be warped and exported, *ASTL can be used to export all STLs. If both *ISTL and *ASTL are used, then *ISTL is ignored.
*SSTL: Output support STLs
Default off. Including this card will export warped STLs for support structures. This is intended to be used only for volumetric support files, not zero thickness or pre-homogenized STL files. Individual files can be exported by using *ISTL or all files, support and part, can be exported using *ASTL.
*O3MF: Output 3MF file
Default off. Use this card to export warped 3MF files in addition to STL files. Note that each geometry will be written to its own STL file.
*OVTK: Output VTK results
Using this card creates Visualization Toolkit (VTK) results files in the results folder of the type *.vtu. This applies only to part scale mechanical simulations. Use this option to view simulation results on the geometry itself instead of the mesh.
*AVTK: ASCII VTK results
Using this card in conjunction with *OVTK creates ASCII VTK results files.
*O3DM: natively export warped geometry to colored 3D manufacturing format (3MF) file(s)
Default on. This card enables the output to 3MF files with the same base filename as the STL files and a "color.3mf" filename extension. This option natively exports the data from distort_stl which keeps the connectivity intact. Displacement magnitudes are encoded in the 3MF as a blue-to-red rainbow colormap.
*N3DM: turn off colored 3DF export (*O3DM)
) Default off. Use this to override *O3DM.
*WRTU: Pointcloud export
Default off. The *WRTU card will create a *_warp_wrtu.txt file. Columns 1: 3 are nominal position x, y, z for all refined STL vertices and columns 4: 6 are displacement x, y, z. Consult the solver input card entry of the same name *WRTU for additional details.
*FIXZ: Fix the Z coordinates of vertices on the bottom of the part
Default off. The *FIXZ card keeps the bottom of the compensated geometry flat to maintain contact with the build plate.
*ZTOL: Z tolerance for *FIXZ
r1: z tolerance
Default r1 = 1.d-5. Vertices within r1 of the minimum z coordinate are fixed.
*REFG: Reference geometry
a1
a2
a3
...
ai: reference geometry STL file name
Default null. Currently only 1 reference STL is supported. The *REFG card specifies the reference or nominal geometry to be used for iterative compensation, as opposed to the preform geometry (from the solver *STLF card) or the compensated geometry (output of distort_stl).
*STLF: STLFile (Tech Preview)
a1: Reference DED Geometry STL file name
Using this card allows for the compensation of DED type simulations by referring to an STL file depicting the nominal geometry deposited during simulation.