Writers and slicers
- class pyvcad_compilers.InpWriter
- __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.CrossSectionSlicer
- __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: SupportsFloat, stitching_tolerance: SupportsFloat = 1e-12, colinear_tolerance: SupportsFloat = 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: SupportsFloat, material_chan: SupportsInt, ranges: collections.abc.Sequence[tuple[SupportsFloat, SupportsFloat]], stitching_tolerance: SupportsFloat = 1e-12, colinear_tolerance: SupportsFloat = 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.