N2PCard#
- class NaxToPy.Core.Classes.N2PNastranInputData.N2PCard(card)[source]#
Bases:
N2PInputDataNasClass with the information of a bulk data card of an input file of Nastran.
- delete_card() None[source]#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object[source]#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int[source]#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None[source]#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None[source]#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str[source]#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str[source]#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool[source]#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- set_field_value_by_position(row: int, column: int, new_value: object) None[source]#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool[source]#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SectionInfo: object#
CBAR#
- class NaxToPy.Core.Classes.N2PNastranInputData.CBAR(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Unique element identification number. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property G0: int#
Alternate method to supply the orientation vector v using grid point G0.The direction of v is from GA to G0.v is then translated to End A. (Integer > 0; G0 ≠ GA or GB)
- property GA: int#
CardGrid point identification numbers of connection points. (Integer > 0; GA ≠ GB)
- property GB: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property OFFT: str#
Offset vector interpretation flag. (character or blank) See Remark 8. * Remark 8: OFFT is a character string code that describes how the offset and orientation vector components are to be interpreted. By default, (string input is GGG or blank), the offset vectors are measured in the displacement coordinate systems at grid points A and B and the orientation vector is measured in the displacement coordinate system of grid point A.At user option, the offset vectors can be measured in an offset coordinate system relative to grid points A and B, and the orientation vector can be measured in the basic system as indicated in the following table: String Orientation Vector End A Offset End B Offset GGG Global Global Global BGG Basic Global Global GGO Global Global Basic BGO Basic Global Basic GOG Global Offset Global BOG Basic Offset Global GOO Global Offset Basic BOO Basic Offset Basic
- property PA: int#
Pin flags for bar ends A and B, respectively. Used to remove connections between the grid point and selected degrees-offreedom of the bar.The degrees-of-freedom are defined in the element’s coordinate system (see Figure 8-8). The bar must have stiffness associated with the PA and PB degrees-of-freedom to be released by the pin flags. For example, if PA = 4 is specified, the PBAR entry must have a value for J, the torsional stiffness. (Up to 5 of the unique Integers 1 through 6 anywhere in the field with no embedded blanks; Integer > 0.) Pin flags combined with offsets are not allowed for SOL 600.
- property PB: int#
- property PID: int#
Property identification number of a PBAR or PBARL entry. (Integer > 0 or blank*; Default = EID unless BAROR entry has nonzero entry in field 3.)
- property RawContent: str#
- property SectionInfo: object#
- property W1A: float#
Components of offset vectors and, respectively (see Figure 8-8) in displacement coordinate systems(or in element system depending upon the content of the OFFT field), at points GA and GB, respectively. See Remark 7. and 8. (Real; Default = 0.0) * Remark 7: Offset vectors are treated like rigid elements and are therefore subject to the same limitations. • Offset vectors are not affected by thermal loads. • The specification of offset vectors is not recommended in solution sequences that compute differential stiffness because the offset vector remains parallel to its original orientation. (Differential stiffness is computed in buckling analysis provided in SOLs 103 and 107 through 112 with the STATSUB command; and also in nonlinear analysis provided in SOLs 106, 129, 153, and 159 with PARAM, LGDISP,1.) • BAR elements with offsets will give wrong buckling results. • Masses are not offset for shells. • The nonlinear solution in SOL 106 uses differential stiffness due for the iterations to reduce equilibrium errors.An error in the differential stiffness due to offsets may cause the iterations to converge slowly or to diverge. If the solution converges the answer is correct, even though there may be an error in the differential stiffness.However, the special capabilities in SOL 106 to get vibration and buckling modes will produce wrong answers if the differential stiffness is bad. • The internal “rigid elements” for offset BAR/BEAM elements are rotated in the nonlinear force calculations. Thus, if convergence is achieved, BAR/BEAM elements may be used in SOL 106 with LGDISP,1. * Remark 8: OFFT is a character string code that describes how the offset and orientation vector components are to be interpreted.By default (string input is GGG or blank), the offset vectors are measured in the displacement coordinate systems at grid points A and B and the orientation vector is measured in the displacement coordinate system of grid point A. At user option, the offset vectors can be measured in an offset coordinate system relative to grid points A and B, and the orientation vector can be measured in the basic system as indicated in the following table: String Orientation Vector End A Offset End B Offset GGG Global Global Global BGG Basic Global Global GGO Global Global Basic BGO Basic Global Basic GOG Global Offset Global BOG Basic Offset Global GOO Global Offset Basic BOO Basic Offset Basic
- property W1B: float#
- property W2A: float#
- property W2B: float#
- property W3A: float#
- property W3B: float#
- property X1: float#
Components of orientation vector v, from GA, in the displacement coordinate system at GA(default), or in the basic coordinate system.See Remark 8. (Real) * Remark 8: OFFT is a character string code that describes how the offset and orientation vector components are to be interpreted.By default (string input is GGG or blank), the offset vectors are measured in the displacement coordinate systems at grid points A and B and the orientation vector is measured in the displacement coordinate system of grid point A.At user option, the offset vectors can be measured in an offset coordinate system relative to grid points A and B, and the orientation vector can be measured in the basic system as indicated in the following table: String Orientation Vector End A Offset End B Offset GGG Global Global Global BGG Basic Global Global GGO Global Global Basic BGO Basic Global Basic GOG Global Offset Global BOG Basic Offset Global GOO Global Offset Basic BOO Basic Offset Basic
- property X2: float#
- property X3: float#
CBEAM#
- class NaxToPy.Core.Classes.N2PNastranInputData.CBEAM(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Unique element identification number. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property G0: int#
Alternate method to supply the orientation vector v using grid point G0.The direction of v is from GA to G0.v is then transferred to End A. (Integer > 0; G0 ≠ GA or GB)
- property GA: int#
CardGrid point identification numbers of connection points. (Integer > 0; GA ≠ GB)
- property GB: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property OFFT: str#
Offset vector interpretation flag. (character or blank) See Remark 9. * Remark 9: If the element is a p-version element, BIT in field 9 contains the value of the built-in-twist measured in radians.Otherwise, OFFT in field 9 is a character string code that describes how the offset and orientation vector components are to be interpreted.By default (string input is GGG or blank), the offset vectors are measured in the displacement coordinate systems at grid points A and B and the orientation vector is measured in the displacement coordinate system of grid point A.At user option, the offset vectors can be measured in an offset system relative to grid points A and B, and the orientation vector can be measured in the basic system as indicated in the following table: String Orientation Vector End A Offset End B Offset GGG Global Global Global BGG Basic Global Global GGO Global Global Offset BGO Basic Global Offset GOG Global Offset Global BOG Basic Offset Global GOO Global Offset Offset BOO Basic Offset Offset
- property PA: int#
Pin flags for beam ends A and B, respectively. Used to remove connections between the grid point and selected degrees-offreedom of the bar. The degrees-of-freedom are defined in the element’s coordinate system (see Figure 8-12). The beam must have stiffness associated with the PA and PB degrees-of-freedom to be released by the pin flags.For example, if PA = 4 is specified, the PBEAM entry must have a value for J, the torsional stiffness. (Up to 5 of the unique Integers 1 through 6 anywhere in the field with no embedded blanks; Integer > 0.) Pin flags combined with offsets are not allowed for SOL 600.
- property PB: int#
- property PID: int#
Property identification number of PBEAM, PBCOMP or PBEAML entry. (Integer > 0; Default = EID)
- property RawContent: str#
- property SA: int#
Scalar or grid point identification numbers for the ends A and B, respectively.The degrees-of-freedom at these points are the warping variables dθ ⁄ dx. SA and SB cannot be specified for beam p-elements. (Integers > 0 or blank)
- property SB: int#
- property SectionInfo: object#
- property W1A: float#
Components of offset vectors and , respectively (see Figure 8-8) in displacement coordinate systems(or in element system depending upon the content of the OFFT field), at points GA and GB, respectively. See Remark 7. and 8. (Real; Default = 0.0) * Remark 7: Offset vectors are treated like rigid elements and are therefore subject to the same limitations. • Offset vectors are not affected by thermal loads. • The specification of offset vectors is not recommended in solution sequences that compute differential stiffness because the offset vector remains parallel to its original orientation. (Differential stiffness is computed in buckling analysis provided in SOLs 103 and 107 through 112 with the STATSUB command; and also in nonlinear analysis provided in SOLs 106, 129, 153, and 159 with PARAM, LGDISP,1.) • BAR elements with offsets will give wrong buckling results. • Masses are not offset for shells. • The nonlinear solution in SOL 106 uses differential stiffness due for the iterations to reduce equilibrium errors.An error in the differential stiffness due to offsets may cause the iterations to converge slowly or to diverge. If the solution converges the answer is correct, even though there may be an error in the differential stiffness.However, the special capabilities in SOL 106 to get vibration and buckling modes will produce wrong answers if the differential stiffness is bad. • The internal “rigid elements” for offset BAR/BEAM elements are rotated in the nonlinear force calculations.Thus, if convergence is achieved, BAR/BEAM elements may be used in SOL 106 with LGDISP,1. * Remark 8: OFFT is a character string code that describes how the offset and orientation vector components are to be interpreted.By default (string input is GGG or blank), the offset vectors are measured in the displacement coordinate systems at grid points A and B and the orientation vector is measured in the displacement coordinate system of grid point A.At user option, the offset vectors can be measured in an offset coordinate system relative to grid points A and B, and the orientation vector can be measured in the basic system as indicated in the following table: String Orientation Vector End A Offset End B Offset GGG Global Global Global BGG Basic Global Global GGO Global Global Basic BGO Basic Global Basic GOG Global Offset Global BOG Basic Offset Global GOO Global Offset Basic BOO Basic Offset Basic
- property W1B: float#
- property W2A: float#
- property W2B: float#
- property W3A: float#
- property W3B: float#
- property X1: float#
Components of orientation vector v, from GA, in the displacement coordinate system at GA(default), or in the basic coordinate system.See Remark 9. (Real) * Remark 9: If the element is a p-version element, BIT in field 9 contains the value of the built-in-twist measured in radians.Otherwise, OFFT in field 9 is a character string code that describes how the offset and orientation vector components are to be interpreted.By default (string input is GGG or blank), the offset vectors are measured in the displacement coordinate systems at grid points A and B and the orientation vector is measured in the displacement coordinate system of grid point A.At user option, the offset vectors can be measured in an offset system relative to grid points A and B, and the orientation vector can be measured in the basic system as indicated in the following table: String Orientation Vector End A Offset End B Offset GGG Global Global Global BGG Basic Global Global GGO Global Global Offset BGO Basic Global Offset GOG Global Offset Global BOG Basic Offset Global GOO Global Offset Offset BOO Basic Offset Offset
- property X2: float#
- property X3: float#
CBUSH#
- class NaxToPy.Core.Classes.N2PNastranInputData.CBUSH(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CID: int#
Element coordinate system identification. A 0 means the basic coordinate system.If CID is blank, then the element coordinate system is determined from GO or Xi.See Figure 8-19 and Remark 3. (Integer > 0 or blank) * Remark 3: CID > 0 overrides GO and Xi. Then the element x-axis is along T1, the element y-axis is along T2, and the element z-axis is along T3 of the CID coordinate system.If the CID refers to a cylindrical coordinate system or as pherical coordinate system, then grid GA is used to locate the system. If for cylindrical or spherical coordinate, GA falls on the z-axis used to define them, it is recommended that another CID be selectfced to define the element x-axis.
- property CardType: str#
- property EID: int#
Element identification number. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property G0: int#
Alternate method to supply vector v using grid point GO. Direction of v is from GA to GO. v is then transferred to End A.See Remark 3. (Integer > 0) * Remark 3: CID > 0 overrides GO and Xi. Then the element x-axis is along T1, the element y-axis is along T2, and the element z-axis is along T3 of the CID coordinate system.If the CID refers to a cylindrical coordinate system or as pherical coordinate system, then grid GA is used to locate the system. If for cylindrical or spherical coordinate, GA falls on the z-axis used to define them, it is recommended that another CID be selectfced to define the element x-axis.
- property GA: int#
CardGrid point identification number of connection points. See Remark 6. (Integer > 0) * Remark 6: If the distance between GA and GB is less than .0001, or if GB is blank, then CID must be specified.GB blank implies that B is grounded.
- property GB: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property OCID: int#
Coordinate system identification of spring-damper offset. See Remark 9. (Integer > -1; Default = -1, which means the offset point lies on the line between GA and GB according to Figure 8-19) * Remark 9: If OCID = -1 or blank (default) then S is used and S1, S2, S3 are ignored. If OCID > 0, then S is ignored and S1, S2, S3 are used.
- property PID: int#
Property identification number of a PBUSH entry. (Integer > 0; Default = EID)
- property RawContent: str#
- property S: float#
Location of spring damper. See Figure 8-19. (0.0 < Real < 1.0; Default = 0.5)
- property S1: float#
Components of spring-damper offset in the OCID coordinate system if OCID > 0. See Figure 8-20 and Remark 9. (Real) * Remark 9: If OCID = -1 or blank (default) then S is used and S1, S2, S3 are ignored. If OCID > 0, then S is ignored and S1, S2, S3 are used.
- property S2: float#
- property S3: float#
- property SectionInfo: object#
- property X1: float#
Components of orientation vector v, from GA, in the displacement coordinate system at GA. (Real)
- property X2: float#
- property X3: float#
CELAS1#
- class NaxToPy.Core.Classes.N2PNastranInputData.CELAS1(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property C1: int#
Component number. (0 < Integer < 6; blank or zero if scalar point.)
- property C2: int#
- property CardType: str#
- property EID: int#
Unique element identification number. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property G1: int#
Geometric grid point identification number. (Integer >= 0)
- property G2: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PELAS entry. (Integer > 0; Default = EID)
- property RawContent: str#
- property SectionInfo: object#
CELAS2#
- class NaxToPy.Core.Classes.N2PNastranInputData.CELAS2(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property C1: int#
Component number. (0 < Integer < 6; blank or zero if scalar point.)
- property C2: int#
- property CardType: str#
- property EID: int#
Unique element identification number. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property G1: int#
Geometric grid point identification number. (Integer >= 0)
- property G2: int#
- property GE: float#
Damping coefficient. See Remarks 6. and 8. (Real) * Remark 6: If PARAM,W4 is not specified, GE is ignored in transient analysis. See “Parameters” on page 631. * Remark 8: To obtain the damping coefficient GE, multiply the critical damping ratio C ⁄ C0 by 2.0.
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property K: float#
Stiffness of the scalar spring. (Real)
- property MappingSuccessful: bool#
- property RawContent: str#
- property S: float#
Stress coefficient (Real).
- property SectionInfo: object#
CELAS3#
- class NaxToPy.Core.Classes.N2PNastranInputData.CELAS3(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Unique element identification number. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PELAS entry. (Integer > 0; Default = EID)
- property RawContent: str#
- property S1: int#
Scalar point identification numbers. (Integer >= 0)
- property S2: int#
- property SectionInfo: object#
CELAS4#
- class NaxToPy.Core.Classes.N2PNastranInputData.CELAS4(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Unique element identification number. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property K: float#
Stiffness of the scalar spring. (Real)
- property MappingSuccessful: bool#
- property RawContent: str#
- property S1: int#
Scalar point identification numbers. (Integer >= 0; S1 ≠ S2)
- property S2: int#
- property SectionInfo: object#
CFAST#
- class NaxToPy.Core.Classes.N2PNastranInputData.CFAST(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property GA: int#
CardGrid ids of piecing points on patches A and B. See Remark 2. (Integer > 0 or blank) * Remark 2: GS defines the approximate location of the fastener in space. GS is projected onto the surface patches A and B.The resulting piercing points GA and GB define the axis of the fastener.GS does not have to lie on the surfaces of the patches.GS must be able to project normals to the two patches. GA can be specified in lieu of GS, in which case GS will be ignored. If neither GS nor GA is specified, then (XS, YS, ZS) in basic must be specified. If both GA and GB are specified, they must lie on or at least have projections onto surface patches A and B respectively. The locations will then be corrected so that they lie on the surface patches A and B within machine precision. The length of the fastener is the final distance between GA and GB. If the length is zero, the normal to patch A is used to define the axis of the fastener. Diagnostic printouts, checkout runs and control of search and projection parameters are requested on the SWLDPRM Bulk Data entry.
- property GB: int#
- property GS: int#
CardGrid point defining the location of the fastener. See Remark 2. (Integer > 0 or blank) * Remark 2: GS defines the approximate location of the fastener in space. GS is projected onto the surface patches A and B.The resulting piercing points GA and GB define the axis of the fastener.GS does not have to lie on the surfaces of the patches.GS must be able to project normals to the two patches. GA can be specified in lieu of GS, in which case GS will be ignored. If neither GS nor GA is specified, then (XS, YS, ZS) in basic must be specified. If both GA and GB are specified, they must lie on or at least have projections onto surface patches A and B respectively. The locations will then be corrected so that they lie on the surface patches A and B within machine precision. The length of the fastener is the final distance between GA and GB. If the length is zero, the normal to patch A is used to define the axis of the fastener. Diagnostic printouts, checkout runs and control of search and projection parameters are requested on the SWLDPRM Bulk Data entry.
- property IDA: int#
Property id (for PROP option) or Element id (for ELEM option) defining patches A and B. IDA ≠ IDB (Integer > 0)
- property IDB: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PFAST entry. (Integer > 0; Default = EID)
- property RawContent: str#
- property SectionInfo: object#
- property TYPE: str#
(Character) If TYPE = ‘PROP’, the surface patch connectivity between patch A and patch B is defined with two PSHELL(or PCOMP) properties with property ids given by IDA and IDB.See Remark 1. and Figure 8-22. If TYPE = ‘ELEM’, the surface patch connectivity between patch A and patch B is defined with two shell element ids given by IDA and IDB.See Remark 1. and Figure 8-22. * Remark 1: The CardCfast defines a flexible connection between two surface patches. Depending on the location for the piercing points GA and GB, and the size of the diameter D(see PFAST), the number of unique physical grids per patch ranges from a possibility of 3 to 16 grids. (Currently there is a limitation that there can be only a total of 16 unique grids in the upper patch and only a total of 16 unique grids in the lower patch.Thus, for example, a patch can not hook up to four CQUAD8 elements with midside nodes and no nodes in common between each CQUAD8 as that would total to 32 unique grids for the patch.)
- Type:
Specifies the surface patch definition
- property XS: float#
Location of the fastener in basic. Required if neither GS nor GA is defined.See Remark 2. (Real or blank) * Remark 2: GS defines the approximate location of the fastener in space. GS is projected onto the surface patches A and B.The resulting piercing points GA and GB define the axis of the fastener.GS does not have to lie on the surfaces of the patches.GS must be able to project normals to the two patches. GA can be specified in lieu of GS, in which case GS will be ignored. If neither GS nor GA is specified, then (XS, YS, ZS) in basic must be specified. If both GA and GB are specified, they must lie on or at least have projections onto surface patches A and B respectively. The locations will then be corrected so that they lie on the surface patches A and B within machine precision. The length of the fastener is the final distance between GA and GB. If the length is zero, the normal to patch A is used to define the axis of the fastener. Diagnostic printouts, checkout runs and control of search and projection parameters are requested on the SWLDPRM Bulk Data entry.
- property YS: float#
- property ZS: float#
CGAP#
- class NaxToPy.Core.Classes.N2PNastranInputData.CGAP(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CID: int#
Element coordinate system identification number. CID must be specified if GA and GB are coincident (distance from GA to GB < 10-4). (Integer > 0 or blank)
- property CardType: str#
- property EID: int#
Element identification number. (0 < Integer < 100000000)
- property FieldsFormat: str#
- property G0: int#
Alternate method to supply the orientation vector using grid point G0. Direction of is from GA to G0. (Integer > 0)
- property GA: int#
Connected grid points at ends A and B. (Integers > 0; GA ≠ GB)
- property GB: int#
Connected grid points at ends A and B. (Integers > 0; GA ≠ GB)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PGAP entry. (Integer > 0; Default = EID)
- property RawContent: str#
- property SectionInfo: object#
- property X1: float#
Components of the orientation vector , from GA, in the displacement coordinate system at GA. (Real)
- property X2: float#
Components of the orientation vector , from GA, in the displacement coordinate system at GA. (Real)
- property X3: float#
Components of the orientation vector , from GA, in the displacement coordinate system at GA. (Real)
CHEXANAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.CHEXANAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (0 < Integer < 100000000)
- property FieldsFormat: str#
- property G1: int#
CardGrid point identification numbers of connection points. (Integer >= 0 or blank)
- property G10: int#
- property G11: int#
- property G12: int#
- property G13: int#
- property G14: int#
- property G15: int#
- property G16: int#
- property G17: int#
- property G18: int#
- property G19: int#
- property G2: int#
- property G20: int#
- property G3: int#
- property G4: int#
- property G5: int#
- property G6: int#
- property G7: int#
- property G8: int#
- property G9: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PSOLID or PLSOLID entry. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
CHEXAOPT#
- class NaxToPy.Core.Classes.N2PNastranInputData.CHEXAOPT(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (0 < Integer < 100000000)
- property FieldsFormat: str#
- property G1: int#
CardGrid point identification numbers of connection points. (Integer >= 0 or blank)
- property G10: int#
- property G11: int#
- property G12: int#
- property G13: int#
- property G14: int#
- property G15: int#
- property G16: int#
- property G17: int#
- property G18: int#
- property G19: int#
- property G2: int#
- property G20: int#
- property G3: int#
- property G4: int#
- property G5: int#
- property G6: int#
- property G7: int#
- property G8: int#
- property G9: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PSOLID or PLSOLID entry. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
CORD1C#
- class NaxToPy.Core.Classes.N2PNastranInputData.CORD1C(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CIDA: int#
Coordinate system identification number. (Integer > 0)
- property CIDB: int#
- property CardType: str#
- property FieldsFormat: str#
- property G1A: int#
CardGrid point identification numbers. (Integer > 0; G1A ≠ G2A ≠ G3AG1B ≠ G2B ≠ G3B;)
- property G1B: int#
- property G2A: int#
- property G2B: int#
- property G3A: int#
- property G3B: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SectionInfo: object#
CORD1R#
- class NaxToPy.Core.Classes.N2PNastranInputData.CORD1R(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CIDA: int#
Coordinate system identification number. (Integer > 0)
- property CIDB: int#
- property CardType: str#
- property FieldsFormat: str#
- property G1A: int#
CardGrid point identification numbers. (Integer > 0; G1A ≠ G2A ≠ G3AG1B ≠ G2B ≠ G3B;)
- property G1B: int#
- property G2A: int#
- property G2B: int#
- property G3A: int#
- property G3B: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SectionInfo: object#
CORD1S#
- class NaxToPy.Core.Classes.N2PNastranInputData.CORD1S(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CIDA: int#
Coordinate system identification number. (Integer > 0)
- property CIDB: int#
- property CardType: str#
- property FieldsFormat: str#
- property G1A: int#
CardGrid point identification numbers. (Integer > 0; G1A ≠ G2A ≠ G3AG1B ≠ G2B ≠ G3B;)
- property G1B: int#
- property G2A: int#
- property G2B: int#
- property G3A: int#
- property G3B: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SectionInfo: object#
CORD2C#
- class NaxToPy.Core.Classes.N2PNastranInputData.CORD2C(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property A1: float#
Coordinates of three points in coordinate system defined in field 3. (Real)
- property A2: float#
- property A3: float#
- property B1: float#
- property B2: float#
- property B3: float#
- property BdfFile: str#
- property BdfFilePath: str#
- property C1: float#
- property C2: float#
- property C3: float#
- property CID: int#
Coordinate system identification number. (Integer > 0)
- property CardType: str#
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RID: int#
Identification number of a coordinate system that is defined independently from this coordinate system. (Integer > 0; Default = 0 is the basic coordinate system.)
- property RawContent: str#
- property SectionInfo: object#
CORD2R#
- class NaxToPy.Core.Classes.N2PNastranInputData.CORD2R(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property A1: float#
Coordinates of three points in coordinate system defined in field 3. (Real)
- property A2: float#
- property A3: float#
- property B1: float#
- property B2: float#
- property B3: float#
- property BdfFile: str#
- property BdfFilePath: str#
- property C1: float#
- property C2: float#
- property C3: float#
- property CID: int#
Coordinate system identification number. (Integer > 0)
- property CardType: str#
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RID: int#
Identification number of a coordinate system that is defined independently from this coordinate system. (Integer > 0; Default = 0 is the basic coordinate system.)
- property RawContent: str#
- property SectionInfo: object#
CORD2S#
- class NaxToPy.Core.Classes.N2PNastranInputData.CORD2S(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property A1: float#
Coordinates of three points in coordinate system defined in field 3. (Real)
- property A2: float#
- property A3: float#
- property B1: float#
- property B2: float#
- property B3: float#
- property BdfFile: str#
- property BdfFilePath: str#
- property C1: float#
- property C2: float#
- property C3: float#
- property CID: int#
Coordinate system identification number. (Integer > 0)
- property CardType: str#
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RID: int#
Identification number of a coordinate system that is defined independently from this coordinate system. (Integer > 0; Default = 0 is the basic coordinate system.)
- property RawContent: str#
- property SectionInfo: object#
CPENTANAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.CPENTANAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (Integer > 0)
- property FieldsFormat: str#
- property G1: int#
Identification numbers of connected grid points. (Integer >= 0 or blank)
- property G10: int#
- property G11: int#
- property G12: int#
- property G13: int#
- property G14: int#
- property G15: int#
- property G2: int#
- property G3: int#
- property G4: int#
- property G5: int#
- property G6: int#
- property G7: int#
- property G8: int#
- property G9: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PSOLID or PLSOLID entry. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
CPENTAOPT#
- class NaxToPy.Core.Classes.N2PNastranInputData.CPENTAOPT(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (Integer > 0)
- property FieldsFormat: str#
- property G1: int#
Identification numbers of connected grid points. (Integer >= 0 or blank)
- property G10: int#
- property G11: int#
- property G12: int#
- property G13: int#
- property G14: int#
- property G15: int#
- property G2: int#
- property G3: int#
- property G4: int#
- property G5: int#
- property G6: int#
- property G7: int#
- property G8: int#
- property G9: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PSOLID or PLSOLID entry. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
CQUAD4#
- class NaxToPy.Core.Classes.N2PNastranInputData.CQUAD4(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (Integer > 0)
- property FieldsFormat: str#
- property G1: int#
CardGrid point identification numbers of connection points. (Integers > 0, all unique.)
- property G2: int#
- property G3: int#
- property G4: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MCID: int#
Material coordinate system identification number. The x-axis of the material coordinate system is determined by projecting the x-axis of the MCID coordinate system(defined by the CORDij entry or zero for the basic coordinate system) onto the surface of the element. Use DIAG 38 to print the computed THETA values. MCID is ignored for hyperelastic elements. For SOL 600, only CORD2R is allowed. (Integer >= 0; If blank, then THETA = 0.0 is assumed.)
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PSHELL, PCOMP, or PLPLANE entry. (Integer > 0; Default = EID)
- property RawContent: str#
- property SectionInfo: object#
- property T1: float#
Membrane thickness of element at grid points G1 through G4.If “TFLAG” is zero or blank, then Ti are actual user specified thicknesses. See Remark 4*. for default. (Real >= 0.0 or blank, not all zero.) If “TFLAG” is one, then the Ti are fractions relative to the T value of the PSHELL. (Real > 0.0 or blank, not all zero.Default = 1.0) Ti are ignored for hyperelastic elements.
*Remark 4: The continuation is optional. If it is not supplied, then T1 through T4 will be set equal to the value of T on the PSHELL entry.
- property T2: float#
- property T3: float#
- property T4: float#
- property TFLAG: int#
An integer flag, signifying the meaning of the Ti values. (Integer 0, 1, or blank)
- property THETA: float#
Material property orientation angle in degrees. THETA is ignored for hyperelastic elements.See Figure 8-46. (Real; Default = 0.0)
- property ZOFFS: float#
Offset from the surface of grid points to the element reference plane. ZOFFS is ignored for hyperelastic elements.See Remark 6. (Real)
CQUAD8#
- class NaxToPy.Core.Classes.N2PNastranInputData.CQUAD8(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (Integer > 0)
- property FieldsFormat: str#
- property G1: int#
Identification numbers of connected corner grid points.Required data for all four grid points. (Unique Integers > 0)
- property G2: int#
- property G3: int#
- property G4: int#
- property G5: int#
Identification numbers of connected edge grid points. Optional data for any or all four grid points. (Integer >= 0 or blank)
- property G6: int#
- property G7: int#
- property G8: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MCID: int#
Material coordinate system identification number. The x-axis of the material coordinate system is determined by projecting the x-axis of the MCID coordinate system(defined by the CORDij entry or zero for the basic coordinate system) onto the surface of the element. Use DIAG 38 to print the computed THETA values. MCID is ignored for hyperelastic elements. For SOL 600, only CORD2R is allowed. (Integer >= 0; If blank, then THETA = 0.0 is assumed.)
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PSHELL, PCOMP, or PLPLANE entry. (Integer > 0; Default = EID)
- property RawContent: str#
- property SectionInfo: object#
- property T1: float#
Membrane thickness of element at grid points G1 through G4.If “TFLAG” is zero or blank, then Ti are actual user specified thicknesses. See Remark 4*. for default. (Real >= 0.0 or blank, not all zero.) If “TFLAG” is one, then the Ti are fractions relative to the T value of the PSHELL. (Real > 0.0 or blank, not all zero.Default = 1.0) Ti are ignored for hyperelastic elements.
*Remark 4: The continuation is optional. If it is not supplied, then T1 through T4 will be set equal to the value of T on the PSHELL entry.
- property T2: float#
- property T3: float#
- property T4: float#
- property TFLAG: int#
An integer flag, signifying the meaning of the Ti values. (Integer 0, 1, or blank)
- property THETA: float#
Material property orientation angle in degrees. THETA is ignored for hyperelastic elements.See Figure 8-46. (Real; Default = 0.0)
- property ZOFFS: float#
Offset from the surface of grid points to the element reference plane. ZOFFS is ignored for hyperelastic elements.See Remark 6. (Real)
CROD#
- class NaxToPy.Core.Classes.N2PNastranInputData.CROD(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (Integer > 0)
- property FieldsFormat: str#
- property G1: int#
CardGrid point identification numbers of connection points. (Integer > 0 ; G1 ≠ G2)
- Type:
G1
- property G2: int#
CardGrid point identification numbers of connection points. (Integer > 0 ; G1 ≠ G2)
- Type:
G2
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PROD entry. (Integer > 0; Default = EID)
- property RawContent: str#
- property SectionInfo: object#
CSHEAR#
- class NaxToPy.Core.Classes.N2PNastranInputData.CSHEAR(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (Integer > 0)
- property FieldsFormat: str#
- property G1: int#
Identification numbers of connected grid points. (Integer >= 0 ; G1 ≠ G2 ≠ G3 ≠ G4)
- Type:
G1
- property G2: int#
Identification numbers of connected grid points. (Integer >= 0 ; G1 ≠ G2 ≠ G3 ≠ G4)
- Type:
G2
- property G3: int#
Identification numbers of connected grid points. (Integer >= 0 ; G1 ≠ G2 ≠ G3 ≠ G4)
- Type:
G3
- property G4: int#
Identification numbers of connected grid points. (Integer >= 0 ; G1 ≠ G2 ≠ G3 ≠ G4)
- Type:
G4
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PSHEAR entry. (Integer > 0; Default = EID)
- property RawContent: str#
- property SectionInfo: object#
CTETRANAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.CTETRANAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (Integer > 0)
- property FieldsFormat: str#
- property G1: int#
Identification numbers of connected grid points. (Integer >= 0 or blank)
- property G10: int#
- property G2: int#
- property G3: int#
- property G4: int#
- property G5: int#
- property G6: int#
- property G7: int#
- property G8: int#
- property G9: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PSOLID or PLSOLID entry. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
CTETRAOPT#
- class NaxToPy.Core.Classes.N2PNastranInputData.CTETRAOPT(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (Integer > 0)
- property FieldsFormat: str#
- property G1: int#
Identification numbers of connected grid points. (Integer >= 0 or blank)
- property G10: int#
- property G2: int#
- property G3: int#
- property G4: int#
- property G5: int#
- property G6: int#
- property G7: int#
- property G8: int#
- property G9: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PSOLID or PLSOLID entry. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
CTRIA3#
- class NaxToPy.Core.Classes.N2PNastranInputData.CTRIA3(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (Integer > 0)
- property FieldsFormat: str#
- property G1: int#
CardGrid point identification numbers of connection points. (Integers > 0, all unique.)
- property G2: int#
- property G3: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MCID: int#
Material coordinate system identification number. The x-axis of the material coordinate system is determined by projecting the x-axis of the MCID coordinate system(defined by the CORDij entry or zero for the basic coordinate system) onto the surface of the element. Use DIAG 38 to print the computed THETA values. MCID is ignored for hyperelastic elements. For SOL 600, only CORD2R is allowed. (Integer >= 0; If blank, then THETA = 0.0 is assumed.)
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PSHELL, PCOMP, or PLPLANE entry. (Integer > 0; Default = EID)
- property RawContent: str#
- property SectionInfo: object#
- property T1: float#
Membrane thickness of element at grid points G1 through G4.If “TFLAG” is zero or blank, then Ti are actual user specified thicknesses. See Remark 4*. for default. (Real >= 0.0 or blank, not all zero.) If “TFLAG” is one, then the Ti are fractions relative to the T value of the PSHELL. (Real > 0.0 or blank, not all zero.Default = 1.0) Ti are ignored for hyperelastic elements.
- property T2: float#
- property T3: float#
- property TFLAG: int#
An integer flag, signifying the meaning of the Ti values. (Integer 0, 1, or blank)
- property THETA: float#
Material property orientation angle in degrees. THETA is ignored for hyperelastic elements. (Real; Default = 0.0)
- property ZOFFS: float#
Offset from the surface of grid points to the element reference plane. ZOFFS is ignored for hyperelastic elements.See Remark 3. (Real)
CTRIA6#
- class NaxToPy.Core.Classes.N2PNastranInputData.CTRIA6(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EID: int#
Element identification number. (Integer > 0)
- property FieldsFormat: str#
- property G1: int#
Identification numbers of connected corner grid points. (Unique Integers > 0)
- property G2: int#
- property G3: int#
- property G4: int#
Identification number of connected edge grid points. Optional data for any or all three points. (Integer >= 0 or blank)
- property G5: int#
- property G6: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MCID: int#
Material coordinate system identification number. The x-axis of the material coordinate system is determined by projecting the x-axis of the MCID coordinate system(defined by the CORDij entry or zero for the basic coordinate system) onto the surface of the element. Use DIAG 38 to print the computed THETA values. MCID is ignored for hyperelastic elements. For SOL 600, only CORD2R is allowed. (Integer >= 0; If blank, then THETA = 0.0 is assumed.)
- property MappingSuccessful: bool#
- property PID: int#
Property identification number of a PSHELL, PCOMP, or PLPLANE entry. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
- property T1: float#
Membrane thickness of element at grid points G1 through G4.If “TFLAG” is zero or blank, then Ti are actual user specified thicknesses. See Remark 4*. for default. (Real >= 0.0 or blank, not all zero.) If “TFLAG” is one, then the Ti are fractions relative to the T value of the PSHELL. (Real > 0.0 or blank, not all zero.Default = 1.0) Ti are ignored for hyperelastic elements.
- property T2: float#
- property T3: float#
- property TFLAG: int#
An integer flag, signifying the meaning of the Ti values. (Integer 0, 1, or blank)
- property THETA: float#
Material property orientation angle in degrees. THETA is ignored for hyperelastic elements. (Real; Default = 0.0)
- property ZOFFS: float#
Offset from the surface of grid points to the element reference plane. ZOFFS is ignored for hyperelastic elements.See Remark 3. (Real)
CWELD#
- class NaxToPy.Core.Classes.N2PNastranInputData.CWELD(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EWID: int#
CardCweld element identification number. See Remark 1. (Integer > 0) * Remark 1: CardCweld defines a flexible connection between two surface patches, between a point and a surface patch, or between two shell vertex grid points. See Figure 8-72 through Figure 8-76.
- property FieldsFormat: str#
- property GA: int#
CardGrid point identification numbers of piercing points on surface A and surface B, respectively. See Remark 5. (Integer > 0 or blank) * Remark 5: The definition of the piercing grid points GA and GB is optional for all formats with the exception of the format “ALIGN”. If GA and GB are given, GS is ignored.If GA and GB are not specified, they are generated from the normal projection of GS on surface patches A and B.For the formats “ELEMID” and “GRIDID,” internal identification numbers are generated for GA and GB starting with 101e+6 by default. The offset number can be changed with PARAM, OSWPPT. If GA and GB are specified, they must lie on or at least have a projection on surface patches A and B, respectively. The locations of GA and GB are corrected so that they lie on surface patches A and B within machine precision accuracy.The length of the connector is the distance of grid point GA to GB. Vertex grid identification number of shell A and B, respectively. (Integer > 0)
- property GAI: list[int]#
CardGrid identification numbers of surface patch A.GA1 to GA3 are required. See Remark 10. (Integer > 0) * Remark 10: GAi are required for the format “GRIDID”. At least 3 and at most 8 grid IDs may be specified for GAi and GBi, respectively.The rules of the triangular and quadrilateral elements apply for the order of GAi and GBi, see Figure 8-75. Missing midside nodes are allowed.
- property GB: int#
- property GBI: list[int]#
CardGrid identification numbers of surface patch B. See Remark 10. (Integer > 0) * Remark 10: GAi are required for the format “GRIDID”. At least 3 and at most 8 grid IDs may be specified for GAi and GBi, respectively.The rules of the triangular and quadrilateral elements apply for the order of GAi and GBi, see Figure 8-75. Missing midside nodes are allowed.
- property GS: int#
Identification number of a grid point which defines the location of the connector.See Remarks 2. and 3. * Remark 2: CardGrid point GS defines the approximate location of the connector in space. GS is projected on surface patch A and on surface patch B.The resulting piercing points GA and GB define the axis of the connector. GS must have a normal projection on surface patch A and B. GS does not have to lie on the surface patches. GS is ignored for format “ALIGN”. GA is used instead of GS if GS is not specified. For the formats “ELPAT” and “PARTPAT,” if GS and GA are not specified, then XS, YS, and ZS must be specified. * Remark 3: The connectivity between grid points on surface patch A and grid points on surface patch B is generated depending on the location of GS and the cross sectional area of the connector.Diagnostic print outs, checkout runs and non default settings of search and projection parameters are requested on the SWLDPRM Bulk Data entry.It is recommended to start with the default settings.
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MCID: int#
Specifies the element stiffness coordinate system
- property MappingSuccessful: bool#
- property PIDA: int#
Property identification numbers of PSHELL entries defining surface A and B respectively. (Integer > 0)
- property PIDB: int#
- property PWID: int#
Property identification number of a PWELD entry. (Integer > 0)
- property RawContent: str#
- property SHIDA: int#
Shell element identification numbers of elements on patch A and B, respectively. (Integer > 0)
- property SHIDB: int#
- property SPTYP: str#
Character string indicating types of surface patches A and B.SPTYP=”QQ”, “TT”, “QT”, “TQ”, “Q” or “T”. See Remark 9. * Remark 9: SPTYP defines the type of surface patches to be connected. SPTYP is required for the format “GRIDID” to identify quadrilateral or triangular patches.The combinations are: SPTYP Description QQ Connects a quadrilateral surface patch A(Q4 to Q8) with a quadrilateral surface patch B(Q4 to Q8). QT Connects a quadrilateral surface patch A(Q4 to Q8) with a triangular surface patch B(T3 to T6). TT Connects a triangular surface patch A(T3 to T6) with a triangular surface patch B(T3 to T6). TQ Connects a triangular surface patch A(T3 to T6) with a quadrilateral surface patch B(Q4 to Q8). Q Connects the shell vertex grid GS with a quadrilateral surface patch A(Q4 to Q8) if surface patch B is not specified. T Connects the shell vertex grid GS with a triangular surface patch A (T3 to T6) if surface patch B is not specified.
- property SectionInfo: object#
- property XS: float#
Coordinates of spot weld location in basic. See Remark 2. (Real) * Remark 2: CardGrid point GS defines the approximate location of the connector in space. GS is projected on surface patch A and on surface patch B.The resulting piercing points GA and GB define the axis of the connector. GS must have a normal projection on surface patch A and B. GS does not have to lie on the surface patches. GS is ignored for format “ALIGN”. GA is used instead of GS if GS is not specified. For the formats “ELPAT” and “PARTPAT,” if GS and GA are not specified, then XS, YS, and ZS must be specified.
- property YS: float#
- property ZS: float#
FORCENAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.FORCENAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CID: int#
Coordinate system identification number. (Integer >= 0; Default = 0)
- property CardType: str#
- property F: float#
Scale factor. Real)
- property FieldsFormat: str#
- property G: int#
Grid point identification number. (Integer > 0)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property N1: float#
X-component of a vector measured in coordinate system defined by CID. (Real; at least one Ni ≠ 0.0. unless F is zero)
- property N2: float#
Y-component of a vector measured in coordinate system defined by CID. (Real; at least one Ni ≠ 0.0. unless F is zero)
- property N3: float#
Z-component of a vector measured in coordinate system defined by CID. (Real; at least one Ni ≠ 0.0. unless F is zero)
- property RawContent: str#
- property SID: int#
Load set identification number. (Integer > 0)
- property SectionInfo: object#
GRID#
- class NaxToPy.Core.Classes.N2PNastranInputData.GRID(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CD: int#
Identification number of coordinate system in which the displacements, degrees-of-freedom, constraints, and solution vectors are defined at the grid point. (Integer >= -1 or blank)*
- property CP: int#
Identification number of coordinate system in which the location of the grid point is defined. (Integer >= 0 or blank*)
- property CardType: str#
- property FieldsFormat: str#
- property ID: int#
CardCardGrid point identification number. (0 < Integer < 100000000)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property PS: int#
Permanent single-point constraints associated with the grid point. (Any of the Integers 1 through 6 with no embedded blanks, or blank*.)
- property RawContent: str#
- property SEID: int#
Superelement identification number. (Integer >= 0; Default = 0)
- property SectionInfo: object#
- property X1: float#
Location of the grid point in coordinate system CP. (Real; Default = 0.0)
- property X2: float#
Location of the grid point in coordinate system CP. (Real; Default = 0.0)
- property X3: float#
Location of the grid point in coordinate system CP. (Real; Default = 0.0)
LOAD#
- class NaxToPy.Core.Classes.N2PNastranInputData.LOAD(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_all_load_set_ids() list[int][source]#
Load set identification numbers defined on entry types listed above. (Integer > 0)
- get_all_scale_factors() list[float][source]#
Returns a list of all scale factors associated with each Load set.
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_load_set_id(index: int, load_set_id: int) None[source]#
Sets the load set ID for a specific Load set by index.
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- set_scale_factor(index: int, scale_factor: float) None[source]#
Sets the scale factor for a specific Load set by index.
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property S: float#
Overall scale factor. (Real)
- property SID: int#
Load set identification number. (Integer > 0)
- property SectionInfo: object#
MAT10NAS#
MAT10OPT#
MAT1NAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.MAT1NAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property A: float#
Thermal expansion coefficient. (Real)
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property E: float#
Young’s modulus. (Real > 0.0 or blank)
- property FieldsFormat: str#
- property G: float#
Shear modulus. (Real > 0.0 or blank)
- property GE: float#
Structural element damping coefficient. See Remarks 8., 9., and 4. (Real) * Remark 8: To obtain the damping coefficient GE, multiply the critical damping ratio C ⁄ C0, by 2.0. * Remark 9: TREF and GE are ignored if the MAT1 entry is referenced by a PCOMP entry. * Remark 4: MAT1 materials may be made temperature-dependent by use of the MATT1 entry.In SOL 106, linear and nonlinear elastic material properties in the residual structure will be updated as prescribed under the TEMPERATURE Case Control command.
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MCSID: int#
Material coordinate system identification number. Used only for PARAM,CURV processing.See “Parameters” on page 631. (Integer > 0 or blank)
- property MID: int#
Material identification number. (Integer > 0)
- property MappingSuccessful: bool#
- property NU: float#
Poisson’s ratio. (-1.0 < Real < 0.5 or blank)
- property RHO: float#
Mass density. See Remark 5. (Real) * Remark 5: The mass density RHO will be used to compute mass for all structural elements automatically.
- property RawContent: str#
- property SC: float#
- property SS: float#
- property ST: float#
Stress limits for tension, compression, and shear are optionally supplied, used only to compute margins of safety in certain elements; and have no effect on the computational procedures.See “Beam Element (CBEAM)” in Chapter 3 of the MSC.Nastran Reference Guide. (Real > 0.0 or blank)
- property SectionInfo: object#
- property TREF: float#
Reference temperature for the calculation of thermal loads, or a temperature-dependent thermal expansion coefficient. See Remarks 9. and 10. (Real; Default = 0.0 if A is specified.) * Remark 9: TREF and GE are ignored if the MAT1 entry is referenced by a PCOMP entry. * Remark 10: TREF is used in two different ways: • In nonlinear static analysis(SOL 106), TREF is used only for the calculation of a temperature-dependent thermal expansion coefficient. The reference temperature for the calculation of thermal loads is obtained from the TEMPERATURE(INITIAL) set selection. • In all SOLs except 106, TREF is used only as the reference temperature for the calculation of thermal loads.TEMPERATURE(INITIAL) may be used for this purpose, but TREF must be blank.
MAT1OPT#
- class NaxToPy.Core.Classes.N2PNastranInputData.MAT1OPT(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property A: float#
Thermal expansion coefficient. No default (Real)
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property E: float#
Young’s modulus. (Real > 0.0 or blank)
- property FieldsFormat: str#
- property G: float#
Shear modulus. (Real > 0.0 or blank)
- property GE: float#
Structural element damping coefficient. No default (Real)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MCSID: int#
Material coordinate system identification number. Used only for PARAM,CURV processing.See “Parameters” on page 631. (Integer > 0 or blank)
- property MID: int#
Material identification number. (Integer > 0)
- property MappingSuccessful: bool#
- property NU: float#
Poisson’s ratio. If < 0.0, a warning is issued. (-1.0 < Real < 0.5 or blank)
- property RHO: float#
Mass density. Used to automatically compute mass for all structural elements. No default (Real)
- property RawContent: str#
- property SC: float#
- property SS: float#
- property ST: float#
Stress limits in tension, compression and shear. Used for composite ply failure calculations. No default (Real)
- property SectionInfo: object#
- property TREF: float#
Reference temperature for thermal loading. Default = 0.0 (Real)
MAT2NAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.MAT2NAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property A1: float#
Thermal expansion coefficient vector. (Real)
- property A2: float#
- property A3: float#
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property FieldsFormat: str#
- property G11: float#
The material property matrix. (Real)
- property G12: float#
- property G13: float#
- property G22: float#
- property G23: float#
- property G33: float#
GE33
- property GE: float#
Structural element damping coefficient. See Remarks 7., 10., and 12. (Real) * Remark 7: To obtain the damping coefficient GE, multiply the critical damping ratio C ⁄ C0, by 2.0. * Remark 10: TREF and GE are ignored if the MAT1 entry is referenced by a PCOMP entry. * Remark 12: If PARAM,W4 is not specified, GE is ignored in transient analysis. See “Parameters” on page 631.
- property GE11: float#
Structural damping matrix
- property GE12: float#
- property GE13: float#
- property GE22: float#
- property GE23: float#
- property GE33: float#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MCSID: int#
Material coordinate system identification number. Used only for PARAM,CURV processing.See “Parameters” on page 631. (Integer >= 0 or blank)
- property MID: int#
Material identification number. See Remark 13. (Integer > 0) * Remark 13: PCOMP entries generate MAT2 entries equal to 100,000,000 plus the PCOMP PID.Explicitly specified MAT2 IDs must not conflict with internally generated MAT2 IDs.Furthermore, if MID is greater than 400,000,000 then A1, A2, and A3 are a special format. They are [G4] ⋅ [α4] not [α4]. If MIDs larger than 99999999 are used, PARAM, NOCOMPS,-1 must be specified to obtain stress output.
- property MappingSuccessful: bool#
- property RHO: float#
Mass density. (Real)
- property RawContent: str#
- property SC: float#
- property SS: float#
- property ST: float#
Stress limits for tension, compression, and shear are optionally supplied, used only to compute margins of safety in certain elements; and have no effect on the computational procedures.See “Beam Element (CBEAM)” in Chapter 3 of the MSC.Nastran Reference Guide. (Real or blank)
- property SectionInfo: object#
- property TREF: float#
Reference temperature for the calculation of thermal loads, or a temperature-dependent thermal expansion coefficient. See Remarks 10 and 11. (Real or blank) * Remark 10: TREF and GE are ignored if this entry is referenced by a PCOMP entry. * Remark 11: TREF is used in two different ways: • In nonlinear static analysis(SOL 106), TREF is used only for the calculation of a temperature-dependent thermal expansion coefficient. The reference temperature for the calculation of thermal loads is obtained from the TEMPERATURE(INITIAL) set selection. • In all SOLs except 106, TREF is used only as the reference temperature for the calculation of thermal loads.TEMPERATURE(INITIAL) may be used for this purpose, but TREF must be blank.
MAT2OPT#
- class NaxToPy.Core.Classes.N2PNastranInputData.MAT2OPT(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property A1: float#
Thermal expansion coefficient vector. No default (Real)
- property A2: float#
- property A3: float#
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property FieldsFormat: str#
- property G11: float#
The material property matrix. No default. (Real)
- property G12: float#
- property G13: float#
- property G22: float#
- property G23: float#
- property G33: float#
- property GE: float#
Structural element damping coefficient. No default (Real)
- property GE11: float#
Structural damping matrix
- property GE12: float#
- property GE13: float#
- property GE22: float#
- property GE23: float#
- property GE33: float#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MCSID: int#
Material coordinate system identification number. Used only for PARAM,CURV processing.See “Parameters” on page 631. (Integer >= 0 or blank)
- property MID: int#
Material identification number. (Integer > 0)
- property MappingSuccessful: bool#
- property RHO: float#
Mass density. Used to automatically compute mass for all structural elements. No default (Real)
- property RawContent: str#
- property SC: float#
- property SS: float#
- property ST: float#
Stress limits in tension, compression and shear. Used for composite ply failure calculations. No default (Real)
- property SectionInfo: object#
- property TREF: float#
Reference temperature for the calculation of thermal loads. Data from the MAT2 entry is used directly, without adjustment of equivalent E, G, or NU values. Default = blank(Real or blank)
MAT3#
MAT4#
MAT5#
MAT8#
- class NaxToPy.Core.Classes.N2PNastranInputData.MAT8(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property A1: float#
Thermal expansion coefficient in i-direction. (Real)
- property A2: float#
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property E1: float#
Modulus of elasticity in longitudinal direction, also defined as the fiber direction or 1-direction. (Real ≠ 0.0)
- property E2: float#
Modulus of elasticity in lateral direction, also defined as the matrix direction or 2-direction. (Real ≠ 0.0)
- property F12: float#
Interaction term in the tensor polynomial theory of Tsai-Wu. Required if failure index by Tsai-Wu theory is desired and if value of F12 is different from 0.0. See the FT field on the PCOMP entry. (Real)
- property FieldsFormat: str#
- property G12: float#
In-plane shear modulus. (Real > 0.0; Default = 0.0)
- property G1Z: float#
Transverse shear modulus for shear in 1-Z plane. (Real > 0.0; Default implies infinite shear modulus.)
- property G2Z: float#
Transverse shear modulus for shear in 2-Z plane. (Real > 0.0; Default implies infinite shear modulus.)
- property GE: float#
Structural damping coefficient. See Remarks 4. and 6. (Real) * Remark 4: Xt, Yt, and S are required for composite element failure calculations when requested in the FT field of the PCOMP entry.Xc and Yc are also used but not required. * Remark 6: TREF is used in two different ways: • In nonlinear static analysis(SOL 106), TREF is used only for the calculation of a temperature-dependent thermal expansion coefficient.The reference temperature for the calculation of thermal loads is obtained from the TEMPERATURE(INITIAL) set selection. See Figure 8-94 in Remark 10. in the MAT1 description. • In all SOLs except 106, TREF is used only as the reference temperature for the calculation of thermal loads.TEMPERATURE(INITIAL) may be used for this purpose, but TREF must then be blank.
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MID: int#
Material identification number. Referenced on a PSHELL or PCOMP entry only. (0 < Integer< 100,000,000)
- property MappingSuccessful: bool#
- property NU12: float#
Poisson’s ratio (ε2 ⁄ ε1 for uniaxial loading in 1-direction). Note that υ21 = ε1 ⁄ ε2 for uniaxial loading in 2-direction is related to 12, E1, and E2 by the relation υ12E2 = υ21E1. (Real)
- property RHO: float#
Mass density. (Real)
- property RawContent: str#
- property S: float#
Allowable stress or strain for in-plane shear. See the FT field on the PCOMP entry. (Real > 0.0)
- property STRN: float#
For the maximum strain theory only (see STRN in PCOMP entry). Indicates whether Xt, Xc, Yt, Yc, and S are stress or strain allowables. [Real = 1.0 for strain allowables; blank(Default) for stress allowables.]
- property SectionInfo: object#
- property TREF: float#
Reference temperature for the calculation of thermal loads, or a temperature-dependent thermal expansion coefficient.See Remarks 4. and 5. (Real or blank) * Remark 4: Xt, Yt, and S are required for composite element failure calculations when requested in the FT field of the PCOMP entry.Xc and Yc are also used but not required. * Remark 5: TREF and GE are ignored if this entry is referenced by a PCOMP entry.
- property Xc: float#
- property Xt: float#
Allowable stresses or strains in tension and compression, respectively, in the longitudinal direction.Required if failure index is desired. See the FT field on the PCOMP entry. (Real > 0.0; Default value for Xc is Xt.)
- property Yc: float#
- property Yt: float#
Allowable stresses or strains in tension and compression, respectively, in the lateral direction.Required if failure index is desired. (Real > 0.0; Default value for Yc is Yt.)
MAT9NAS#
MAT9OPT#
MOMENTNAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.MOMENTNAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CID: int#
Coordinate system identification number. (Integer > 0 or blank)
- property CardType: str#
- property FieldsFormat: str#
- property G: int#
Grid point identification number at which the moment is applied. (Integer > 0)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property M: float#
Scale factor. (Real)
- property MappingSuccessful: bool#
- property N1: float#
X-component of a vector measured in coordinate system defined by CID. (Real; at least one Ni ≠ 0.0. unless M is zero)
- property N2: float#
Y-component of a vector measured in coordinate system defined by CID. (Real; at least one Ni ≠ 0.0. unless M is zero)
- property N3: float#
Z-component of a vector measured in coordinate system defined by CID. (Real; at least one Ni ≠ 0.0. unless M is zero)
- property RawContent: str#
- property SID: int#
Load set identification number. (Integer > 0)
- property SectionInfo: object#
MPC#
- class NaxToPy.Core.Classes.N2PNastranInputData.MPC(cardinfo)[source]#
Bases:
N2PCardNastran/Optistruct Multi Point Constriction Card
- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_all_coefficients() list[float][source]#
Returns a list of all coefficients in the MPC definition.
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_coefficient(index: int, value: float) None[source]#
Sets the coefficient at the specified index (1-based).
- set_component(index: int, value: int) None[source]#
Sets the component at the specified index (1-based).
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_grid_point(index: int, value: int) None[source]#
Sets the grid point at the specified index (1-based).
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SID: int#
Set identification number. (Integer > 0)
- property SectionInfo: object#
MPCADD#
- class NaxToPy.Core.Classes.N2PNastranInputData.MPCADD(cardinfo)[source]#
Bases:
N2PCardNastran/Optistruct Multi Point Constriction Card
- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_all_components_set_ids() list[int][source]#
Returns a list of all component set IDs in the MPCADD definition.
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_component_set_id(index: int, componentSetID: int) None[source]#
Sets the component set ID at the specified index (1-based).
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SID: int#
Set identification number. (Integer > 0)
- property SectionInfo: object#
PBAR#
- class NaxToPy.Core.Classes.N2PNastranInputData.PBAR(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property A: float#
Area of bar cross section. (Real; Default = 0.0)
- property BdfFile: str#
- property BdfFilePath: str#
- property C1: float#
C1, C2, D1, D2, E1, E2, F1, F2: Stress recovery coefficients. (Real; Default = 0.0)
- property C2: float#
- property CardType: str#
- property D1: float#
- property D2: float#
- property E1: float#
- property E2: float#
- property F1: float#
- property F2: float#
- property FieldsFormat: str#
- property I1: float#
I1, I2: Area moments of inertia.See Figure 8-177. (Real; I1 > 0.0, I2 > 0.0, I1* I2 > ; Default = 0.0)
- property I12: float#
- property I2: float#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property J: float#
Torsional constant. See Figure 8-177. (Real; Default = for SOL 600 and 0.0 for all other solution sequences)
- property K1: float#
Area factor for shear. See Remark 5. (Real or blank)
- property K2: float#
- property MID: int#
Identification number of a MATHP entry. (Integer > 0)
- property MappingSuccessful: bool#
- property NSM: float#
Nonstructural mass per unit length. (Real)
- property PID: int#
Property identification number. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
PBARL#
PBEAMNAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.PBEAMNAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property A: list[float]#
Area of the beam cross section at end A. (Real > 0.0) Fixed-size array: [0..10] representing A values at up to 11 stations.
- property BdfFile: str#
- property BdfFilePath: str#
- property C1: list[float]#
Y-coordinate of stress recovery point C at each station. Fixed-size array: [0..10] representing C1 (y_C) values at up to 11 stations.
- property C2: list[float]#
Z-coordinate of stress recovery point C at each station. Follows identical rules to C1 but for z-direction. Fixed-size array: [0..10] representing C2 (z_C) values at up to 11 stations.
- property CW_A: float#
Warping coefficient for end A. (Real)
- property CW_B: float#
Warping coefficient for end A
- property CardType: str#
- property D1: list[float]#
Y-coordinate of stress recovery point D at each station. Follows identical rules to C1. Fixed-size array: [0..10] representing D1 (y_D) values at up to 11 stations.
- property D2: list[float]#
Z-coordinate of stress recovery point D at each station. Follows identical rules to C1 but for z-direction. Fixed-size array: [0..10] representing D2 (z_D) values at up to 11 stations.
- property E1: list[float]#
Y-coordinate of stress recovery point E at each station. Follows identical rules to C1. Fixed-size array: [0..10] representing E1 (y_E) values at up to 11 stations.
- property E2: list[float]#
Z-coordinate of stress recovery point E at each station. Follows identical rules to C1. Fixed-size array: [0..10] representing E2 (z_E) values at up to 11 stations.
- property F1: list[float]#
Y-coordinate of stress recovery point F at each station. Follows identical rules to C1. Fixed-size array: [0..10] representing F1 (y_F) values at up to 11 stations.
- property F2: list[float]#
Z-coordinate of stress recovery point F at each station. Follows identical rules to C1 but for z-direction. Fixed-size array: [0..10] representing F2 (z_F) values at up to 11 stations.
- property FieldsFormat: str#
- property I1: list[float]#
Area moment of inertia at end A for bending in plane 1 about the neutral axis.See Remark 10. (Real > 0.0) Fixed-size array: [0..10] representing I1 values at up to 11 stations.
- property I12: list[float]#
Area product of inertia at end A. See Remark 10. (Real, but I1*I2 - I12^2 > 0.00) Fixed-size array: [0..10] representing I12 values at up to 11 stations.
- property I2: list[float]#
Area moment of inertia at end A for bending in plane 2 about the neutral axis.See Remark 10. (Real > 0.0) Fixed-size array: [0..10] representing I2 values at up to 11 stations.
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property J: list[float]#
Torsional stiffness parameter at end A. See Remark 10. (Real >= 0.0 but > 0.0 if warping is present) Fixed-size array: [0..10] representing J values at up to 11 stations.
- property K1: float#
Shear stiffness factor K in K* A*G for plane 1. (Real)
- property K2: float#
Shear stiffness factor K in K* A*G for plane 2. (Real)
- property M1_A: float#
Y coordinate of center of gravity of nonstructural mass for end A. (Real)
- property M1_B: float#
Y coordinate of center of gravity of nonstructural mass for end B. (Real)
- property M2_A: float#
Z coordinate of center of gravity of nonstructural mass for end A. (Real)
- property M2_B: float#
Z coordinate of center of gravity of nonstructural mass for end B. (Real)
- property MID: int#
Material identification number. (Integer > 0)
- property MappingSuccessful: bool#
- property N1_A: float#
Y coordinate of neutral axis for end A. (Real)
- property N1_B: float#
Y coordinate of neutral axis for end B. (Real)
- property N2_A: float#
Z coordinate of neutral axis for end A. (Real)
- property N2_B: float#
Z coordinate of neutral axis for end B. (Real)
- property NSI_A: float#
Nonstructural mass moment of inertia per unit length about nonstructural mass center of gravity at end A. (Real)
- property NSI_B: float#
Nonstructural mass moment of inertia per unit length about nonstructural mass center of gravity at end B. (Real)
- property NSM: float#
Nonstructural mass per unit length at each station. Fixed-size array: [0..10] representing NSM values at up to 11 stations.
- property PID: int#
Property identification number. (Integer > 0 or string)
- property RawContent: str#
- property S1: float#
Shear relief coefficient due to taper for plane 1.Ignored for beam p-elements. (Real)
- property S2: float#
Shear relief coefficient due to taper for plane 2.Ignored for beam p-elements. (Real)
- property SO: list[int]#
Stress output request option. (Character) Required* “YES” Stresses recovered at points Ci, Di, Ei, and Fi on the next continuation. “YESA” Stresses recovered at points with the same y and z location as end A. “NO” No stresses or forces are recovered.
The parser converts the string value from the file to an enum: • “YES” in file → StressOutputOption.YES = 0 • “YESA” in file → StressOutputOption.YESA = 1 • “NO” in file → StressOutputOption.NO = 2
Fixed-size array: [0..10] representing values at up to 11 stations.
- property SectionInfo: object#
- property X_XB: list[float]#
Distance from end A in the element coordinate system divided by the length of the element. (Real, 0.0 < x/xb ≤ 1.0)
PBEAML#
PBUSHNAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.PBUSHNAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property ALPHA: float#
Thermal expansion coefficient for the CBUSH.(Real; Default=0.0)
- property B1: float#
Nominal damping coefficients in direction 1 through 6 in units of force per unit velocity.See Remarks 2., 3., and 9. (Real; Default = 0.0)
- Type:
Bi
- property B2: float#
- property B3: float#
- property B4: float#
- property B5: float#
- property B6: float#
- property BdfFile: str#
- property BdfFilePath: str#
- property COINL: float#
Length of a CBUSH with coincident grids. (Real; Default=0.0, COINL ≥ 0.0)
- property CardType: str#
- property EA: float#
- property ET: float#
- property FieldsFormat: str#
- property GE1: float#
Nominal stiffness values in directions 1 through 6. See Remarks 2. and 3. (Real; Default = 0.0)
- property GE2: float#
- property GE3: float#
- property GE4: float#
- property GE5: float#
- property GE6: float#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property K1: float#
Nominal stiffness values in directions 1 through 6. See Remarks 2. and 3. (Real; Default = 0.0)
- Type:
Ki
- property K2: float#
- property K3: float#
- property K4: float#
- property K5: float#
- property K6: float#
- property M: float#
Lumped mass of the CBUSH. (Real≥0.0; Default=0.0)
- property MappingSuccessful: bool#
- property PID: int#
Property identification number. (Integer > 0)
- property RawContent: str#
- property SA: float#
Nominal stiffness values in directions 1 through 6. See Remarks 2. and 3. (Real; Default = 0.0)
- property ST: float#
- property SectionInfo: object#
- property TREF: float#
Reference temperature for the calculation of thermal loads. (Real; Default=0.0)
PBUSHOPT#
- class NaxToPy.Core.Classes.N2PNastranInputData.PBUSHOPT(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property ALPHA: float#
Thermal expansion coefficient for the CBUSH.(Real; Default=0.0)
- property B1: float#
Nominal damping coefficients in direction 1 through 6 in units of force per unit velocity.See Remarks 2., 3., and 9. (Real; Default = 0.0)
- Type:
Bi
- property B2: float#
- property B3: float#
- property B4: float#
- property B5: float#
- property B6: float#
- property BdfFile: str#
- property BdfFilePath: str#
- property COINL: float#
Length of a CBUSH with coincident grids. (Real; Default=0.0, COINL ≥ 0.0)
- property CardType: str#
- property EA: float#
- property ET: float#
- property FieldsFormat: str#
- property GE1: float#
Nominal stiffness values in directions 1 through 6. See Remarks 2. and 3. (Real; Default = 0.0)
- property GE2: float#
- property GE3: float#
- property GE4: float#
- property GE5: float#
- property GE6: float#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property K1: float#
Nominal stiffness values in directions 1 through 6. See Remarks 2. and 3. (Real; Default = 0.0)
- Type:
Ki
- property K2: float#
- property K3: float#
- property K4: float#
- property K5: float#
- property K6: float#
- property M: str#
Flag indicating that the next 1 to 6 fields are directional masses.
- property MappingSuccessful: bool#
- property PID: int#
Property identification number. (Integer > 0)
- property RawContent: str#
- property SA: float#
Nominal stiffness values in directions 1 through 6. See Remarks 2. and 3. (Real; Default = 0.0)
- property ST: float#
- property SectionInfo: object#
- property TREF: float#
Reference temperature for the calculation of thermal loads. (Real; Default=0.0)
PCOMPNAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.PCOMPNAS(cardinfo)[source]#
Bases:
N2PCard- GetNumberOfPlies() int[source]#
Gets the number of plies that make up this composite laminate, accounting for symmetric effects. For standard laminates: Returns a positive integer representing the number of plies defined in the card. For symmetric laminates (LAM=SYM): Returns a negative integer whose absolute value equals the number of plies defined in the card. This negative value indicates that the actual physical laminate has twice as many plies, since the solver mirrors the defined plies. Returns 0 if no plies have been defined or if the ply arrays haven’t been initialized.
- GetPlyMaterialId(plyIndex: int) int[source]#
Gets the Material ID (MIDi) for the specified ply. According to the PCOMP Documentation, MID1 must be specified, while subsequent MIDs can be blank. When blank, a ply’s material ID defaults to the last explicitly defined material ID. 1-based index of the ply (1 = first ply at bottom of laminate). The material ID as a nullable integer. Returns null if the ply’s MID is blank. Returns null if the ply index is invalid or ply arrays haven’t been initialized.
- GetPlyOrientation(plyIndex: int) float[source]#
Gets the Orientation Angle (THETAi) for the specified ply. According to the PCOMP Documentation, this field can be blank for any ply, defaulting to 0.0. The angle defines the orientation of the ply’s longitudinal direction relative to the element’s material axis. 1-based index of the ply (1 = first ply at bottom of laminate). The orientation angle as a nullable float in degrees. Returns null if the ply’s angle is blank (default 0.0). Returns null if the ply index is invalid or ply arrays haven’t been initialized.
- GetPlyOutputRequest(plyIndex: int) str[source]#
Gets the Stress/Strain Output Request (SOUTi) for the specified ply. According to the PCOMP Documentation, this field can be “YES”, “NO”, or blank (defaulting to “NO”). This controls whether stress/strain results are calculated and made available for output for this ply. 1-based index of the ply (1 = first ply at bottom of laminate). The output request as a string “YES”, “NO”, or null if blank. Returns null if the ply index is invalid or ply arrays haven’t been initialized.
- GetPlyThickness(plyIndex: int) float[source]#
Gets the Thickness (Ti) for the specified ply. According to the PCOMP Documentation, T1 must be specified, while subsequent thicknesses can be blank. When blank, a ply’s thickness defaults to the last explicitly defined thickness. 1-based index of the ply (1 = first ply at bottom of laminate). The thickness as a nullable float. Returns null if the ply’s thickness is blank. Returns null if the ply index is invalid or ply arrays haven’t been initialized.
- SetPlyMaterialId(plyIndex: int, midValue: int) None[source]#
Sets only the Material ID (MIDi) for a specific ply. According to the PCOMP Documentation, MID1 must be specified (not null), while subsequent MIDs can be blank (in which case they inherit from the last defined MID). 1-based index of the ply (1 = first ply at bottom of laminate) Material ID value to set, or null to indicate blank (inheritance from previous ply). Must refer to a valid MAT1, MAT2, MAT8, or MATDIGI entry.
- SetPlyOrientation(plyIndex: int, thetaValue: float) None[source]#
Sets only the Orientation Angle (THETAi) for a specific ply. According to the PCOMP Documentation, this field can be blank for any ply, defaulting to 0.0. The angle is measured in degrees and defines the orientation of the ply’s longitudinal direction relative to the element’s material axis. 1-based index of the ply (1 = first ply at bottom of laminate). Orientation angle to set in degrees, or null to indicate blank/default (0.0).
- SetPlyOutputRequest(plyIndex: int, soutValue: str) bool[source]#
Sets only the Stress/Strain Output Request (SOUTi) for a specific ply. According to the PCOMP Documentation, this field can be “YES”, “NO”, or blank (defaulting to “NO”). This controls whether stress/strain results are calculated and available for output for this ply. 1-based index of the ply (1 = first ply at bottom of laminate). Boolean value indicating output request: true for “YES”, false for “NO”, or null to indicate blank (default “NO”).
- SetPlyThickness(plyIndex: int, thicknessValue: float) None[source]#
Sets only the Thickness (Ti) for a specific ply. According to the PCOMP Documentation, T1 must be specified (not null) and > 0.0, while subsequent thicknesses can be blank (in which case they inherit from the last defined T). 1-based index of the ply (1 = first ply at bottom of laminate). Thickness value to set, or null to indicate blank (inheritance from previous ply). When specified, must be greater than 0.0.
- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property FT: str#
Failure theory. The following theories are allowed (Character or blank. If blank, then no failure calculation will be performed) See Remark 7. “HILL” for the Hill theory. “HOFF” for the Hoffman theory. “TSAI” for the Tsai-Wu theory. “STRN” for the Maximum Strain theory. * Remark 7: In order to get failure index output the following must be present: a.ELSTRESS or ELSTRAIN Case Control commands, b. SB, FT, and SOUTi on the PCOMP Bulk Data entry, c. Xt, Xc, Yt, Yc, and S on all referenced MAT8 Bulk Data entries if stress allowables are used, or Xt, Xc, Yt, S, and STRN = 1.0 if strain allowables are used.
- property FieldsFormat: str#
- property GE: float#
Damping coefficient. See Remarks 4. and 12. (Real; Default = 0.0) * Remark 4: GE given on the PCOMP entry will be used for the element and the values supplied on material entries for individual plies are ignored.The user is responsible for supplying the equivalent damping value on the PCOMP entry.If PARAM, W4 is not specified GE is ignored in transient analysis. See “Parameters” on page 631. * Remark 12: To obtain the damping coefficient GE, multiply the critical damping ratio C ⁄ C0 by 2.0.
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property LAM: str#
Laminate Options. (Character or blank, Default = blank). See Remarks 13. and 14. “Blank” All plies must be specified and all stiffness terms are developed. “SYM” Only plies on one side of the element centerline are specified. The plies are numbered starting with 1 for the bottom layer.If an odd number of plies are desired, the center ply thickness (T1) should be half the actual thickness. “MEM” All plies must be specified, but only membrane terms (MID1 on the derived PSHELL entry) are computed. “BEND” All plies must be specified, but only bending terms (MID2 on the derived PSHELL entry) are computed. “SMEAR” All plies must be specified, stacking sequence is ignored MID1 = MID2 on the derived PSHELL entry and MID3, MID4 and TS/T and 12I/T**3 terms are set as blanks). “SMCORE”All plies must be specified, with the last ply specifying core properties and the previous plies specifying face sheet properties. The stiffness matrix is computed by placing half the face sheet thicknesses above the core and the other half below with the result that the laminate is symmetric about the midplane of the core.Stacking sequence is ignored in calculating the face sheet stiffness. * Remark 13: The SYM option for the LAM option computes the complete stiffness properties while specifying half the plies.The MEM, BEND, SMEAR and SMCORE options provide special purpose stiffness calculations.SMEAR ignores stacking sequence and is intended for cases where this sequence is not yet known, stiffness properties are smeared. SMCORE allows simplified modeling of a sandwich panel with equal face sheets and a central core. * Remark 14: Element output for the SMEAR and SMCORE options is produced using the PARAM NOCOMPS -1 methodology that suppresses ply stress/strain results and prints results for the equivalent homogeneous element.
- property MappingSuccessful: bool#
- property NSM: float#
Nonstructural mass per unit area. (Real)
- property PID: int#
Property identification number. (0 < Integer < 10000000)
- property RawContent: str#
- property SB: float#
Allowable shear stress of the bonding material (allowable interlaminar shear stress). Required if FT is also specified. (Real > 0.0)
- property SectionInfo: object#
- property TREF: float#
Reference temperature. See Remark 3. (Real; Default = 0.0) * Remark 3: The TREF specified on the material entries referenced by plies are not used. Instead TREF on the PCOMP entry is used for all plies of the element.If not specified, it defaults to “0.0.” If the PCOMP references temperature dependent material properties, then the TREF given on the PCOMP will be used as the temperature to determine material properties. TEMPERATURE Case Control commands are ignored for deriving the equivalent PSHELL and MAT2 entries used to describe the composite element. If for a nonlinear static analysis the parameter COMPMATT is set to YES, the temperature at the current load step will be used to determine temperature dependent material properties for the plies and the equivalent PSHELL and MAT2 entries for the composite element.The TREF on the PCOMP entry will be used for the initial thermal strain on the composite element and the stresses on the individual plies.If the parameter EPSILONT is also set to INTEGRAL,TREF is not applicable.
- property Z0: float#
Distance from the reference plane to the bottom surface. See Remark 10. (Real; Default = -0.5 times the element thickness.) * Remark 10: If the value specified for Z0 is not equal to -0.5 times the thickness of the element and PARAM,NOCOMPS,-1 is specified, then the homogeneous element stresses are incorrect, while element forces and strains are correct. For correct homogeneous stresses, use ZOFFS on the corresponding connection entry.
PCOMPOPT#
- class NaxToPy.Core.Classes.N2PNastranInputData.PCOMPOPT(cardinfo)[source]#
Bases:
N2PCard- GetNumberOfPlies() int[source]#
Gets the number of plies that make up this composite laminate, accounting for symmetric effects. For standard laminates: Returns a positive integer representing the number of plies defined in the card. For symmetric laminates (LAM=SYM): Returns a negative integer whose absolute value equals the number of plies defined in the card. This negative value indicates that the actual physical laminate has twice as many plies, since the solver mirrors the defined plies. Returns 0 if no plies have been defined or if the ply arrays haven’t been initialized.
- GetPlyMaterialId(plyIndex: int) int[source]#
Gets the Material ID (MIDi) for the specified ply. According to the PCOMP Documentation, MID1 must be specified, while subsequent MIDs can be blank. When blank, a ply’s material ID defaults to the last explicitly defined material ID. 1-based index of the ply (1 = first ply at bottom of laminate). The material ID as a nullable integer. Returns null if the ply’s MID is blank. Returns null if the ply index is invalid or ply arrays haven’t been initialized.
- GetPlyOrientation(plyIndex: int) float[source]#
Gets the Orientation Angle (THETAi) for the specified ply. According to the PCOMP Documentation, this field can be blank for any ply, defaulting to 0.0. The angle defines the orientation of the ply’s longitudinal direction relative to the element’s material axis. 1-based index of the ply (1 = first ply at bottom of laminate). The orientation angle as a nullable float in degrees. Returns null if the ply’s angle is blank (default 0.0). Returns null if the ply index is invalid or ply arrays haven’t been initialized.
- GetPlyOutputRequest(plyIndex: int) str[source]#
Gets the Stress/Strain Output Request (SOUTi) for the specified ply. According to the PCOMP Documentation, this field can be “YES”, “NO”, or blank (defaulting to “NO”). This controls whether stress/strain results are calculated and made available for output for this ply. 1-based index of the ply (1 = first ply at bottom of laminate). The output request as a string “YES”, “NO”, or null if blank. Returns null if the ply index is invalid or ply arrays haven’t been initialized.
- GetPlyThickness(plyIndex: int) float[source]#
Gets the Thickness (Ti) for the specified ply. According to the PCOMP Documentation, T1 must be specified, while subsequent thicknesses can be blank. When blank, a ply’s thickness defaults to the last explicitly defined thickness. 1-based index of the ply (1 = first ply at bottom of laminate). The thickness as a nullable float. Returns null if the ply’s thickness is blank. Returns null if the ply index is invalid or ply arrays haven’t been initialized.
- SetPlyMaterialId(plyIndex: int, midValue: int) None[source]#
Sets only the Material ID (MIDi) for a specific ply. According to the PCOMP Documentation, MID1 must be specified (not null), while subsequent MIDs can be blank (in which case they inherit from the last defined MID). 1-based index of the ply (1 = first ply at bottom of laminate) Material ID value to set, or null to indicate blank (inheritance from previous ply). Must refer to a valid MAT1, MAT2, MAT8, or MATDIGI entry.
- SetPlyOrientation(plyIndex: int, thetaValue: float) None[source]#
Sets only the Orientation Angle (THETAi) for a specific ply. According to the PCOMP Documentation, this field can be blank for any ply, defaulting to 0.0. The angle is measured in degrees and defines the orientation of the ply’s longitudinal direction relative to the element’s material axis. 1-based index of the ply (1 = first ply at bottom of laminate). Orientation angle to set in degrees, or null to indicate blank/default (0.0).
- SetPlyOutputRequest(plyIndex: int, soutValue: str) bool[source]#
Sets only the Stress/Strain Output Request (SOUTi) for a specific ply. According to the PCOMP Documentation, this field can be “YES”, “NO”, or blank (defaulting to “NO”). This controls whether stress/strain results are calculated and available for output for this ply. 1-based index of the ply (1 = first ply at bottom of laminate). Boolean value indicating output request: true for “YES”, false for “NO”, or null to indicate blank (default “NO”).
- SetPlyThickness(plyIndex: int, thicknessValue: float) None[source]#
Sets only the Thickness (Ti) for a specific ply. According to the PCOMP Documentation, T1 must be specified (not null) and > 0.0, while subsequent thicknesses can be blank (in which case they inherit from the last defined T). 1-based index of the ply (1 = first ply at bottom of laminate). Thickness value to set, or null to indicate blank (inheritance from previous ply). When specified, must be greater than 0.0.
- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property FT: str#
Failure theory. The following theories are allowed (Character or blank. If blank, then no failure calculation will be performed) See Remark 7. “HILL” for the Hill theory. “HOFF” for the Hoffman theory. “TSAI” for the Tsai-Wu theory. “STRN” for the Maximum Strain theory. * Remark 7: In order to get failure index output the following must be present: a.ELSTRESS or ELSTRAIN Case Control commands, b. SB, FT, and SOUTi on the PCOMP Bulk Data entry, c. Xt, Xc, Yt, Yc, and S on all referenced MAT8 Bulk Data entries if stress allowables are used, or Xt, Xc, Yt, S, and STRN = 1.0 if strain allowables are used.
- property FieldsFormat: str#
- property GE: float#
Damping coefficient. See Remarks 4. and 12. (Real; Default = 0.0) * Remark 4: GE given on the PCOMP entry will be used for the element and the values supplied on material entries for individual plies are ignored.The user is responsible for supplying the equivalent damping value on the PCOMP entry.If PARAM, W4 is not specified GE is ignored in transient analysis. See “Parameters” on page 631. * Remark 12: To obtain the damping coefficient GE, multiply the critical damping ratio C ⁄ C0 by 2.0.
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property LAM: str#
Laminate Options. (Character or blank, Default = blank). See Remarks 13. and 14. “Blank” All plies must be specified and all stiffness terms are developed. “SYM” Only plies on one side of the element centerline are specified. The plies are numbered starting with 1 for the bottom layer.If an odd number of plies are desired, the center ply thickness (T1) should be half the actual thickness. “MEM” All plies must be specified, but only membrane terms (MID1 on the derived PSHELL entry) are computed. “BEND” All plies must be specified, but only bending terms (MID2 on the derived PSHELL entry) are computed. “SMEAR” All plies must be specified, stacking sequence is ignored MID1 = MID2 on the derived PSHELL entry and MID3, MID4 and TS/T and 12I/T**3 terms are set as blanks). “SMCORE”All plies must be specified, with the last ply specifying core properties and the previous plies specifying face sheet properties. The stiffness matrix is computed by placing half the face sheet thicknesses above the core and the other half below with the result that the laminate is symmetric about the midplane of the core.Stacking sequence is ignored in calculating the face sheet stiffness. * Remark 13: The SYM option for the LAM option computes the complete stiffness properties while specifying half the plies.The MEM, BEND, SMEAR and SMCORE options provide special purpose stiffness calculations.SMEAR ignores stacking sequence and is intended for cases where this sequence is not yet known, stiffness properties are smeared. SMCORE allows simplified modeling of a sandwich panel with equal face sheets and a central core. * Remark 14: Element output for the SMEAR and SMCORE options is produced using the PARAM NOCOMPS -1 methodology that suppresses ply stress/strain results and prints results for the equivalent homogeneous element.
- property MappingSuccessful: bool#
- property NSM: float#
Nonstructural mass per unit area. (Real)
- property PID: int#
Property identification number. (0 < Integer < 10000000)
- property RawContent: str#
- property SB: float#
Allowable shear stress of the bonding material (allowable interlaminar shear stress). Required if FT is also specified. (Real > 0.0)
- property SectionInfo: object#
- property TREF: float#
Reference temperature. See Remark 3. (Real; Default = 0.0) * Remark 3: The TREF specified on the material entries referenced by plies are not used. Instead TREF on the PCOMP entry is used for all plies of the element.If not specified, it defaults to “0.0.” If the PCOMP references temperature dependent material properties, then the TREF given on the PCOMP will be used as the temperature to determine material properties. TEMPERATURE Case Control commands are ignored for deriving the equivalent PSHELL and MAT2 entries used to describe the composite element. If for a nonlinear static analysis the parameter COMPMATT is set to YES, the temperature at the current load step will be used to determine temperature dependent material properties for the plies and the equivalent PSHELL and MAT2 entries for the composite element.The TREF on the PCOMP entry will be used for the initial thermal strain on the composite element and the stresses on the individual plies.If the parameter EPSILONT is also set to INTEGRAL,TREF is not applicable.
- property Z0: float#
Distance from the reference plane to the bottom surface. See Remark 10. (Real; Default = -0.5 times the element thickness.) * Remark 10: If the value specified for Z0 is not equal to -0.5 times the thickness of the element and PARAM,NOCOMPS,-1 is specified, then the homogeneous element stresses are incorrect, while element forces and strains are correct. For correct homogeneous stresses, use ZOFFS on the corresponding connection entry.
PELAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.PELAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property FieldsFormat: str#
- property GE1: float#
Damping coefficient, . See Remarks 5. and 6. (Real)
- property GE2: float#
Damping coefficient, . See Remarks 5. and 6. (Real)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property K1: float#
Elastic property value. (Real)
- property K2: float#
Elastic property value. (Real)
- property MappingSuccessful: bool#
- property PID1: int#
Property identification number. (Integer > 0)
- property PID2: int#
Property identification number. (Integer > 0)
- property RawContent: str#
- property S1: float#
Stress coefficient. (Real)
- property S2: float#
Stress coefficient. (Real)
- property SectionInfo: object#
PFAST#
- class NaxToPy.Core.Classes.N2PNastranInputData.PFAST(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property ALPHA: float#
Thermal expansion coefficient for the CFAST.(Real; Default=0.0)
- property BdfFile: str#
- property BdfFilePath: str#
- property COINL: float#
Length of a CFAST with coincident grids. (Real; Default=0.0, COINL ≥ 0.0)
- property CardType: str#
- property D: float#
- property FieldsFormat: str#
- property GE: float#
Structural damping
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property KR1: float#
- property KR2: float#
- property KR3: float#
- property KT1: float#
- property KT2: float#
- property KT3: float#
- property MASS: float#
- property MCID: int#
- property MFLAG: int#
MCID
- property MappingSuccessful: bool#
- property PID: int#
Property identification number. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
- property TREF: float#
Reference temperature for the calculation of thermal loads. (Real; Default=0.0)
PGAPNAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.PGAPNAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property F0: float#
Preload
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property KA: float#
Axial stiffness for the closed gap; i.e., Ua - Ub > U0 (Real > 0.0)
- property KB: float#
Axial stiffness for the opening gap. Ua - Ub < U0 (Real > 0.0; Default = 10^-14 * KA)
- property KT: float#
Transverse stiffness when the gap is closed. It is recommended that KT >= 0.1 * KA. (Real > 0.0; Default = MU1 * KA)
- property MAR: float#
Maximum allowable adjustment ratio for adaptive penalty values KA and KT.(Real; Default = 0.0)
- property MU1: float#
Coefficient of static friction for the adaptive gap element or coefficient of friction in the y transverse direction for the nonadaptive gap element (Real >= 0.0; Default = 0.0)
- property MU2: float#
Coefficient of kinetic friction for the adaptive gap element or coefficient of friction in the z transverse direction for the nonadaptive gap element. (Real >= 0.0 for the adaptive gap element, MU2 <= MU1; Default = MU1)
- property MappingSuccessful: bool#
- property PID: int#
Property identification number. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
- property TMAX: float#
Maximum allowable penetration used in the adjustment of penalty values. The positive value activates the penalty value adjustment. (Real; Default = 0.0)
- property TRMIN: float#
Fraction of TMAX defining the lower bound for the allowable penetration. (0.0 < Real < 1.0; Default = 0.001)
- property U0: float#
Initial gap opening. (Real)
PLOAD4NAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.PLOAD4NAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CID: int#
Coordinate system identification number. (Integer >= 0; Default = 0)
- property CardType: str#
- property EID: int#
Element identification number. (Integer > 0)
- property EID1: int#
Element identification number. (Integer > 0)
- property EID2: int#
Element identification number. (Integer > 0)
- property FieldsFormat: str#
- property G1: int#
Identification number of a grid point connected to a corner of the face. Required data for solid elements only. (Integer > 0 or blank)
- property G3_or_G4: int#
Identification number of a grid point
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property LDIR: str#
Denote the direction of the line load (SORL=LINE), character string X, Y, Z, TANG, or NORM. The default is NORM.
- property MappingSuccessful: bool#
- property N1: float#
Identification number of a grid point connected to a corner of the face. Required data for solid elements only. (Integer > 0 or blank)
- property N2: float#
Identification number of a grid point connected to a corner of the face. Required data for solid elements only. (Integer > 0 or blank)
- property N3: float#
Identification number of a grid point connected to a corner of the face. Required data for solid elements only. (Integer > 0 or blank)
- property P1: float#
Load per unit surface area (pressure) at the corners of the face of the element. (Real or blank; Default for P2, P3, and P4 is P1.)
- property P2: float#
Load per unit surface area (pressure) at the corners of the face of the element. (Real or blank; Default for P2, P3, and P4 is P1.)
- property P3: float#
Load per unit surface area (pressure) at the corners of the face of the element. (Real or blank; Default for P2, P3, and P4 is P1.)
- property P4: float#
Load per unit surface area (pressure) at the corners of the face of the element. (Real or blank; Default for P2, P3, and P4 is P1.)
- property RawContent: str#
- property SID: int#
Load set identification number. (Integer > 0)
- property SORL: str#
The character string SURF or LINE. SURF means the surface load acting on the surface of the element and LINE means the consistent edge loads acting on the edges of the element. The default is SURF.
- property SectionInfo: object#
PLOTEL#
PLPLANE#
PMASS#
PROD#
- class NaxToPy.Core.Classes.N2PNastranInputData.PROD(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property A: float#
Area of bar cross section. (Real)
- property BdfFile: str#
- property BdfFilePath: str#
- property C: float#
Coefficient to determine torsional stress. (Real; Default = 0.0)
- property CardType: str#
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property J: float#
Torsional constant.
- property MID: int#
Material identification number. (Integer > 0)
- property MappingSuccessful: bool#
- property NSM: float#
Nonstructural mass per unit length. (Real)
- property PID: int#
Property identification number. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
PSHEAR#
PSHELLNAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.PSHELLNAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property FieldsFormat: str#
- property INERTIA: float#
Bending moment of inertia ratio, 12I T⁄ 3. Ratio of the actual bending moment inertia of the shell, I, to the bending moment of inertia of a homogeneous shell, T3 ⁄ 12. The default value is for a homogeneous shell. (Real > 0.0; Default = 1.0)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MID1: int#
Material identification number for the membrane. (Integer >= 0 or blank)
- property MID2: int#
Material identification number for bending. (Integer >= -1 or blank)
- property MID3: int#
Material identification number for transverse shear. (Integer > 0 or blank; unless MID2 > 0, must be blank.)
- property MID4: int#
Material identification number for membrane-bending coupling. See Remarks 6. and 13. (Integer > 0 or blank, must be blank unless MID1 > 0 and MID2 > 0, may not equal MID1 or MID2.) * Remark 6: The following should be considered when using MID4. The MID4 field should be left blank if the material properties are symmetric with respect to the middle surface of the shell.If the element centerline is offset from the plane of the grid points but the material properties are symmetric, the preferred method for modeling the offset is by use of the ZOFFS field on the connection entry. Although the MID4 field may be used for this purpose, it may produce ill-conditioned stiffness matrices (negative terms on factor diagonal) if done incorrectly. Only one of the options MID4 or ZOFFS should be used; if both methods are specified the effects are cumulative.Since this is probably not what the user intented, unexpected answers will result. Note that the mass properties are not modified to reflect the existence of the offset when the ZOFFS and MID4 methods are used.If the weight or mass properties of an offset plate are to be used in ananalysis, the RBAR method must be used to represent the offset. See “Shell Elements (CTRIA3, CTRIA6, CTRIAR, CQUAD4, CQUAD8, CQUADR)” on page 131 of the MSC.Nastran Reference Guide. The effects of MID4 are not considered in the calculation of differential stiffness.Therefore, it is recommended that MID4 be left blank in buckling analysis. * Remark 13: For the CQUADR and CTRIAR elements, the MID4 field should be left blankbecause their formulation does not include membrane-bending coupling.
- property MappingSuccessful: bool#
- property NSM: float#
Nonstructural mass per unit area. (Real)
- property PID: int#
Property identification number. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
- property T: float#
Default membrane thickness for Ti on the connection entry. If T is blank then the thickness must be specified for Ti on the CQUAD4, CTRIA3, CQUAD8, and CTRIA6 entries. (Real or blank)
- property TsT: float#
Transverse shear thickness ratio, . Ratio of the shear thickness, to the membrane thickness of the shell, T.The default value is for a homogeneous shell. (Real > 0.0; Default = .833333)
- property Z1: float#
Fiber distances for stress calculations. The positive direction is determined by the right-hand rule, and the order in which the grid points are listed on the connection entry.See Remark 11. for defaults. (Real or blank) * Remark 11: The default for Z1 is -T/2, and for Z2 is +T/2. T is the local plate thickness defined either by T on this entry or by membrane thicknesses at connected grid points, if they are input on connection entries.
- property Z2: float#
PSHELLOPT#
- class NaxToPy.Core.Classes.N2PNastranInputData.PSHELLOPT(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property FieldsFormat: str#
- property INERTIA: float#
Bending moment of inertia ratio, 12I T⁄ 3. Ratio of the actual bending moment inertia of the shell, I, to the bending moment of inertia of a homogeneous shell, T3 ⁄ 12. The default value is for a homogeneous shell. (Real > 0.0; Default = 1.0)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MID1: int#
Material identification number for the membrane. (Integer >= 0 or blank)
- property MID2: int#
Material identification number for bending. (Integer >= -1 or blank)
- property MID3: int#
Material identification number for transverse shear. (Integer > 0 or blank; unless MID2 > 0, must be blank.)
- property MID4: int#
Material identification number for membrane-bending coupling. See Remarks 6. and 13. (Integer > 0 or blank, must be blank unless MID1 > 0 and MID2 > 0, may not equal MID1 or MID2.) * Remark 6: The following should be considered when using MID4. The MID4 field should be left blank if the material properties are symmetric with respect to the middle surface of the shell.If the element centerline is offset from the plane of the grid points but the material properties are symmetric, the preferred method for modeling the offset is by use of the ZOFFS field on the connection entry. Although the MID4 field may be used for this purpose, it may produce ill-conditioned stiffness matrices (negative terms on factor diagonal) if done incorrectly. Only one of the options MID4 or ZOFFS should be used; if both methods are specified the effects are cumulative.Since this is probably not what the user intented, unexpected answers will result. Note that the mass properties are not modified to reflect the existence of the offset when the ZOFFS and MID4 methods are used.If the weight or mass properties of an offset plate are to be used in ananalysis, the RBAR method must be used to represent the offset. See “Shell Elements (CTRIA3, CTRIA6, CTRIAR, CQUAD4, CQUAD8, CQUADR)” on page 131 of the MSC.Nastran Reference Guide. The effects of MID4 are not considered in the calculation of differential stiffness.Therefore, it is recommended that MID4 be left blank in buckling analysis. * Remark 13: For the CQUADR and CTRIAR elements, the MID4 field should be left blankbecause their formulation does not include membrane-bending coupling.
- property MappingSuccessful: bool#
- property NSM: float#
Nonstructural mass per unit area. (Real)
- property PID: int#
Property identification number. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
- property T: float#
Default membrane thickness for Ti on the connection entry. If T is blank then the thickness must be specified for Ti on the CQUAD4, CTRIA3, CQUAD8, and CTRIA6 entries. (Real or blank)
- property TsT: float#
Transverse shear thickness ratio, . Ratio of the shear thickness, to the membrane thickness of the shell, T.The default value is for a homogeneous shell. (Real > 0.0; Default = .833333)
- property Z1: float#
Fiber distances for stress calculations. The positive direction is determined by the right-hand rule, and the order in which the grid points are listed on the connection entry.See Remark 11. for defaults. (Real or blank) * Remark 11: The default for Z1 is -T/2, and for Z2 is +T/2. T is the local plate thickness defined either by T on this entry or by membrane thicknesses at connected grid points, if they are input on connection entries.
- property Z2: float#
PSOLIDNAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.PSOLIDNAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CORDM: int#
Identification number of a MAT1, MAT4, MAT5, MAT9, or MAT10 entry. (Integer > 0)
- property CardType: str#
- property FCTN: str#
“PFLUID” indicates a fluid element, “SMECH” indicates a structural element; Default = “SMECH.”)
- Type:
Fluid element flag. (Character
- property FieldsFormat: str#
- property IN: str#
Integration network. See Remarks 5., 6., 7., and 9. (Integer, Character, or blank)
- property ISOP: str#
Integration scheme. See Remarks 5., 6., 7., and 9. (Integer, Character, or blank)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MID: int#
Identification number of a MAT1, MAT4, MAT5, MAT9, or MAT10 entry. (Integer > 0)
- property MappingSuccessful: bool#
- property PID: int#
Property identification number. (Integer > 0)
- property RawContent: str#
- property STRESS: str#
Location selection for stress output. See Remarks 8. and 9. (Integer, Character, or blank)
- property SectionInfo: object#
PSOLIDOPT#
- class NaxToPy.Core.Classes.N2PNastranInputData.PSOLIDOPT(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CORDM: int#
Identification number of a MAT1, MAT4, MAT5, MAT9, or MAT10 entry. (Integer > 0)
- property CardType: str#
- property FCTN: str#
“PFLUID” indicates a fluid element, “SMECH” indicates a structural element; Default = “SMECH.”)
- Type:
Fluid element flag. (Character
- property FieldsFormat: str#
- property IN: str#
Integration network. See Remarks 5., 6., 7., and 9. (Integer, Character, or blank)
- property ISOP: str#
Integration scheme. See Remarks 5., 6., 7., and 9. (Integer, Character, or blank)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MID: int#
Identification number of a MAT1, MAT4, MAT5, MAT9, or MAT10 entry. (Integer > 0)
- property MappingSuccessful: bool#
- property PID: int#
Property identification number. (Integer > 0 or string)
- property RawContent: str#
- property STRESS: str#
Location selection for stress output. See Remarks 8. and 9. (Integer, Character, or blank)
- property SectionInfo: object#
PWELD#
- class NaxToPy.Core.Classes.N2PNastranInputData.PWELD(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property D: float#
Diameter of the connector. (Real > 0.0)
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property LDMAX: float#
Active ONLY for “PARAM,OLDWELD,YES”. Largest ratio of length to diameter for stiffness calculation, see Remark 4.
- property LDMIN: float#
Active ONLY for “PARAM,OLDWELD,YES”. Smallest ratio of length to diameter for stiffness calculation, see Remark 4.
- property MID: int#
Material identification number. (Integer > 0)
- property MSET: str#
Active ONLY for “PARAM,OLDWELD,YES”. Flag to eliminate m-set degrees-of-freedom (DOFs). The MSET parameter has no effect in a nonlinear SOL 400 analysis. =OFF m-set DOFs are eliminated, constraints are incorporated in the stiffness, see Remark 2. =ON m-set DOFs are not eliminated, constraints are generated.
- property MappingSuccessful: bool#
- property PID: int#
Property identification number. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
- property TYPE: str#
Character string indicating the type of connection, see Remarks 3. and 4. =blank general connector = “SPOT” spot weld connector
RBAR#
- class NaxToPy.Core.Classes.N2PNastranInputData.RBAR(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property ALPHA: float#
Thermal expansion coefficient.(Real > 0.0 or blank)
- property BdfFile: str#
- property BdfFilePath: str#
- property CMA: int#
Component numbers of dependent degrees-of-freedom in the global coordinate system assigned by the element at grid points GA and GB. (Integers 1 through 6 with no embedded blanks, or zero or blank.)
- property CMB: int#
Component numbers of dependent degrees-of-freedom in the global coordinate system assigned by the element at grid points GA and GB. (Integers 1 through 6 with no embedded blanks, or zero or blank.)
- property CNA: [<class 'int'>]#
Component numbers of independent degrees-of-freedom in the global coordinate system for the element at grid points GA and GB. (Integers 1 through 6 with no embedded blanks, or zero or blank.)
- property CNB: int#
Component numbers of independent degrees-of-freedom in the global coordinate system for the element at grid points GA and GB. (Integers 1 through 6 with no embedded blanks, or zero or blank.)
- property CardType: str#
- property EID: int#
Element identification number. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property GA: int#
Grid point identification number of connection points. (Integer > 0) GA
- property GB: int#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SectionInfo: object#
- property TREF: float#
Reference temperature for the calculation of thermal loads. (Real; Default=0.0)
RBAR1#
RBE1#
- class NaxToPy.Core.Classes.N2PNastranInputData.RBE1(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property ALPHA: float#
Thermal expansion coefficient. See Remark 13. (Real > 0.0 or blank) * Remark 13: For the Lagrange method, the thermal expansion effect will be computed, if user supplies the thermal expansion coefficient ALPHA, and the thermal load is requested by the TEMPERATURE(INITIAL) and TEMPERATURE(LOAD) Case Control commands.The temperature of the element is taken as follows: the temperature of the bar connecting the grid point GN1 and any dependent grid point are taken as the average temperature of the two connected grid points.
- property BdfFile: str#
- property BdfFilePath: str#
- property CMI: list[int]#
Dependent degrees-of-freedom in the global coordinate system at grid point(s) GMj. (Integers 1 through 6 with no embedded blanks.)
- property CNI: list[int]#
Independent degrees-of-freedom in the global coordinate system for the rigid element at grid point(s) GNi. See Remark 1. (Integers 1 through 6 with no embedded blanks.) * Remark 1: Two methods are available to process rigid elements: equation elimination or Lagrange multipliers. The Case Control command, RIGID, selects the method.
- property CardType: str#
- property EID: int#
Element identification number. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property GMI: list[int]#
Grid points at which dependent degrees-of-freedom are assigned. (Integer > 0)
- property GNI: list[int]#
Grid points at which independent degrees-of-freedom for the element are assigned. (Integer > 0)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SectionInfo: object#
- property TREF: float#
Reference temperature for the calculation of thermal loads. (Real; Default=0.0)
RBE2#
- class NaxToPy.Core.Classes.N2PNastranInputData.RBE2(cardinfo)[source]#
Bases:
N2PCard- add_dependent_grid_point(grid_point_id: int) None[source]#
Adds a new dependent grid point to the end of GMI, enforcing uniqueness and positive value.
- clear_dependent_grid_points() None[source]#
Empties GMI.
A card created from scratch does not come empty: it brings grid point positions carrying the error sentinel, and a single one of them left behind makes the card invalid. This is the way to get rid of them before adding the real ones.
- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_dependent_grid_point(position: int) int[source]#
Gets the dependent grid point at the specified position. Index starts in 1 (GM1, GM2, GM3…).
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- remove_dependent_grid_point(position: int) None[source]#
Removes the dependent grid point at the specified position. Index starts in 1.
- restore_card() None#
Restores a card previously deleted
- set_dependent_grid_point(position: int, grid_point_id: int) None[source]#
Replaces, in place, the dependent grid point at the specified position. Index starts in 1.
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property ALPHA: float#
Thermal expansion coefficient. See Remark 11. (Real > 0.0 or blank) * Remark 11: For the Lagrange method, the thermal expansion effect will be computed, if user supplies the thermal expansion coefficient ALPHA, and the thermal load is requested by the TEMPERATURE(INITIAL) and TEMPERATURE(LOAD) Case Control commands.The temperature of the element is taken as follows: the temperature of the bar connecting the grid point GN and any dependent grid point are taken as the average temperature of the two connected grid points.
- property BdfFile: str#
- property BdfFilePath: str#
- property CM: int#
Component numbers of the dependent degrees-of-freedom in the global coordinate system at grid points GMi. (Integers 1 through 6 with no embedded blanks.)
- property CardType: str#
- property DependentGridPointCount: int#
Number of dependent grid points, that is, the length of GMI. More efficient than len(GMI) because it does not create a defensive copy.
- property EID: int#
Element identification number. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property GMI: list[int]#
Grid point identification numbers at which dependent degrees-offreedom are assigned. (Integer > 0)
- property GN: int#
Identification number of grid point to which all six independent degrees-of-freedom for the element are assigned. (Integer > 0)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SectionInfo: object#
- property TREF: float#
Reference temperature for the calculation of thermal loads. (Real; Default=0.0)
RBE3#
- class NaxToPy.Core.Classes.N2PNastranInputData.RBE3(cardinfo)[source]#
Bases:
N2PCard- add_grid_point_to_group(group: int, grid_point_id: int) None[source]#
Adds a grid point to an existing weight group, which makes it share its weighting factor. Index starts in 1.
- add_user_mset_pair(grid_point_id: int, components: int) None[source]#
Adds a new grid point and component pair to the m-set of the card.
- add_weight_group(weight_factor: float, components: int, grid_points: list[int]) int[source]#
Adds a new weight group at the end of the card.
A group holds a single weighting factor, so every grid point that carries a different weight needs a group of its own.
- Parameters:
weight_factor – weighting factor of the group.
components – component numbers the factor applies to.
grid_points – grid points of the group. A single ID is also accepted.
- Returns:
index of the group created. Index starts in 1.
- Return type:
int
Example
>>> rbe3.add_weight_group(0.63, 123, [11, 12, 13])
- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_component_specification(group: int) int[source]#
Gets the component numbers of a weight group. Index starts in 1.
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_grid_point(group: int, position: int) int[source]#
Gets one grid point of a weight group. Both indices start in 1.
- get_grid_points(group: int) list[int][source]#
Gets the grid points of a weight group. Index starts in 1. Returns a copy to prevent external modification of internal state.
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- get_user_mset_component(position: int) int[source]#
Gets the component numbers of a m-set pair, that is, CMi. Index starts in 1.
- get_user_mset_grid_point(position: int) int[source]#
Gets the grid point of a m-set pair, that is, GMi. Index starts in 1.
- get_weight_factor(group: int) float[source]#
Gets the weighting factor of a weight group. Index starts in 1.
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- remove_user_mset_pair(position: int) None[source]#
Removes the m-set pair at the specified position. Index starts in 1.
- remove_weight_group(group: int) None[source]#
Removes a weight group. Index starts in 1. The groups after it move one position up, so removing several of them is done by always removing the same index.
- restore_card() None#
Restores a card previously deleted
- set_component_specification(group: int, components: int) None[source]#
Sets the component numbers of a weight group. Index starts in 1.
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_grid_point(group: int, position: int, grid_point_id: int) None[source]#
Replaces, in place, one grid point of a weight group. Both indices start in 1.
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- set_user_mset_component(position: int, components: int) None[source]#
Sets the component numbers of a m-set pair, that is, CMi. Index starts in 1.
- set_user_mset_grid_point(position: int, grid_point_id: int) None[source]#
Sets the grid point of a m-set pair, that is, GMi. Index starts in 1.
- set_weight_factor(group: int, weight_factor: float) None[source]#
Sets the weighting factor of a weight group. Index starts in 1.
- uncomment_card() None#
Uncomment a card previously commented
- property ALPHA: float#
Thermal expansion coefficient. See Remark 14. (Real > 0.0 or blank) * Remark 13: For the Lagrange method, the thermal expansion effect will be computed, if user supplies the thermal expansion coefficient ALPHA, and the thermal load is requested by the TEMPERATURE(INITIAL) and TEMPERATURE(LOAD) Case Control commands.The temperature of the element is taken as follows: the temperature of the bar connecting the reference grid point REFGRID and any other grid point Gij are taken as the average temperature of the two connected grid points.
- property BdfFile: str#
- property BdfFilePath: str#
- property CMI: list[int]#
Component numbers of GMi to be assigned to the m-set. (Any of the Integers 1 through 6 with no embedded blanks.)
- property CardType: str#
- property ComponentSpecifications: list[int]#
Component numbers with weighting factor WTi at grid points Gi,j. (Any of the integers 1 through 6 with no embedded blanks.)
- property EID: int#
Element identification number. Unique with respect to all elements. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property GMI: list[int]#
Identification numbers of grid points with degrees-of-freedom in the m-set. (Integer > 0)
- property GridPointsByGroup: list[list[int]]#
Grid points with components Ci that have weighting factor WTi in the averaging equations. (Integer > 0)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property REFC: int#
Component numbers at the reference grid point. (Any of the integers 1 through 6 with no embedded blanks.)
- property REFGRID: int#
Reference grid point identification number. (Integer > 0)
- property RawContent: str#
- property SectionInfo: object#
- property TREF: float#
Reference temperature for the calculation of thermal loads. (Real; Default=0.0)
- property UserMSetPairCount: int#
Number of grid point and component pairs of the m-set, that is, the length of GMI and CMI.
- property WeightFactors: list[float]#
Weighting factor for components of motion on the following entry at grid points Gi,j. (Real)
- property WeightGroupCount: int#
Number of weight groups of the card. Every group holds one weighting factor, one component specification and the grid points they apply to.
RSPLINE#
- class NaxToPy.Core.Classes.N2PNastranInputData.RSPLINE(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_grid_point_constraint(index: int, value: int) None[source]#
Sets the component constraint at the specified index.
- set_grid_point_id(index: int, value: int) None[source]#
Sets the grid point identification number at the specified index.
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property DiameterToLengthRatio: float#
Ratio of the diameter of the elastic tube to the sum of the lengths of all segments. (Real > 0.0; Default = 0.1)
- property EID: int#
Element identification number. (0 < Integer < 100,000,000)
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SectionInfo: object#
SETOPT#
- class NaxToPy.Core.Classes.N2PNastranInputData.SETOPT(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- replace_all_entity_ids(new_entity_ids: list[int], validate_ids: bool = True) None[source]#
Replaces the entire sequence of entity IDs with a new list.
- Parameters:
new_entity_ids – The new entity IDs to set. Pass an empty list to clear the sequence.
validate_ids – If
True(default), validates each ID against the range constraints for the current entity type. IfFalse, accepts all values without validation.
Example
>>> card.replace_all_entity_ids([1001, 1002, 1003]) >>> card.replace_all_entity_ids([]) # Clears the sequence
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EntityIDs: list[int]#
Gets a copy of the expanded entity ID sequence.
- property ExcludedEntityIds: list[int]#
Gets a copy of the excluded entity ID list (ALL EXCEPT mode only).
- property FieldsFormat: str#
- property HasAllEntities: bool#
Indicates whether the SET uses the ALL keyword (all entities of the specified TYPE). When true, EntityIds returns null because the list cannot be expanded without model knowledge.
- property IsAllExceptMode: bool#
Indicates whether the SET uses the ALL EXCEPT pattern. When true, use ExcludedEntityIds to get the list of IDs to exclude.
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsOperator: bool#
Returns True if the set definition is a boolean operator, False otherwise.
- property IsSubtype: bool#
Indicates whether the current SubtypeOrOperator value is a SUBTYPE (LIST, BBOX, PROP, etc.).
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SID: int#
Set Identification number
- property SectionInfo: object#
- property SubtypeOrOperator: Literal['LIST', 'BBOX', 'PROP', 'MAT', 'ELTYPE', 'ELEM', 'DMIG', 'OR', 'AND', 'NOT', 'MINUS']#
Gets or sets the method of set definition (SUBTYPE) or boolean operation (OPERATOR).
- SUBTYPE VALUES (define how the set membership is determined):
LIST (default): Direct list of entity IDs with optional range keywords (THRU, EXCEPT, ALL)
BBOX: Bounding box defined by coordinates (not supported by this library)
PROP: Elements by property ID reference
MAT: Elements by material ID reference
ELTYPE: Elements by element type name (not supported by this library)
ELEM: Grids belonging to specified elements
DMIG: Entities from DMIG matrices (not supported by this library)
- OPERATOR VALUES (define boolean combinations of other SETs):
OR: Union of listed sets (1 or more SIDs allowed)
AND: Intersection of listed sets (1 or more SIDs allowed)
NOT: Complement of a single set (exactly 1 SID required)
MINUS: Difference of two sets (exactly 2 SIDs required)
- property Type: Literal['GRID', 'ELEM', 'RIGID', 'GRIDC', 'DESVAR', 'MODE', 'FREQ', 'TIME', 'LABEL', 'PLY', 'SUBSYS']#
Gets or sets the entity type contained in the set.
Valid values: GRID, ELEM, RIGID, GRIDC, DESVAR, MODE, FREQ, TIME, LABEL, PLY, SUBSYS.
SET1NAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.SET1NAS(cardinfo)[source]#
Bases:
N2PCard- add_entity_id(entity_id: int) None[source]#
Adds a new entity ID to the end of the list, enforcing uniqueness and positive value.
- comment_card() None#
Comments the card adding a $ when writing the files
- contains_entity_id(entity_id: int) bool[source]#
Determines whether the entity ID list contains the specified ID.
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- remove_entity_id(entity_id: int) None[source]#
Removes the first occurrence of the specified entity ID from the list.
- replace_all_entity_ids(new_entity_ids: list[int]) None[source]#
Replaces the entire entity ID list with a new set of IDs. Automatically removes duplicates and validates all values. Can transition from SKIN mode to IDs mode. This is the only method that clears contextual parsing errors (THRU grammar violations from initial parsing).
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EntityIds: list[int]#
Gets the expanded array of structural grid point or element IDs (IDs mode only). Returns a copy to prevent external modification of internal state.
- property FieldsFormat: str#
- property HasExplicitList: bool#
Indicates whether the SET1 card uses an explicit list of entity IDs (standard mode). When true, the entity IDs are available via the EntityIds property.
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SID: int#
Identification number of the single-point constraint set
- property SectionInfo: object#
SET1OPT#
- class NaxToPy.Core.Classes.N2PNastranInputData.SET1OPT(cardinfo)[source]#
Bases:
N2PCard- add_entity_id(entity_id: int) None[source]#
Adds a new entity ID to the end of the list, enforcing uniqueness and positive value.
- comment_card() None#
Comments the card adding a $ when writing the files
- contains_entity_id(entity_id: int) bool[source]#
Determines whether the entity ID list contains the specified ID.
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- remove_entity_id(entity_id: int) None[source]#
Removes the first occurrence of the specified entity ID from the list.
- replace_all_entity_ids(new_entity_ids: list[int]) None[source]#
Replaces the entire entity ID list with a new set of IDs. Automatically removes duplicates and validates all values. This is the only method that clears contextual parsing errors (THRU grammar violations from initial parsing).
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EntityIds: list[int]#
Gets the expanded array of structural grid point or element IDs.. Returns a copy to prevent external modification of internal state.
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SID: int#
Identification number of the single-point constraint set
- property SectionInfo: object#
SET3NAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.SET3NAS(cardinfo)[source]#
Bases:
N2PCard- add_entity_id(entity_id: int) None[source]#
Adds a new entity ID to the end of the list, enforcing uniqueness and the range allowed by the current descriptor (ID >= 0 when DES is MODULE, ID > 0 otherwise).
- comment_card() None#
Comments the card adding a $ when writing the files
- contains_entity_id(entity_id: int) bool[source]#
Determines whether the entity ID list contains the specified ID.
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_entity_id_at(position: int) int[source]#
Gets the entity ID at the specified position. Index starts in 1 (ID1, ID2, ID3…).
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- remove_entity_id(entity_id: int) None[source]#
Removes the first occurrence of the specified entity ID from the list.
- remove_entity_id_at(position: int) None[source]#
Removes the entity ID at the specified position. Index starts in 1.
- replace_all_entity_ids(new_entity_ids: list[int]) None[source]#
Replaces the entire entity ID list with a new set of IDs. Automatically removes duplicates and validates all values against the range allowed by the current descriptor. This is the only method that clears contextual parsing errors (THRU grammar violations from initial parsing).
- replace_entity_id_at(position: int, new_entity_id: int) None[source]#
Replaces, in place, the entity ID at the specified position. Index starts in 1.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property DES: Literal['GRID', 'ELEM', 'POINT', 'PROP', 'RBEin', 'RBEex', 'MODULE']#
Gets or sets the set descriptor, which defines how the entity IDs are interpreted by the solver.
Valid values: GRID, ELEM, POINT, PROP, RBEin, RBEex, MODULE.
GRID: IDs are grid point identification numbers.
ELEM: IDs are element identification numbers.
POINT: IDs are point identification numbers (used with PBMSECT/PBRSECT).
PROP: IDs are property identification numbers.
RBEin: Rigid element IDs to INCLUDE for MPC=sid.
RBEex: Rigid element IDs to EXCLUDE for MPC=sid.
MODULE: Module identification numbers. Only descriptor that accepts ID = 0.
- property EntityIdCount: int#
Gets the number of entity IDs in the expanded sequence. More efficient than len(EntityIds) because it does not create a defensive copy.
- property EntityIds: list[int]#
Gets the expanded array of entity IDs, with the THRU ranges already expanded. Returns a copy to prevent external modification of internal state.
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SID: int#
Identification number of the set
- property SectionInfo: object#
SET3OPT#
- class NaxToPy.Core.Classes.N2PNastranInputData.SET3OPT(cardinfo)[source]#
Bases:
N2PCard- add_entity_id(entity_id: int) None[source]#
Adds a new entity ID to the end of the list, enforcing uniqueness and positive value.
- comment_card() None#
Comments the card adding a $ when writing the files
- contains_entity_id(entity_id: int) bool[source]#
Determines whether the entity ID list contains the specified ID.
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_entity_id_at(position: int) int[source]#
Gets the entity ID at the specified position. Index starts in 1 (ID1, ID2, ID3…).
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- remove_entity_id(entity_id: int) None[source]#
Removes the first occurrence of the specified entity ID from the list.
- remove_entity_id_at(position: int) None[source]#
Removes the entity ID at the specified position. Index starts in 1.
- replace_all_entity_ids(new_entity_ids: list[int]) None[source]#
Replaces the entire entity ID list with a new set of IDs. Automatically removes duplicates and validates all values. This is the only method that clears contextual parsing errors (THRU/EXCEPT grammar violations from initial parsing).
- replace_entity_id_at(position: int, new_entity_id: int) None[source]#
Replaces, in place, the entity ID at the specified position. Index starts in 1.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property EntityIdCount: int#
Gets the number of entity IDs in the expanded sequence. More efficient than len(EntityIds) because it does not create a defensive copy.
- property EntityIds: list[int]#
Gets the expanded array of entity IDs, with the THRU/EXCEPT ranges already expanded. Returns a copy to prevent external modification of internal state.
- property EntityType: Literal['GRID', 'ELEM', 'PROP']#
Gets or sets the entity type contained in the set, which defines how the entity IDs are interpreted by the solver.
Valid values: GRID, ELEM, PROP.
GRID: IDs are grid point identification numbers.
ELEM: IDs are element identification numbers.
PROP: IDs are property identification numbers. Creates a list of elements associated with the listed property IDs.
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SID: int#
Identification number of the set
- property SectionInfo: object#
SPCNAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.SPCNAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property C1: int#
- property C2: int#
- property CardType: str#
- property D1: float#
enforced motion for components C1 at G1
- Type:
D1
- property D2: float#
enforced motion for components C2 at G2
- Type:
D2
- property FieldsFormat: str#
- property G1: int#
Grid point identification number of connection points. (Integer > 0)
- property G2: int#
Grid point identification number of connection points. (Integer > 0)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SID: int#
Identification number of the single-point constraint set
- property SectionInfo: object#
SPCDNAS#
- class NaxToPy.Core.Classes.N2PNastranInputData.SPCDNAS(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property C1: int#
- property C2: int#
- property CardType: str#
- property D1: float#
enforced motion for components C1 at G1
- Type:
D1
- property D2: float#
enforced motion for components C2 at G2
- Type:
D2
- property FieldsFormat: str#
- property G1: int#
Grid point identification number of connection points. (Integer > 0)
- property G2: int#
Grid point identification number of connection points. (Integer > 0)
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SID: int#
Identification number of the single-point constraint set
- property SectionInfo: object#
SPC1#
- class NaxToPy.Core.Classes.N2PNastranInputData.SPC1(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_grid_point(index: int, value: int) None[source]#
Sets the grid point at the specified index (1-based).
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property C: int#
Component numbers. (Any unique combination of the Integers 1 through 6 with no embedded blanks for grid points. This number must be Integer 0, 1 or blank for scalar points.)
- property CardType: str#
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SID: int#
Identification number of the single-point constraint set. (Integer > 0)
- property SectionInfo: object#
SPCADD#
- class NaxToPy.Core.Classes.N2PNastranInputData.SPCADD(cardinfo)[source]#
Bases:
N2PCard- comment_card() None#
Comments the card adding a $ when writing the files
- delete_card() None#
Deletes a card. The reference still exists in NaxToPy but it will no be writen
- get_all_component_set_ids() list[int][source]#
Identification numbers of single-point constraint sets defined via SPC or by SPC1 entries. (Integer > 0)
- get_field_value_by_position(row: int, column: int) object#
Gets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> id_ = card.get_field_value_by_position(1, 2)
- get_superelement_id() int#
Gets the part id of the card. If the card is not in a superelement, it returns 0
- last_status_message() None#
Method that forwards to the register the last operation annotated by the reader, if any.
It is registered with the severity the reader gave it: an error as an error, a warning as a warning and a successful operation as information.
- mark_as_original() None#
Reverts a previously synthetic card back to original status, treating it as if it had been parsed from a BDF file. Idempotent — calling it on a card that is already original is a no-op. Typical use case: a synthetic card has been persisted to disk via
update_file()orrebuild_file()and subsequent operations should treat it as part of the original model.The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedOriginal.
- mark_as_synthetic() None#
Marks the card as synthetically created (built programmatically via the API) rather than parsed from a BDF file. Idempotent — calling it on an already synthetic card is a no-op. Synthetic cards may receive distinct visualization treatment when the model is rewritten to disk (e.g. explanatory comment headers identifying them as non-original).
The transition (when it actually happens) is recorded as an informational entry in the model’s operation registry under
StatusCode.CardMarkedSynthetic.
- print_field_definition_table() str#
Prints the value of a specific card field by its position (row, column) in the conceptual NASTRAN Fixed Format Table.
- print_fixed_format_table() str#
Prints a formatted string representation visualizing the field definitions (names and indices)
- remap_card() bool#
Re-parses the card from its stored raw content, resetting all fields to a clean slate and re-running the full parsing pipeline. Acts as a “refresh”: discards any uncommitted setter mutations and restores the field values that match the stored raw bytes. Cold path — primarily useful for recovering cards that mapped with errors at load time after a parsing-logic update, or for rolling back unconfirmed setter edits.
- Returns:
Trueif the card is valid after re-parsing,Falseif the stored raw content was unavailable or re-parsing produced errors. Diagnostic detail is available from the model’s operation registry.
- restore_card() None#
Restores a card previously deleted
- set_component_set_id(index: int, value: int) None[source]#
Sets the component set ID at the specified index (1-based).
- set_field_value_by_position(row: int, column: int, new_value: object) None#
Sets the value from a card in the desire position. Index start in 1.
Example
>>> # card is GRID, so in the row 1 and column 2 the id is placed >>> card.set_field_value_by_position(1, 2, 1001)
- set_raw_content_and_remap(new_raw_content: str) bool#
Replaces the card’s raw BDF text with
new_raw_content(encoded to UTF-8 bytes) and re-runs the full parsing pipeline. The previous raw content is permanently overwritten — there is no undo. After this call,IsModifiedstaysTrueeven across subsequentremap_card()calls, because the original on-disk content is irrecoverable.- Parameters:
new_raw_content – New BDF card text to parse. Must be non-empty and non-whitespace; otherwise the call is rejected and an error is logged via the operation registry without mutating state.
- Returns:
Trueif the card is valid after re-parsing,Falseifnew_raw_contentwas rejected or re-parsing produced errors. On a parsing-error result the new raw content is already persisted; the consumer can recover field-by-field via property setters without calling this method again.
Example
>>> card.set_raw_content_and_remap( ... "GRID 1001 0 0.0 1.0 0.0")
- uncomment_card() None#
Uncomment a card previously commented
- property BdfFile: str#
- property BdfFilePath: str#
- property CardType: str#
- property FieldsFormat: str#
- property IsCommented: bool#
- property IsDeleted: bool#
- property IsModified: bool#
Indicates whether the card has been modified since it was read or created
- property IsSynthetic: bool#
- property IsValid: bool#
Indicates whether the card is currently valid
- property MappingSuccessful: bool#
- property RawContent: str#
- property SID: int#
Identification number of the single-point constraint set. (Integer > 0)
- property SectionInfo: object#