diff --git a/CHANGELOG.md b/CHANGELOG.md index 0253fad..6906d21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Removed `ElementType` class. * Removed `Element.from_id` method. * Removed `Element.type` property. Use `Element.is_*` properties instead. +* Removed `Dimension.from_element` method. Use `Dimension(element_id)` instead. +* Removed `Dimension.from_id` method. Use `Dimension(element_id)` instead. ## [0.8.0] 2024-11-15 diff --git a/src/compas_cadwork/datamodel/dimension.py b/src/compas_cadwork/datamodel/dimension.py index 0d77228..7243e5e 100644 --- a/src/compas_cadwork/datamodel/dimension.py +++ b/src/compas_cadwork/datamodel/dimension.py @@ -105,39 +105,3 @@ def _init_anchors(self): direction = dc.get_segment_direction(self.id, index) anchors.append(AnchorPoint(point_to_compas(point), distance, vector_to_compas(direction))) return tuple(anchors) - - @classmethod - def from_id(cls, element_id: int) -> Dimension: - """Creates a dimension object from an element id. - - This is an override of :func:`Element.from_id`. - - Parameters - ---------- - element_id : int - The id of the element to create the dimension from. - - Returns - ------- - :class:`Dimension` - The dimension object created from the element id. - - """ - return cls(id=element_id) - - @classmethod - def from_element(cls, element: Element) -> Dimension: - """Creates a dimension object from an element. - - Parameters - ---------- - element : :class:`Element` - The element to create the dimension from. - - Returns - ------- - :class:`Dimension` - The dimension object created from the element. - - """ - return cls(id=element.id)