PlaneConstraint
- class compas_cem.optimization.PlaneConstraint(node=None, plane=None, weight=1.0)[source]
Bases:
compas_cem.optimization.constraints.constraint.Constraint
Pulls the xyz position of a node to a target plane.
Methods
copy
([cls])Make an independent copy of the data object.
datatype
()Get the data type of this COMPAS object.
error
(data)The error between the xyz coords of a node and its closest point on a plane.
from_data
(data)Creates a serializable object from structured data.
from_json
(filepath)Construct a serializable object from structured data contained in a json file.
from_jsonstring
(string)Construct an object from serialized data contained in a JSON string.
key
()The key to an edge or a node in a form diagram.
object_cls_from_dtype
(dtype)reference
(data)target
(point)to_data
()Returns a dictionary of structured data representing a serializable object.
to_json
(filepath[, pretty])Serialize this object to a structured json.
to_jsonstring
([pretty])Serialize the data representation of an object to a JSON string.
Validate the data of this object against its data schema (self.DATASCHEMA).
Validate the data loaded from a JSON representation of the data of this object against its data schema (self.DATASCHEMA).