free_faces Module

defines:
  • get_element_faces(model, element_ids=None)
  • get_solid_skin_faces(model)
  • write_skin_solid_faces(model, skin_filename,
    write_solids=False, write_shells=True, size=8, is_double=False, encoding=None)
pyNastran.bdf.mesh_utils.free_faces._write_shells(bdf_file, model, eid_set, face_map, eid_shell, pid_shell, mid_shell, mids_to_write)[source]

helper method for _write_skin_solid_faces

pyNastran.bdf.mesh_utils.free_faces._write_skin_solid_faces(model, skin_filename, face_map, nids_to_write, eids_to_write, mids_to_write, eid_set, eid_shell, pid_shell, mid_shell, write_solids=False, write_shells=True, size=8, is_double=False, encoding=None)[source]

helper method for write_skin_solid_faces

Parameters:
model : BDF()

the BDF object

skin_filename : str

the file to write

face_map : dict[sorted_face]

sorted_face : List[int, int, int] / List[int, int, int, int] face : List[int, int, int] / List[int, int, int, int]

nids_to_write : List[int, int, …]

list of node ids to write

eids_to_write : List[int, int, …]

list of element ids to write

mids_to_write : List[int, int, …]

list of material ids to write

eid_set : Set[int]

is the type right???

eid_shell : int

the next id to use for the shell id

pid_shell : int

the next id to use for the shell property

mid_shell : int

the next id to use for the shell material

write_solids : bool; default=False

write solid elements that have skinned faces

write_shells : bool; default=True

write shell elements

size : int; default=/8

the field width

is_double : bool; default=False

double precision flag

encoding : str; default=None -> system default

the string encoding

pyNastran.bdf.mesh_utils.free_faces.get_element_faces(model, element_ids=None)[source]

Gets the elements and faces that are skinned from solid elements. This includes internal faces.

Parameters:
model : BDF()

the BDF object

element_ids : List[int] / None

skin a subset of element faces default=None -> all elements

Returns:
eid_faces : (int, List[(int, int, …)])

value1 : element id value2 : face

pyNastran.bdf.mesh_utils.free_faces.get_solid_skin_faces(model)[source]

Gets the elements and faces that are skinned from solid elements This doesn’t include internal faces.

Parameters:
model : BDF()

the BDF object

Returns:
eid_set : Dict[tuple(int, int, …)] = List[int]

key : sorted face value : list of element ids with that face

face_map : Dict[tuple(int, int, …)] = List[int]

key : sorted face value : unsorted face

pyNastran.bdf.mesh_utils.free_faces.main()[source]

docopt interface

pyNastran.bdf.mesh_utils.free_faces.write_skin_solid_faces(model, skin_filename, write_solids=False, write_shells=True, size=8, is_double=False, encoding=None, punch=False, log=None)[source]

Writes the skinned elements

Parameters:
model : BDF() or str

BDF : the BDF object str : bdf_filename and the read_bdf method is called

skin_filename : str

the file to write

write_solids : bool; default=False

write solid elements that have skinned faces

write_shells : bool; default=False

write shell elements

size : int; default=8

the field width

is_double : bool; default=False

double precision flag

encoding : str; default=None -> system default

the string encoding

log : logger; default=None

a python logging object

punch : bool; default=False

is this a punch file; should be used by the read_bdf if model is a string unused