kopia lustrzana https://github.com/inkstitch/inkstitch
bugfix and useful warning
rodzic
41effdbf9f
commit
4b78102632
|
@ -1245,11 +1245,15 @@ class SatinColumn(EmbroideryElement):
|
||||||
result = []
|
result = []
|
||||||
|
|
||||||
for rail in rails:
|
for rail in rails:
|
||||||
|
if not rail.is_simple:
|
||||||
|
self.fatal("One or more rails crosses itself, and this is not allowed. Please split into multiple satin columns.")
|
||||||
|
|
||||||
# handle null intersections here?
|
# handle null intersections here?
|
||||||
linestrings = shapely.ops.split(rail, rungs)
|
linestrings = shapely.ops.split(rail, rungs)
|
||||||
|
|
||||||
if len(linestrings.geoms) < len(rungs) + 1:
|
if len(linestrings.geoms) < len(rungs.geoms) + 1:
|
||||||
raise Exception("Expected %d linestrings, got %d" % (len(rungs) + 1, len(linestrings.geoms)))
|
print >> dbg, [str(rail) for rail in rails], [str(rung) for rung in rungs]
|
||||||
|
self.fatal("Expected %d linestrings, got %d" % (len(rungs.geoms) + 1, len(linestrings.geoms)))
|
||||||
|
|
||||||
paths = [[PyEmb.Point(*coord) for coord in ls.coords] for ls in linestrings.geoms]
|
paths = [[PyEmb.Point(*coord) for coord in ls.coords] for ls in linestrings.geoms]
|
||||||
result.append(paths)
|
result.append(paths)
|
||||||
|
|
Ładowanie…
Reference in New Issue