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
modelBDF()

the BDF object

skin_filenamestr

the file to write

face_mapdict[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_writeList[int, int, …]

list of node ids to write

eids_to_writeList[int, int, …]

list of element ids to write

mids_to_writeList[int, int, …]

list of material ids to write

eid_setSet[int]

is the type right???

eid_shellint

the next id to use for the shell id

pid_shellint

the next id to use for the shell property

mid_shellint

the next id to use for the shell material

write_solidsbool; default=False

write solid elements that have skinned faces

write_shellsbool; default=True

write shell elements

sizeint; default=/8

the field width

is_doublebool; default=False

double precision flag

encodingstr; default=None -> system default

the string encoding

pyNastran.bdf.mesh_utils.free_faces.get_element_faces(model: pyNastran.bdf.bdf.BDF, element_ids: Optional[List[int]] = None) → Any[source]

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

Parameters
modelBDF()

the BDF object

element_idsList[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: pyNastran.bdf.bdf.BDF) → Any[source]

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

Parameters
modelBDF()

the BDF object

Returns
eid_setDict[tuple(int, int, …)] = List[int]

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

face_mapDict[tuple(int, int, …)] = List[int]

key : sorted face value : unsorted face

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
modelBDF() or str

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

skin_filenamestr

the file to write

write_solidsbool; default=False

write solid elements that have skinned faces

write_shellsbool; default=False

write shell elements

sizeint; default=8

the field width

is_doublebool; default=False

double precision flag

encodingstr; default=None -> system default

the string encoding

loglogger; default=None

a python logging object

punchbool; default=False

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