def __init__(self, pos, center, start, end, dimstyle='angle.deg', layer=None, roundval=None): """ AngularDimension constructor. :param pos: location as (x, y) tuple of dimension line, line goes through this point :param center: center point as (x, y) tuple of angle :param start: line from center to start is the first side of the angle :param end: line from center to end is the second side of the angle :param str dimstyle: dimstyle name, 'Default' - style is the default value :param str layer: dimension line layer, override the default value of dimstyle :param int roundval: count of decimal places """ super(AngularDimension, self).__init__(dimstyle, layer, roundval) self.dimlinepos = vector2d(pos) self.center = vector2d(center) self.start = vector2d(start) self.end = vector2d(end)
def __init__(self, center, target, length=1., dimstyle='Default', layer=None, roundval=None): """ :param center: center point of radius :param target: target point of radius :param float length: length of radius arrow (drawing length) :param string dimstyle: dimstyle name, 'Default' - style is the default value :param string layer: dimension line layer, override the default value of dimstyle """ super(RadialDimension, self).__init__(dimstyle, layer, roundval) self.center = vector2d(center) self.target = vector2d(target) self.length = float(length)
def __init__(self, pos, center, start, end, dimstyle='angle.deg', layer=None, roundval=None): """ :param pos: position of dimension line, line goes through this point :param center: center point of angle :param start: line from center to start is the first side of the angle :param end: line from center to end is the second side of the angle :param string dimstyle: dimstyle name, 'Default' - style is the default value :param string layer: dimension line layer, override the default value of dimstyle """ super(AngularDimension, self).__init__(dimstyle, layer, roundval) self.dimlinepos = vector2d(pos) self.center = vector2d(center) self.start = vector2d(start) self.end = vector2d(end)
def __init__(self, center, target, length=1., dimstyle='Default', layer=None, roundval=None): """ :param center: center point of radius :param target: target point of radius :param float length: length of radius arrow (drawing length) :param str dimstyle: dimstyle name, 'Default' - style is the default value :param str layer: dimension line layer, override the default value of dimstyle :param roundval: count of decimal places """ super(RadialDimension, self).__init__(dimstyle, layer, roundval) self.center = vector2d(center) self.target = vector2d(target) self.length = float(length)
def _setup(self): """ calc setup values and determines the point order of the dimension line points. """ self.measure_points = [vector2d(point) for point in self.measure_points] dimlineray = Ray2D(self.dimlinepos, angle=radians(self.angle)) self.dimline_points = [ self._get_point_on_dimline(point, dimlineray) for point in self.measure_points ] self.point_order = self._indices_of_sorted_points(self.dimline_points) self._build_vectors()
def __init__(self, pos, measure_points, angle=0., dimstyle='Default', layer=None, roundval=None): """ :param pos: position of dimension line, line goes through this point :param measure_points: list of points to dimension (two or more) :param float angle: angle of dimension line :param string dimstyle: dimstyle name, 'Default' - style is the default value :param string layer: dimension line layer, override the default value of dimstyle """ super(LinearDimension, self).__init__(dimstyle, layer, roundval) self.angle = angle self.measure_points = measure_points self.text_override = [""] * self.section_count self.dimlinepos = vector2d(pos)
def _setup(self): """ calc setup values and determines the point order of the dimension line points. """ self.measure_points = [ vector2d(point) for point in self.measure_points ] dimlineray = Ray2D(self.dimlinepos, angle=radians(self.angle)) self.dimline_points = [ self._get_point_on_dimline(point, dimlineray) for point in self.measure_points ] self.point_order = self._indices_of_sorted_points(self.dimline_points) self._build_vectors()
def __init__(self, pos, measure_points, angle=0., dimstyle='Default', layer=None, roundval=None): """ LinearDimension Constructor. :param pos: location as (x, y) tuple of dimension line, line goes through this point :param measure_points: list of points as (x, y) tuples to dimension (two or more) :param float angle: angle (in degree) of dimension line :param str dimstyle: dimstyle name, 'Default' - style is the default value :param str layer: dimension line layer, override the default value of dimstyle :param int roundval: count of decimal places """ super(LinearDimension, self).__init__(dimstyle, layer, roundval) self.angle = angle self.measure_points = measure_points self.text_override = [""] * self.section_count self.dimlinepos = vector2d(pos)