From 06a6dc50df81754b45a3b62be6f5d0cc885df5cc Mon Sep 17 00:00:00 2001 From: jobdewitte Date: Wed, 15 Jan 2025 16:16:10 +0100 Subject: [PATCH] removed functions deprecated in v0.7.0 --- traceon/geometry.py | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/traceon/geometry.py b/traceon/geometry.py index b614293..4cfa7d0 100644 --- a/traceon/geometry.py +++ b/traceon/geometry.py @@ -10,7 +10,6 @@ meshes generated by other programs (e.g. GMSH or Comsol). Traceon can import [meshio](https://github.com/nschloe/meshio) meshes or any file format supported by meshio.""" -import warnings from math import pi, sqrt, sin, cos, atan2, ceil import numpy as np @@ -266,28 +265,6 @@ def endpoint(self): The endpoint of the path.""" return self(self.path_length) - def line_to(self, point): - """Extend the current path by a line from the current endpoint to the given point. - The given point is marked a breakpoint. - - Parameters - ---------------------- - point: (3,) float - The new endpoint. - - Returns - --------------------- - Path""" - warnings.warn("line_to() is deprecated and will be removed in version 0.8.0." - "Use extend_with_line() instead.", - DeprecationWarning, - stacklevel=2) - - point = np.array(point) - assert point.shape == (3,), "Please supply a three dimensional point to .line_to(...)" - l = Path.line(self.endpoint(), point) - return self >> l - def extend_with_line(self, point): """Extend the current path by a line from the current endpoint to the given point. The given point is marked a breakpoint. @@ -373,29 +350,7 @@ def f(u): theta = u / radius return np.array([radius*cos(theta), radius*sin(theta), 0.]) return Path(f, angle*radius).move(dx=x0, dy=y0) - - def arc_to(self, center, end, reverse=False): - """Extend the current path using an arc. - - Parameters - ---------------------------- - center: (3,) float - The center point of the arc. - end: (3,) float - The endpoint of the arc, shoud lie on a circle determined - by the given centerpoint and the current endpoint. - - Returns - ----------------------------- - Path""" - warnings.warn("arc_to() is deprecated and will be removed in version 0.8.0." - "Use extend_with_arc() instead.", - DeprecationWarning, - stacklevel=2) - start = self.endpoint() - return self >> Path.arc(center, start, end, reverse=reverse) - def extend_with_arc(self, center, end, reverse=False): """Extend the current path using an arc.