-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added extra blurb to all stl_cmds for better man pages
- Loading branch information
Showing
18 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ Copyright 2014 by Freakin' Sweet Apps, LLC ([email protected]) | |
#define BUFFER_SIZE 4096 | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_bbox prints bounding box information about an STL file.\n\n"); | ||
fprintf(stderr, "usage: stl_bbox <input file>\n"); | ||
fprintf(stderr, " Prints bounding box information for the given binary STL file.\n"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ Copyright 2017 by Freakin' Sweet Apps, LLC ([email protected]) | |
#include "csgjs/util.h" | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_boolean performs CSG operations on two STL files.\n\n"); | ||
fprintf(stderr, "usage: stl_boolean -a <stl file A> -b <stl file B> [ -i ] [ -u ] [ -d ] <output file>\n"); | ||
fprintf(stderr, " Performs a mesh CSG boolean operation on STL files A and B using BSP trees.\n" | ||
" -i - performs the intersection of A and B\n" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,9 +31,9 @@ Copyright 2017 by Freakin' Sweet Apps, LLC ([email protected]) | |
#define BUFFER_SIZE 4096 | ||
|
||
void print_usage() { | ||
fprintf(stderr, "usage: stl_convex [ -v ] [ <input file> ]\n"); | ||
fprintf(stderr, " Prints whether the input file is a convex polyhedron. If no input file is specified, data is read from stdin. If -v is specified, prints out the Euler characteristic in addition to whether the mesh is convex.\n"); | ||
fprintf(stderr, "The Euler characteristic of a polyhedral surface is defined as V - E + F, where V is the number of vertices, E is the number of edges, and F is the number of faces. All convex polyhedra will have an Euler characteristic of 2.\n"); | ||
fprintf(stderr, "stl_borders prints how many border edges there are in a given STL file.\n\n"); | ||
fprintf(stderr, "usage: stl_borders [ <input file> ]\n"); | ||
fprintf(stderr, " Prints how many border edges there are. For a watertight, manifold model, it will be 0.\n"); | ||
} | ||
|
||
struct VertexKey { | ||
|
@@ -119,13 +119,8 @@ int main(int argc, char** argv) { | |
int errflg = 0; | ||
int c; | ||
|
||
int verbose = 0; | ||
|
||
while((c = getopt(argc, argv, "v")) != -1) { | ||
while((c = getopt(argc, argv, "")) != -1) { | ||
switch(c) { | ||
case 'v': | ||
verbose = 1; | ||
break; | ||
case '?': | ||
fprintf(stderr, "Unrecognized option: '-%c'\n", optopt); | ||
errflg++; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ Copyright 2017 by Freakin' Sweet Apps, LLC ([email protected]) | |
#define BUFFER_SIZE 4096 | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_cone outputs an STL file of a single cone.\n\n"); | ||
fprintf(stderr, "usage: stl_cone [ -r <radius> ] [ -t <top radius> ] [ -h <height> ] [ -s <segments> ] [ <output file> ]\n"); | ||
fprintf(stderr, " Outputs an stl file of a cone with the provided radius, top radius, height and number of segments to approximate a circle.\n"); | ||
fprintf(stderr, " If the radius or height are omitted, they default to 1. The top radius defaults to 0. If top radius is greater than 0, will output a truncated code. If segments is omitted, it defaults to 32. If no output file is provided, data is sent to stdout. \n"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ Copyright 2017 by Freakin' Sweet Apps, LLC ([email protected]) | |
#define BUFFER_SIZE 4096 | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_convex prints whether an STL file is a convex polyhedron.\n\n"); | ||
fprintf(stderr, "usage: stl_convex [ -v ] [ <input file> ]\n"); | ||
fprintf(stderr, " Prints whether the input file is a convex polyhedron. If no input file is specified, data is read from stdin. If -v is specified, prints out the Euler characteristic in addition to whether the mesh is convex.\n"); | ||
fprintf(stderr, "The Euler characteristic of a polyhedral surface is defined as V - E + F, where V is the number of vertices, E is the number of edges, and F is the number of faces. All convex polyhedra will have an Euler characteristic of 2.\n"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ Copyright 2014 by Freakin' Sweet Apps, LLC ([email protected]) | |
#define BUFFER_SIZE 4096 | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_count prints the number of triangles in an STL file.\n\n"); | ||
fprintf(stderr, "usage: stl_count [ <input file> ]\n"); | ||
fprintf(stderr, " Prints the number of triangles in the provided binary STL file. If no input file is specified, data is read from stdin.\n"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ Copyright 2014 by Freakin' Sweet Apps, LLC ([email protected]) | |
#define BUFFER_SIZE 4096 | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_cube ouputs an STL file of a single cube.\n\n"); | ||
fprintf(stderr, "usage: stl_cube [-w <width>] [ <output file> ]\n"); | ||
fprintf(stderr, " Outputs an stl file of a cube with the provided width. "); | ||
fprintf(stderr, " If the width is omitted, it defaults to 1. If no output file is provided, data is sent to stdout. \n"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ Copyright 2017 by Freakin' Sweet Apps, LLC ([email protected]) | |
#define BUFFER_SIZE 4096 | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_cylinder outputs an STL file of a single cylinder.\n\n"); | ||
fprintf(stderr, "usage: stl_cylinder [ -r <radius> ] [ -h <height> ] [ -s <segments> ] [ <output file> ]\n"); | ||
fprintf(stderr, " Outputs an stl file of a cylinder with the provided radius, height and number of segments to approximate a circle.\n"); | ||
fprintf(stderr, " If the radius or height are omitted, they default to 1. If segments is omitted, it defaults to 32. If no output file is provided, data is sent to stdout. \n"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,9 @@ Copyright 2014 by Freakin' Sweet Apps, LLC ([email protected]) | |
#define BUFFER_SIZE 4096 | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_empty outputs an empty STL file.\n\n"); | ||
fprintf(stderr, "usage: stl_empty <output file>\n"); | ||
fprintf(stderr, " Outputs an empty stl file. "); | ||
fprintf(stderr, " Outputs a properly formatted, but empty stl file (just an 80 byte header and a 0 indicating no triangles). "); | ||
} | ||
|
||
int main(int argc, char** argv) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ Copyright 2014 by Freakin' Sweet Apps, LLC ([email protected]) | |
#define BUFFER_SIZE 4096 | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_header inspects and modifies the header section of an STL file.\n\n"); | ||
fprintf(stderr, "usage: stl_header [-s <header>] [-o <output file>] <input file>\n"); | ||
fprintf(stderr, " If both -s and -o flags are specified <input file> is copied to <output\n"); | ||
fprintf(stderr, " file> and its header is set to <header>. If -o is not specified and -s is\n"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ Copyright 2014 by Freakin' Sweet Apps, LLC ([email protected]) | |
// rather than just merging. | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_merge concatenates multiple STL files.\n\n"); | ||
fprintf(stderr, "usage: stl_merge [ -o <out file> ] [ <in file1> ... ]\n"); | ||
fprintf(stderr, " Merges binary stl files into a single file. If no out file is provided, data is output to stdout.\n"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ Copyright 2014 by Freakin' Sweet Apps, LLC ([email protected]) | |
#define BUFFER_SIZE 4096 | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_normals inspects and modifies normal data of an STL file.\n\n"); | ||
fprintf(stderr, "usage: stl_normals [ -c ] [ -r ] [ -v ] <in file> [ <out file> ]\n"); | ||
fprintf(stderr, " Checks the stored normals against calculated normals based on ordering of vertices.\n" | ||
" -c - if present will ignore the present normal values and calculate them based on the vertex ordering.\n" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ Copyright 2017 by Freakin' Sweet Apps, LLC ([email protected]) | |
#include "stl_util.h" | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_sphere outputs an STL file of a single sphere.\n\n"); | ||
fprintf(stderr, "usage: stl_sphere [-r <radius>] [-s <longitudinal segments>] [-t <latitudinal segments>] [ <output file> ]\n"); | ||
fprintf(stderr, " Outputs an stl file of a sphere with the provided radius and number of segments. "); | ||
fprintf(stderr, " If the radius is omitted, it defaults to 1. If longitudinal segments is omitted, it defaults to 32. If latitudinal segments is omitted, it defaults to half the longitudinal segments. If no output file is provided, data is sent to stdout. \n"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ Copyright 2017 by Freakin' Sweet Apps, LLC ([email protected]) | |
#include <iostream> | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_spreadsheet outputs an STL file in a tab delimited text format.\n\n"); | ||
fprintf(stderr, "usage: stl_spreadsheet <input file>\n"); | ||
fprintf(stderr, " Prints vertex and normal information for every triangle in STL file in a tab delimited format that can be opened as a spreadsheet.\n"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ Copyright 2014 by Freakin' Sweet Apps, LLC ([email protected]) | |
// won't work with stdout. | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_threads outputs an STL file with male or female threads per the ISO metric screw thread standard.\n\n"); | ||
fprintf(stderr, "usage: stl_threads [ -f ] [ -D <diameter> ] [ -P <pitch> ] [ -a <angle> ]\n" | ||
" [ -h <height> ] [ -s <segments> ] <output file>\n"); | ||
fprintf(stderr, " Outputs an stl file with male or female screw threads per the ISO metric \n" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ Copyright 2017 by Freakin' Sweet Apps, LLC ([email protected]) | |
#define BUFFER_SIZE 4096 | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_torus outputs an STL file of a single torus.\n\n"); | ||
fprintf(stderr, "usage: stl_torus [ -o <outer radius> ] [ -i <inner radius> ] [ -s <segments> ] [ -c <cross sectional segments> ] [ <output file> ]\n"); | ||
fprintf(stderr, " Outputs an stl file of a torus with the provided outer radius, inner radius and number of segments.\n"); | ||
fprintf(stderr, " If the inner radius is omitted, it defaults to .5. If the outer radius is omitted, it defaults to 1.\n"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ Copyright 2014 by Freakin' Sweet Apps, LLC ([email protected]) | |
// stl_merge *.stl | transform -s 10 > all_cubes_scaled.stl | ||
|
||
void print_usage() { | ||
fprintf(stderr, "stl_transform performs any number of transformations to an STL file.\n\n"); | ||
fprintf(stderr, "usage: stl_transform [[ <transformation> ] ...] <input file> <output file>\n"); | ||
fprintf(stderr, " Performs any number of the following transformations in\n"); | ||
fprintf(stderr, " the order they are listed on the command line:\n"); | ||
|