bluemira.codes.python_occ.imprint_solids ======================================== .. py:module:: bluemira.codes.python_occ.imprint_solids .. autoapi-nested-parse:: Imprinting solids together. Classes ------- .. autoapisummary:: bluemira.codes.python_occ.imprint_solids._Imprinter bluemira.codes.python_occ.imprint_solids.ImprintResult Functions --------- .. autoapisummary:: bluemira.codes.python_occ.imprint_solids.imprint_solids Module Contents --------------- .. py:class:: _Imprinter(*, run_parallel=False, parallel_mode=False, use_obb=False) Imprints solids together using the BOPAlgo_MakeConnected algorithm. .. py:attribute:: _imprint_builder .. py:method:: __call__(imprintables: list[bluemira.codes.python_occ.imprintable_solid.ImprintableSolid]) -> int Imprints the solids together, internally mutating the ImprintableSolid. :param imprintables: The imprintables to imprint together. :type imprintables: list[ImprintableSolid] :returns: The number of imprints performed. :rtype: int :raises ValueError: If the imprintables are not valid. .. py:class:: ImprintResult(imprintables: list[bluemira.codes.python_occ.imprintable_solid.ImprintableSolid], total_imprints: int) Result of imprinting solids together. .. py:attribute:: _imprintables .. py:attribute:: total_imprints .. py:property:: imprintables :type: list[bluemira.codes.python_occ.imprintable_solid.ImprintableSolid] Returns the imprintables. .. py:property:: labels :type: list[str] Returns the labels of the imprintables. .. py:property:: solids :type: list[bluemira.geometry.solid.BluemiraSolid] Returns the imprinted BluemiraSolids. .. py:property:: as_compound :type: bluemira.geometry.compound.BluemiraCompound Returns the imprinted BluemiraCompound. .. py:property:: occ_solids :type: list[OCC.Core.TopoDS.TopoDS_Solid] Returns the imprinted TopoDS_Solids. .. py:property:: occ_faces :type: list[OCC.Core.TopoDS.TopoDS_Face] Returns the imprinted TopoDS_Face. .. py:function:: imprint_solids(solids: collections.abc.Collection[bluemira.geometry.solid.BluemiraSolid], labels: collections.abc.Collection[str] | str, *, use_cgal=True) -> ImprintResult Imprints solids together. :param solids: The solids to imprint together. :param labels: The labels to use for the solids. If None, the labels will be taken from the solids. Must be the same length as solids. :param use_cgal: Whether to use CGAL for improved overlap checking speed and precision. If True and CGAL is not available, a numpy based approach will be used as a fallback. If False, the numpy based approach will be used regardless of CGAL availability. :rtype: The imprintable solids. :raises ValueError: If the labels are not the same length as the solids. :raises TypeError: If the solids are not of type BluemiraSolid.