Compilers — inkjet#
-
class GCVFExporter#
- #include <gcvf_exporter.h>
Public Types
Public Functions
-
void compile()#
-
void setProgressCallback(const std::function<void(ProgressPhase, double)> &progress_callback)#
Private Functions
-
void cleanup()#
-
void generate_bbox_file()#
-
void generate_png_stack()#
-
void generate_stl()#
-
void generate_xml_config()#
-
void generate_zbuffer_image()#
-
void prepare_temp_dir()#
-
void zip_files()#
Private Members
-
std::string m_filename#
-
bool m_liquid_keep_out = false#
-
double m_liquid_keep_out_distance = 0.0#
-
std::shared_ptr<MaterialDefs> m_material_defs#
-
std::unordered_map<uint8_t, size_t> m_material_voxel_counts#
-
std::function<void(ProgressPhase, double)> m_progress_callback#
-
size_t m_slice_thickness_nm = 27000#
-
std::string m_temp_path = "temp_gcvf_export"#
-
size_t m_x_dpi = 600#
-
size_t m_x_resolution#
-
size_t m_y_dpi = 300#
-
size_t m_y_resolution#
-
size_t m_z_resolution#
-
void compile()#
-
class DirectMaterialCompiler#
- #include <direct_material_compiler.h>
This class samples an OpenVCAD tree into a stack of images. This makes the assumption that the user is directly expressing the materials in the tree.
Public Functions
-
void compile()#
-
inline std::unordered_map<uint8_t, size_t> material_voxel_counts() const#
-
inline std::tuple<size_t, size_t, size_t> resolution() const#
-
void setProgressCallback(const std::function<void(double)> &progress_callback)#
Private Functions
-
void remove_empty_images_from_beginning(std::vector<size_t> active_voxel_counts, const std::string &filename_root)#
-
void remove_empty_images_from_end(std::vector<size_t> active_voxel_counts, const std::string &filename_root)#
Private Members
-
const std::string m_file_prefix#
-
bool m_liquid_keep_out = false#
-
double m_liquid_keep_out_distance = 0.0#
-
std::shared_ptr<MaterialDefs> m_material_defs#
-
std::unordered_map<uint8_t, size_t> m_material_voxel_counts#
-
const std::string m_output_directory#
-
std::function<void(double)> m_progress_callback = nullptr#
-
size_t m_x_resolution#
-
size_t m_y_resolution#
-
size_t m_z_resolution#
-
void compile()#
Variables
-
int MAX_IMAGE_WIDTH = 880#
-
class MyersonCompiler#
- #include <myerson_compiler.h>
Public Functions
-
void compile()#
Constructor.
- Parameters:
layer_height – Layer height in mm
x_dpi – X resolution in dots per inch
y_dpi – Y resolution in dots per inch
root – Root node of the OpenVCAD tree
material_defs – Material definitions
-
void setProgressCallback(const std::function<void(double)> &progress_callback)#
-
void compile()#
-
class FullColorCompiler#
- #include <full_color_compiler.h>
Public Functions
-
void compile()#
-
void setProgressCallback(std::function<void(double)> &progress_callback)#
Public Static Functions
-
static void ApplyCMYK(std::vector<std::vector<vec3>> &image, const std::vector<vec4> &palette_rgba)#
Private Members
-
const std::string m_attribute_def_file_path#
-
const std::string m_file_prefix#
-
vec3 m_max#
-
vec3 m_min#
-
const std::string m_output_directory#
-
std::function<void(double)> m_progress_callback = nullptr#
-
bool m_use_transparency#
-
vec3 m_voxel_size#
Private Static Functions
-
static void ApplyTransparency(Node::ColorGridType::Ptr color_grid, Node::GridType::Ptr alpha_grid, glm::vec3 clear_color, glm::vec3 dims)#
Given a color grid and alpha grid, apply transparency by mixing in a clear material.
- Parameters:
color_grid – The color grid to apply transparency to
alpha_grid – The alpha grid to apply transparency to
palette – The color palette to apply transparency to
palette_alpha – The alpha values of the color palette
clear_color – The clear color to mix in
dims – The dimensions of the grid
-
static void SaveImage(const std::vector<unsigned char> &image, size_t height, size_t width, const std::string &filename)#
-
static void SliceGridIntoPNGStack(Node::ColorGridType::Ptr color_grid, Node::GridType::Ptr alpha_grid, glm::vec3 dims, const std::string &filename_root)#
Given a color and alpha grid, slice the grids into a stack of PNG images.
- Parameters:
color_grid – The color grid to slice
alpha_grid – The alpha grid to slice
dims – The dimensions of the grid
filename_root – The filename template of the PNG stack
-
void compile()#