base_card Package¶
base_card Module¶

-
class
pyNastran.bdf.cards.base_card.BaseCard[source]¶ Bases:
objectDefines a series of base methods for every card class (e.g., GRID, CTRIA3) including:
- deepcopy()
- get_stats()
- validate()
- object_attributes(mode=’public’, keys_to_skip=None)
- object_methods(self, mode=’public’, keys_to_skip=None)
- comment
- update_field(self, n, value)
-
comment¶ accesses the comment
-
get_field(self, n)[source]¶ Gets a field based on it’s field number
Parameters: - n : int
the field number
Returns: - value : int/float/str/None
the value of the field
-
object_attributes(self, mode='public', keys_to_skip=None, filter_properties=False)[source]¶ See also
pyNastran.utils.object_attributes(…)
-
object_methods(self, mode='public', keys_to_skip=None)[source]¶ See also
pyNastran.utils.object_methods(…)
-
repr_fields(self)[source]¶ Gets the fields in their simplified form
Returns: - fields : List[varies]
the fields that define the card
-
update_field(self, n, value)[source]¶ Updates a field based on it’s field number.
Parameters: - n : int
the field number
- value : int/float/str/None
the value to update the field to
- .. note::
This is dynamic if the card length changes.
- update_field can be used as follows to change the z coordinate
- of a node::
>>> nid = 1 >>> node = model.nodes[nid] >>> node.update_field(3, 0.1)
-
class
pyNastran.bdf.cards.base_card.Element[source]¶ Bases:
pyNastran.bdf.cards.base_card.BaseCarddefines the Element class
dummy init
-
get_node_positions_no_xref(self, model, nodes=None)[source]¶ returns the positions of multiple node objects
-
pid= 0¶
-
-
class
pyNastran.bdf.cards.base_card.Material[source]¶ Bases:
pyNastran.bdf.cards.base_card.BaseCardBase Material Class
dummy init
-
TRef¶
-
-
class
pyNastran.bdf.cards.base_card.Property[source]¶ Bases:
pyNastran.bdf.cards.base_card.BaseCardBase Property Class
dummy init
-
pyNastran.bdf.cards.base_card.break_word_by_trailing_integer(pname_fid)[source]¶ Splits a word that has a value that is an integer
Parameters: - pname_fid : str
the DVPRELx term (e.g., A(11), NSM(5))
Returns: - word : str
the value not in parentheses
- value : int
the value in parentheses
Examples
>>> break_word_by_trailing_integer('T11') ('T', '11') >>> break_word_by_trailing_integer('THETA11') ('THETA', '11')
-
pyNastran.bdf.cards.base_card.break_word_by_trailing_parentheses_integer_ab(pname_fid)[source]¶ Splits a word that has a value that can be A/B as well as an integer
Parameters: - pname_fid : str
the DVPRELx term; A(11), NSM(5), NSM(B)
Returns: - word : str
the value not in parentheses
- value : int/str
the value in parenthese
Examples
>>> break_word_by_trailing_parentheses_integer('A(11)') ('A', '11') >>> break_word_by_trailing_parentheses_integer('NSM(11)') ('NSM', '11') >>> break_word_by_trailing_parentheses_integer('NSM(B)') ('NSM', 'B')