A scriptable interface for STL transformation and accumilation.
$ git clone https://github.com/sshirokov/stltwalker.git
$ cd stltwalker
$ make
$ ./stltwalker -h
./stltwalker [-options] {file0 [--operations]..}..{fileN [--operations]..}
v0.0.3
Options:
-h Show help
-I Copy maximum 1 input object to output memory directly.
-L <float> Maximum result object length
-W <float> Maximum result object width
-H <float> Maximum result object height
-p Pack input objects automatically
-b <float> Set packing margin
-o filename Output the resulting composite object to `filename'
-r Do not center and raise object above the Z plane on load
-R Do not center and raise the result object above the Z plane
-Z Apply all pending transforms and place the current model on the Z plane
-D Increase the detail with which the result is described
Transforms:
--scale=<options> Scale the model by a constant factor
--rotateX=<options> Rotate the model around the X axis (degrees)
--rotateY=<options> Rotate the model around the Y axis (degrees)
--rotateZ=<options> Rotate the model around the Z axis (degrees)
--translate=<options> Translate the model along a vector <X,Y,Z>
-L
, -W
, and -H
will change the exit status of the application to non-zero as well as printing the failure.
The -p
option asks stltwalker to pack the input objects on the build platform.
The packing margin can be adjusted with -b 25.0
$ ./stltwalker -p data/jaws.stl --rotateZ=45.0 \
data/jaws.stl \
data/jaws.stl \
-o /tmp/packed.stl
Which should result in something like this:
By default, the inputs are transformed and added to the build platform.
$ ./stltwalker data/jaws.stl --rotateZ=10 \
data/jaws.stl --translate=0,30,0 \
data/jaws.stl --translate=0,-30,0 --rotateZ=180 \
-o /tmp/out.stl
[INFO] (src/stltwalker.c:114) Loaded: data/jaws.stl
[INFO] (src/stltwalker.c:114) Loaded: data/jaws.stl
[INFO] (src/stltwalker.c:114) Loaded: data/jaws.stl
[INFO] (src/stltwalker.c:147) Output contains 840 facets
[INFO] (src/stltwalker.c:152) Writing result object to: '/tmp/out.stl'
Which should produce something like this when rendered or printed: