bluemira.codes.python_occ.imprintable_solid
Working class for imprinting solids.
Classes
Represents a solid that can be imprinted. |
Module Contents
- class bluemira.codes.python_occ.imprintable_solid.ImprintableSolid(label: str, bm_solid: bluemira.geometry.solid.BluemiraSolid, occ_solid: OCC.Core.TopoDS.TopoDS_Solid)
Represents a solid that can be imprinted.
- Parameters:
label (str)
bm_solid (bluemira.geometry.solid.BluemiraSolid)
occ_solid (OCC.Core.TopoDS.TopoDS_Solid)
- _label
- _bm_solid
- _imprinted_occ_solid
- _has_imprinted = False
- _imprinted_faces: set[OCC.Core.TopoDS.TopoDS_Face]
- _shadow_imprinted_faces: set[OCC.Core.TopoDS.TopoDS_Face]
- classmethod from_bluemira_solid(label: str, bm_solid: bluemira.geometry.solid.BluemiraSolid)
Creates an ImprintableSolid from a BluemiraSolid.
- Parameters:
label (str) – The label of the solid.
bm_solid (BluemiraSolid) – The BluemiraSolid to imprint.
- Returns:
The ImprintableSolid.
- Return type:
- Raises:
TypeError – If bm_solid is not a BluemiraSolid.
- property label: str
Returns the label of the solid.
- Return type:
str
- property occ_solid: OCC.Core.TopoDS.TopoDS_Solid
Returns the TopoDS_Solid of the solid.
- Return type:
OCC.Core.TopoDS.TopoDS_Solid
- property imprinted_faces: set[OCC.Core.TopoDS.TopoDS_Face]
Returns the imprinted faces of the solid.
- Return type:
set[OCC.Core.TopoDS.TopoDS_Face]
- bind_imprinted_face(face: OCC.Core.TopoDS.TopoDS_Face)
Binds a face to the imprintable solid, adding it to the shadow set. The finalise_binding method must be called after binding all faces.
- Parameters:
face (OCC.Core.TopoDS.TopoDS_Face)
- finalise_binding()
Finalises the binding of the imprinted faces, moving them from the shadow set to the imprinted set.
- set_imprinted_solid(imprinted_occ_solid)
Sets the imprinted solid of the imprintable solid. This is used to set the solid after imprinting.
- to_bluemira_solid() bluemira.geometry.solid.BluemiraSolid
Returns the imprinted BluemiraSolid. If the solid has not been imprinted, it returns the original solid.
- Returns:
The imprinted BluemiraSolid.
- Return type: