This repository has been archived on 2023-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
mightyscape-1.1-deprecated/extensions/inkscape_helper/PathSegment.py
2020-07-30 01:16:18 +02:00

30 lines
706 B
Python

from collections import namedtuple
PathPoint = namedtuple('PathPoint', 't coord tangent curvature c_dist')
class PathSegment(object):
def __init__(self):
raise NotImplementedError
@property
def lenth(self):
raise NotImplementedError
def subdivide(self, part_length):
raise NotImplementedError
def pathpoint_at_t(self, t):
raise NotImplementedError
def t_at_length(self, length):
raise NotImplementedError
# also need:
# find a way do do curvature dependent spacing
# - based on deviation from a standard radius?
# - or ratio between thickness and curvature?
#def point_at_distance(d):
# pass