Shape
-
class
compas.geometry.
Shape
[source] Bases:
compas.geometry.primitives._primitive.Primitive
Base class for geometric shapes.
Methods
__init__
()Initialize self.
copy
()Makes a copy of this primitive.
from_data
(data)Construct an object of this type from the provided data.
from_json
(filepath)Construct a primitive from structured data contained in a json file.
to_data
()Returns the data dictionary that represents the primitive.
to_json
(filepath)Serialise the structured data representing the primitive to json.
transform
(transformation)Transform the primitive.
transformed
(transformation)Returns a transformed copy of this primitive.
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).