mirror_mesh Module
- This file defines:
model, nid_offset, eid_offset = bdf_mirror(bdf_filename, plane=’xz’)
- model, nid_offset, eid_offset = write_bdf_symmetric(
bdf_filename, out_filename=None, encoding=None, size=8, is_double=False, enddata=None, close=True, plane=’xz’)
- pyNastran.bdf.mesh_utils.mirror_mesh.bdf_mirror(bdf_filename: PathLike | BDF, plane: str = 'xz', log: SimpleLogger | None = None, debug: bool = True) tuple[BDF, int, int][source]
Mirrors the model about the symmetry plane
- Parameters:
- bdf_filenamestr / BDF()
str : the bdf filename BDF : the BDF model object
- logSimpleLogger | None
the logger
- debug: bool | str; default=True
debug flag (True=debug, False=warning, info, error)
- planestr; {‘xy’, ‘yz’, ‘xz’}; default=’xz’
the plane to mirror about xz : +y/-y yz : +x/-x xy : +z/-z
- Returns:
- modelBDF()
BDF : the BDF model object
- nid_offsetint
the offset node id
- eid_offsetint
the offset element id
- pyNastran.bdf.mesh_utils.mirror_mesh.bdf_mirror_plane(bdf_filename: PathLike | BDF, plane: NDArray33float, mirror_model=None, log=None, debug: bool = True, use_nid_offset: bool = True)[source]
mirrors a model about an arbitrary plane
- pyNastran.bdf.mesh_utils.mirror_mesh.write_bdf_symmetric(bdf_filename: PathLike | BDF, out_filename=None, encoding=None, size: int = 8, is_double: bool = False, enddata: bool | None = None, close: bool = True, plane: str = 'xz', log=None)[source]
Mirrors the model about the symmetry plane
- Parameters:
- bdf_filenamestr / BDF()
str : the bdf filename BDF : the BDF model object
- out_filenamevaries; default=None
str - the name to call the output bdf file - a file object StringIO() - a StringIO object None - pops a dialog
- encodingstr; default=None -> system specified encoding
the unicode encoding latin1, and utf8 are generally good options
- sizeint; {8, 16}
the field size
- is_doublebool; default=False
False : small field True : large field
- enddatabool; default=None
bool - enable/disable writing ENDDATA None - depends on input BDF
- closebool; default=True
should the output file be closed
- planestr; {‘xy’, ‘yz’, ‘xz’}; default=’xz’
the plane to mirror about xz : +y/-y yz : +x/-x xy : +z/-z
- Returns:
- modelBDF()
BDF : the BDF model object
- nid_offsetint
the offset node id
- eid_offsetint
the offset element id
Notes
- Updates the BDF object to be symmetric
see bdf_mirror if you don’t want to write the model
Doesn’t equivalence nodes on the centerline.
- Considers
nodes : GRID
elements, rigid_elements, mass_elements : see
_mirror_elementsloads : see
_mirror_loadsaero cards : see
_mirror_aero