Compare commits
4 Commits
c1bfee1ddd
...
5e0eef7c59
Author | SHA1 | Date | |
---|---|---|---|
5e0eef7c59 | |||
ad00ade097 | |||
385a37e0a2 | |||
35e28acb89 |
@ -541,7 +541,7 @@ class Pather(Builder):
|
||||
tree2 = tool.path(ccw, length, in_ptype=in_ptype, port_names=('A', 'B'), out_ptype=out_ptype, **kwargs)
|
||||
top2 = tree2.top_pattern()
|
||||
jog = rotation_matrix_2d(top2['A'].rotation) @ (top2['B'].offset - top2['A'].offset)
|
||||
return jog[1]
|
||||
return jog[1] * [-1, 1][int(bool(ccw))]
|
||||
|
||||
dst_extra_args = {'out_ptype': out_ptype}
|
||||
if plug_destination:
|
||||
|
@ -290,7 +290,7 @@ class BasicTool(Tool, metaclass=ABCMeta):
|
||||
|
||||
gen_straight, sport_in, sport_out = self.straight
|
||||
tree, pat = Library.mktree(SINGLE_USE_PREFIX + 'path')
|
||||
pat.add_port_pair(names=port_names)
|
||||
pat.add_port_pair(names=port_names, ptype=in_ptype)
|
||||
if data.in_transition:
|
||||
ipat, iport_theirs, _iport_ours = data.in_transition
|
||||
pat.plug(ipat, {port_names[1]: iport_theirs})
|
||||
|
@ -214,7 +214,7 @@ def _read_block(block: ezdxf.layouts.BlockLayout | ezdxf.layouts.Modelspace) ->
|
||||
if isinstance(element, LWPolyline):
|
||||
points = numpy.asarray(element.get_points())
|
||||
elif isinstance(element, Polyline):
|
||||
points = numpy.asarray(element.points())[:, :2]
|
||||
points = numpy.asarray([pp.xyz for pp in element.points()])
|
||||
attr = element.dxfattribs()
|
||||
layer = attr.get('layer', DEFAULT_LAYER)
|
||||
|
||||
|
@ -107,6 +107,7 @@ class Polygon(Shape):
|
||||
self.offset = offset
|
||||
self.repetition = repetition
|
||||
self.annotations = annotations if annotations is not None else {}
|
||||
if rotation:
|
||||
self.rotate(rotation)
|
||||
|
||||
def __deepcopy__(self, memo: dict | None = None) -> 'Polygon':
|
||||
|
Loading…
x
Reference in New Issue
Block a user