pyvcad_compilers Module
- class pyvcad_compilers.CrossSectionSlicer
Bases:
pybind11_object
- __init__(self: pyvcad_compilers.pyvcad_compilers.CrossSectionSlicer, root: pyvcad.pyvcad.Node, min: pyvcad.pyvcad.Vec3, max: pyvcad.pyvcad.Vec3, voxel_size: pyvcad.pyvcad.Vec3) None
Constructor. Creates a CrossSectionSlicer object.
- Parameters:
root (Node) – The root node of the tree.
min (glm::vec3) – The minimum point of the bounding box.
max (glm::vec3) – The maximum point of the bounding box.
voxel_size (glm::vec3) – The size of the voxel.
- slice_geometry(self: pyvcad_compilers.pyvcad_compilers.CrossSectionSlicer, z_height: float, stitching_tolerance: float = 1e-12, colinear_tolerance: float = 1e-12) list[pyvcad.pyvcad.Polygon2]
Slices the geometry at a given z-height and iso value.
- Parameters:
z_height (double) – The z-height at which to slice.
stitching_tolerance (double) – (Optional) The tolerance for stitching. Defaults to 1e-12.
colinear_tolerance (double) – (Optional) The tolerance for colinear points. Defaults to 1e-12.
- slice_material(self: pyvcad_compilers.pyvcad_compilers.CrossSectionSlicer, z_height: float, material_chan: int, ranges: list[tuple[float, float]], stitching_tolerance: float = 1e-12, colinear_tolerance: float = 1e-12) list[tuple[float, float, list[pyvcad.pyvcad.Polygon2]]]
ranges (List[Tuple[float, float]]): A list of tuples containing the lower and upper bounds of the material concentration to slice for. i.e. the ranges [0 to 0.5] and [0.5 to 1.0]. stitching_tolerance (double): (Optional) The tolerance for stitching. Defaults to 1e-12. colinear_tolerance (double): (Optional) The tolerance for colinear points. Defaults to 1e-12.Returns: List[Tuple[float, float, List[Polygon2]]]: A list of tuples containing the lower and upper bounds of the material concentration and a list of polygons that represent the cross section for the range.
- class pyvcad_compilers.DirectMaterialCompiler
Bases:
pybind11_object
- __init__(self: pyvcad_compilers.pyvcad_compilers.DirectMaterialCompiler, root: pyvcad.pyvcad.Node, voxel_size: pyvcad.pyvcad.Vec3, material_defs: pyvcad.pyvcad.MaterialDefs, output_directory: str, file_prefix: str, liquid_keep_out: bool, liquid_keep_out_distance: float) None
liquid_keep_out (bool): If true, the liquid keep out region will be used. Defaults to false. liquid_keep_out_distance (double): The distance of the liquid keep out region.
- compile(self: pyvcad_compilers.pyvcad_compilers.DirectMaterialCompiler) None
Compiles the material.
- setProgressCallback(self: pyvcad_compilers.pyvcad_compilers.DirectMaterialCompiler, arg0: Callable[[float], None]) None
Sets the progress callback function.
- Parameters:
progress_callback (function) – The progress callback function.
- class pyvcad_compilers.InpWriter
Bases:
pybind11_object
- __init__(self: pyvcad_compilers.pyvcad_compilers.InpWriter) None
- write(self: pyvcad_compilers.pyvcad_compilers.InpWriter, path: str, root: pyvcad.pyvcad.Node, meta: pyvcad.pyvcad.Vec3, config_path: str, use_volumetric_dither: bool) None
Writes the INP (ABAQUS Input) file to the specified path using linear brick elements.
- class pyvcad_compilers.MeshCompiler
Bases:
pybind11_object
- __init__(self: pyvcad_compilers.pyvcad_compilers.MeshCompiler, root: pyvcad.pyvcad.Node, voxel_size: pyvcad.pyvcad.Vec3, output_directory: str, file_prefix: str, num_iso_slices: int) None
Constructor. Creates a MeshCompiler object.
- Parameters:
root (Node) – The root node of the tree.
voxel_size (vec3) – The size of the voxel.
output_directory (str) – The output directory.
file_prefix (str) – The file prefix.
num_iso_slices (size_t) – The number of iso slices.
- compile(self: pyvcad_compilers.pyvcad_compilers.MeshCompiler) None
Compiles the mesh.
- setProgressCallback(self: pyvcad_compilers.pyvcad_compilers.MeshCompiler, arg0: Callable[[float], None]) None
Sets the progress callback function.
- Parameters:
progress_callback (function) – The progress callback function.
- pyvcad_compilers.version() str
Get the version of OpenVCAD