MirrorManager#
- class MirrorManager[source]#
Bases:
objectManage mirror planes and mirrored draft entities inside a DraftContext.
This manager provides:
Storage/registration of MirrorPlane entities.
Creation/removal of mirror actions for GeometryBodyGroup entities.
Derivation and registration of draft-only entities: MirroredGeometryBodyGroup and (when possible) MirroredSurface.
Notes
Surface mirroring requires a surface-to-body-group mapping derived from GeometryEntityInfo. If that mapping cannot be derived (e.g. face grouping spans multiple body groups), mirroring is disabled and mirror operations will raise.
Properties
- mirror_planes: EntityRegistryView#
Return all the available mirror planes.
- Returns:
A registry view of MirrorPlane entities available in this draft.
- Return type:
EntityRegistryView
Methods
- create_mirror_of(*, entities, mirror_plane)[source]#
Create mirrored entities for one or more geometry body groups.
This registers mirror actions for the requested body groups and then derives/creates draft-only entities:
MirroredGeometryBodyGroup for each body group
MirroredSurface for each surface belonging to those body groups (when surface ownership mapping is available)
Newly created mirrored entities use MIRROR_SUFFIX (
"_<mirror>") as a name suffix.- Parameters:
entities (list[GeometryBodyGroup] | GeometryBodyGroup) – One or more geometry body groups to mirror.
mirror_plane (MirrorPlane) – The mirror plane to use for mirroring.
- Returns:
Mirrored geometry body groups and surfaces.
- Return type:
tuple[list[MirroredGeometryBodyGroup], list[MirroredSurface]]