Assembly
- class compas_assembly.datastructures.Assembly
Bases:
Datastructure
A data structure for managing the connections between different parts of an assembly.
- Parameters:
- namestr, optional
The name of the assembly.
Examples
>>>
- Attributes:
- attributesdict[str, Any]
General attributes of the data structure that will be included in the data dict and serialization.
- graph
compas.datastructures.Graph
The graph that is used under the hood to store the parts and their connections.
Methods
Add a block to the assembly.
Add an interface between two blocks.
Add a block to the assembly from a normal mesh.
Retrieve the graph node corresponding to a block.
Iterate over the blocks of the assembly.
Retrieve the two blocks corresponding to a graph edge.
Retrieve the interface corresponding to a graph edge.
Retrieve the line segment between the nodes of the edge.
Iterate over the edges of the graph of the assembly.
Construct an assembly from Rhino polysurfaces.
Construct an assembly from Rhino meshes.
Construct an assembly from a parameteric template.
Verify that the assembly contains a given block.
Verify that the assembly contains a given interface.
Yield the interfaces of the assembly.
Retrieve the block corresponding to a graph node.
Retrieve a point representing the location of the node.
Iterate over the nodes of the graph of the assembly.
Return the number of blocks in the assembly.
Return the number of edges in the assembly graph.
Return the number of interfaces in the assembly.
Return the number of nodes in the assembly graph.
Set the boundary condition for a single node.
Set the boundary condition for multiple nodes.
Transform this assembly by the given transformation matrix.
Transform a copy of this assembly by the given transformation matrix.
Unset all boundary conditions.
Inherited Methods
Converts the instance to a string.
Compute the axis-aligned bounding box of the datastructure.
Compute the oriented bounding box of the datastructure.
Make an independent copy of the data object.
Construct an object of this type from a JSON file.
Construct an object of this type from a JSON string.
Rotate the datastructure.
Returns a rotated copy of this geometry.
Scale the datastructure.
Returns a scaled copy of this geometry.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
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.
Transforms the data structure.
Returns a transformed copy of this data structure.
Translate the datastructure.
Returns a translated copy of this geometry.
Validate the data against the object's data schema.