N2PGetFastener Module#
- class NaxToPy.Modules.static.fasteners.N2PGetFasteners.N2PGetFasteners[source]#
Bases:
object
The N2PGetFasteners class is used to obtain all necessary geometrical information about a model’s fasteners, including the creation of N2PJoint, N2PBolt, and N2PPlate objects.
- Properties:
Model: N2PModelContent -> N2PModelContent object representing the model to be analysed. GetAttachmentsBool: bool -> boolean that shows if the attachments will be calculated or not. GetDistanceBool: bool -> boolean that shows if the distance attribute will be calculated or not for plates. Thresh: float -> numerical tolerance used in the creation of the joints. ElementList: list[N2PElement] -> list of 1D elements to be transformed into joints. Currently, only CFAST and CWELD elements are supported. JointsList: list[N2PJoint] -> list of N2PJoint objects representing the transformed fasteners. PlateList: list[N2PPlate] -> list of N2PPlate objets representing the transformed plates. AttachmentsList: list[N2PAttachment] -> list of N2PAttachment objects representing fasteners that join exactly the same part of a model. ExportLocation: str -> path to the .h5 file in which results will be exported.
- assign_diameter(elementList: list[N2PElement], diameter: float) None [source]#
Method used to assign a certain diameter to some joints, as defined by the N2PElements of their fastener.
- Parameters:
elementList – list[N2PElement] -> list of the N2PElements that make up the fasteners
diameter – float -> diameter to be assigned
- Calling example:
>>> fasteners.assign_diameter([fasteners.Model.get_elements(50052541, 50052538, 50052544)], 6.4)
- calculate() None [source]#
Method used to do all the previous calculations.
- Calling example:
>>> fasteners.calculate()
- export_fasteners()[source]#
Method used to export the fasteners to an HDF5 file. The first plate in the array will get the value -1000, the last plate in the array will get the value 1000, and all the middle plates will get the value 0.
- Calling example:
>>> fasteners.export_fasteners()
- flip_plates() None [source]#
Method used to flip some plate lists.
- Calling example:
>>> fasteners.flip_plates()
- get_attachments() None [source]#
Method used to obtain the list of N2PAttachments and calculate their pitch. The get_joints() method must be used before this one. Otherwise, an error will occur.
- Calling example:
>>> fasteners.get_attachments()
- get_intersection() None [source]#
Method used to obtain the distance from every N2PPlate’s edge to its N2PJoint (optional), the intersection between an N2PPlate and its N2PJoint, the perpendicular direction to the N2PPlates, the A and B CFASTs for each plate, and their direction and factor. The get_joints() method must be used before this one. Otherwise, an error will occur.
- Calling example:
>>> fasteners.get_intersection()
- get_joints() None [source]#
Method used to create all N2PJoints, N2PPlates and N2PBolts and assign them certain useful attributes.
- The following steps are followed:
1. All N2PJoints are created. Inside this, all N2PBolts and N2PPlates associated to each N2PJoint are also created. 2. All N2PBolts, N2PPlates are assigned certain important attributes, such as CentralElement or ElementList.
- Calling example:
>>> fasteners.get_joints()
- property AttachmentsList: list[N2PAttachment]#
Property that returns the attachments_list attribute, that is, the list of N2PAttachments.
- property ElementList: list[N2PElement]#
Property that returns the element_list attribute, that is, the list of the loaded CFASTs.
- property ExportLocation: str#
Property that returns the export_location attribute, that is, the path where the results are to be exported.
- property GetAttachmentsBool: bool#
Property that returns the get_attachments_bool attribute, that is, the boolean that shows if the get_attachments() method will be used inside calculate().
- property GetDistanceBool: bool#
Property that returns the get_distance_bool attribute, that is, the boolean that shows if the Distance and DistanceVector attributes will be calculated.
- property JointsList: list[N2PJoint]#
Property that returns the joints_list attribute, that is, the list of N2PJoints to be analyzed.
- property Model: N2PModelContent#
Property that returns the model attribute, that is, the model to be analyzed.
- property Thresh: float#
Property that returns the thresh attribute, that is, the tolerance used in the obtention of N2PJoints.