Part
- class compas_fea2.model.Part[source]
Bases:
_PartDeformable part.Base class for Parts.
- Parameters:
- None
- Attributes:
- namestr
Unique identifier. If not provided it is automatically generated. Set a name if you want a more human-readable input file.
modelcompas_fea2.model.ModelThe model to which the part belongs.
nodesSet[compas_fea2.model.Node]The nodes of the part.
nodes_countintThe number of nodes in the part.
gkey_nodeDict[str,compas_fea2.model.Node]A dictionary that associates each node and its geometric key.
materialsSet[compas_fea2.model._Material]All the materials associated with the part.
sectionsSet[compas_fea2.model._Section]All the materials associated with the part.
elementsSet[compas_fea2.model._Element]The elements of the part.
element_typesDict[compas_fea2.model._Element, List[compas_fea2.model._Element]]The types of elements in the part grouped by their type.
- element_countint
Number of elements in the part.
boundary_meshcompas.datastructures.MeshThe outer boundary mesh of the part.
Notes
Parts are registered to a
compas_fea2.model.Model.Methods
Add a
compas_fea2.model._BeamEndReleaseto an element in the part.Creates a Part object from a compas Mesh by converting each edge into a BeamElement with a third orientation node.
Create a Part object from a 3-dimensional
compas.datastructures.Meshobject representing the boundary envelope of the Part.Create a Part object from a gmshModel object.
Inherited Methods
Converts the instance to a string.
Add an element to the part.
Add multiple elements to the part.
Add a node or element group to the part.
Add multiple groups to the part.
Add a node to the part.
Add multiple nodes to the part.
Compute the nodal mass of the part from the mass of each element.
Verify that the part contains a specific element.
Verify that the part contains a specific material.
Verify that the part contains a given node.
Verify that the part contains a specific section.
Make an independent copy of the data object.
Finds all elements that share at least one node with a given element.
Finds all element faces located on the exterior boundary of the part.
Finds all nodes located on the exterior boundary of the part.
Find the n closest nodes around a given node (excluding the node itself).
Find the closest number_of_nodes nodes to a given point.
Retrieve an element in the model using its key.
Find all elements with a given name.
Finds element neighbors in expanding layers (rings) around a starting element.
Finds all elements connected to a given node.
Find the faces of the elements that are contained within a planar polygon.
Find the faces of the elements that belong to a given plane, if any.
Find all groups with a given name.
Find a material with a given name.
Find a material with a given unique identifier.
Find all materials with a given name.
Retrieve a node in the model using its key.
Find a node with a given name.
Retrieve a node in the part using its unique identifier.
Find the nodes around a given point within a specified distance.
Finds all nodes within a given compas.geometry.Box.
Find the nodes of the part that are contained within a planar polygon.
Find all nodes on a given plane.
Find a section with a given name.
Find a section with a given unique identifier.
Find all sections with a given name.
Finds the shortest path of nodes through the mesh between two nodes.
Create a Part object from a BREP file.
Generate a part from a list of
compas.geometry.Line.Generate a discretized model from a list of
compas.geometry.Line.Creates a Part from Ggmsh.
Construct an object of this type from a JSON file.
Construct an object of this type from a JSON string.
Create a Part object from a STEP file.
Checks if the mesh is fully connected or consists of multiple 'islands'.
Check if the element belongs to the boundary mesh of the part.
Remove an element from the part.
Remove multiple elements from the part.
Remove a
compas_fea2.model.Nodefrom the part.Remove multiple
compas_fea2.model.Nodefrom the part.Compute a hash of the data for comparison during version control using the sha256 algorithm.
Creates a Part object from a
compas.datastructures.Mesh.Convert an object to its native data representation and save it to a JSON file.
Convert an object to its native data representation and save it to a JSON string.
Transform the part.
Return a transformed copy of the part.
Validate the data against the object's data schema.