v1.5.0-alpha
Changes from v1.4
- replace
--m1
and--m2
with only-m
option. The pore size evaluation now only uses the slicing contour technique (-m
).
New features in v1.5
- introduce the third arguments (PARAMETERS) to shorten the common options into one.
$ Scaffolder cube20mm.stl out.ply -c 3.14159 -g 100 -n tubulat_g_ab
// new in v1.5
$ Scaffolder cube20mm.stl tubulat_g_ab,3.14159,0,100
// or without generating output file
$ Scaffolder cube20mm.stl --params tubulat_g_ab,3.14159,0,100
- introduce
--format
to change the stdout styles (default, csv).
// change stdout format to CSV
$ Scaffolder cube20mm.stl --params bcc,3.14159,0,100 --format csv
// When use with quiet option (-q), the stdout will show only progress bar
// and log file will be created
$ Scaffolder cube20mm.stl --params bcc,3.14159,0,100 --format csv -q
- introduce LUA file to custom the implicit function
-- suppose that this is the content of my.lua
function surface (x, y, z)
return sin(w*x) * cos(w*y) + sin(w*y) * cos(w*z) + sin(w*z) * cos(w*x) - t
end
Then you can fill the surface option with lua script (my.lua)
$ Scaffolder input.stl output.stl ./my.lua,3.14159,0,100 --format csv -q
Program options
Scaffolder - generate 3D scaffold from STL file
Usage:
Scaffolder [OPTION...] INPUT OUTPUT PARAMETERS
-h, --help Print help
-i, --input INPUT Input file (STL)
-o, --output OUTPUT Output filename with extension
stl,ply,obj,off [default: out]
--params PARAMETERS Combined parameters list:
surface[,coff,isolevel,grid_size,k_slice,k_polygon]
-q, --quiet Disable verbose output [default: false]
-c, --coff DOUBLE Angular frequency (pore size adjustment)
default:PI
-t, --isolevel DOUBLE isolevel (porosity adjustment) [default: 0]
-n, --surface NAME implicit surface: rectlinear, schwarzp,
schwarzd, gyroid, double-p, double-d,
double-gyroiod, lidinoid, schoen_iwp, neovius, bcc,
tubular_g_ab, tubular_g_c [default: schwarzp]
-g, --grid_size INT (0..60000)
Grid size [default: 100]
-s, --shell INT (0..60000) Outer thickness (layers) [default:0]
--grid_offset INT (0..60000)
[default:3]
-m, --microstructure Analysis microstructure with Slice contour
technique ( [default: false]
--export_microstructure Analysis microstructure and export the 2D
contours (for debugging) [default: false]
--k_slice INT (0..60000) K_slice: the number of slicing layers in each
direction (used in microstructure analysis)
[default: 100]
--k_polygon INT (>0) K_polygon: the number of closest outer
contour (used in microstructure analysis) [default: 4]
-z, --size_optimize DOUBLE (0..1)
Experimental Quadric simplification [default: 0]
--smooth_step INT (0..60000)
Smooth with laplacian (default: 5)
--dirty Disable autoclean [default false]
--minimum_diameter DOUBLE (0..1)
used for removing small orphaned (between 0-1) [default: 0.25]
--format FORMAT (default, csv)
Format of logging output [default: default]
--output_inverse additional output inverse scaffold [default: false]
--fix_self_intersect Experimental fix self-intersect faces
[default: false]
Example:
Scaffolder input.stl output.stl bcc,3.14159,0,100
Generated BCC scaffold with w=3.14159 (PI), t=0, and grid size=100
Scaffolder input.stl output.stl custom.lua,3.14159,0,100,100,4 -m
Generated and evaluated scaffold with custom.lua, w=3.14159 (PI), t=0,
grid size=100, k_slice=100, k_polygon=4
Scaffolder input.stl output.stl bcc,3.14159,0 -m -q --format csv
Generated and evaluated BCC scaffold (w=3.14159, t=0) and reported in CSV
Lua file:
Define the "surface" function that return the implicit function
-----------------------------------------------------------------
function surface (x, y, z)
return sin(x) * cos(y) + sin(y) * cos(z) + sin(z) * cos(x) - t
end
-----------------------------------------------------------------
Special symbols can be used in lua file:
w: value from -c, or --coff
t: value from -t, or --thickness
winding(x,y,z): function returning the winding number of position x,y,z
signed_distance(x,y,z): function returning signed distance of position x,y,z
and all functions from math module
Tips
Coefficient usage
coff = PI/target_pore_size
Please remind that use the same dimension with the input mesh
Example:
$ ./Scaffolder cube20mm.stl out.ply -c 3.14159 -g 100 -n tubulat_g_ab
Program will generate the scaffold from cube20mm.stl
with theoretical pore size 1mm of tubular_g_ab