Contact

class compas_model.interactions.Contact(points, frame, size, mesh=None, name=None)

Bases: Data

Class representing a planar contact between two elements.

Parameters:
pointslist[compas.geometry.Point]

The points defining the contact polygon.

framecompas.geometry.Frame

The local coordinate system of the contact.

sizefloat

The total area of the contact polygon.

meshcompas.datastructures.Mesh, optional

The mesh representation of the contact surface.

namestr, optional

A human-readable name.

Attributes:
framecompas.geometry.Frame

The local coordinate frame of the interface polygon.

meshcompas.datastructure.Mesh

A mesh representation of the interface.

pointslist[compas.geometry.Point]

The corner points of the interface polygon.

polygoncompas.geometry.Polygon

The interfaces polygon.

sizefloat

The area of the interface polygon.

Warning

The definition of contact surfaces is under active development and may change frequently.

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

validate_data

Validate the data against the object's data schema.