Changes in v1.5.2
- add a new
--no_intersect
to use only the boundary box of input mesh to generate 3d mesh - DualMC now supports parallel process with TBB (OneAPI)
- add a new
marching_cubes
in python API for generating a 3D mesh with an array implicit iso-value.
This function will work well as the alternative marching cubes for SDF.
For anyone interested in Constructive Solid Geometry, SDF is a pure python library same as PyScaffolder. It has a rich of 2D/3D topology, but the marching_cubes from skimage resulted in a bad 3D mesh sometimes and that why a new marching_cubes
used in Scaffolder
is exposed to Python API as an alternative method.
Program options
Scaffolder - generate 3D scaffold from STL file based on implicit surface
Usage:
Scaffolder [OPTION...] INPUT OUTPUT PARAMETERS
-h, --help Print help
-i, --input INPUT Input file (STL/PLY/OFF/OBJ/VMI)
-o, --output OUTPUT Output filename with extension
stl,ply,obj,off,ctm
--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: bcc)
-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]
--export_jpeg [X|Y|Z],INT
Export 2D JPEG (Default: Z,100)
--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: 0)
--dirty Disable autoclean
--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
--fix_self_intersect INT Experimental fix self-intersect faces
(default: 0)
--mean_curvature INT Size of mean curvature histogram (default: 0)
--no_intersect Generate 3D mesh without intersect with
original mesh (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) - params.isolevel
end
-----------------------------------------------------------------
Special symbols can be used in lua file:
params = { coff, isolevel, k_splice, k_polygon }
bbox = { min, max, length, grid_density }
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
See documentation