Skip to content

Commit

Permalink
Merge pull request #197 from leon-vv/remove-deprecated-functions
Browse files Browse the repository at this point in the history
removed functions deprecated in v0.7.0
  • Loading branch information
tobiasgobel authored Jan 15, 2025
2 parents 17228e8 + 06a6dc5 commit 1e56b1d
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions traceon/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 1e56b1d

Please sign in to comment.