GithubHelp home page GithubHelp logo

stltwalker's Introduction

A scriptable interface for STL transformation and accumilation.

Quickstart

$ 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.

Eyedropping Demo With Special Effects

Packing

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:

stltwalker packing composite

Compositing

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:

stltwalker jaws composite

Licence

MIT

stltwalker's People

Contributors

sshirokov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.