fix handling of self-intersection

pull/252/head
Lex Neva 2018-07-30 16:40:26 -04:00
rodzic 8bf478a71a
commit d224b2655e
2 zmienionych plików z 10 dodań i 4 usunięć

Wyświetl plik

@ -5,6 +5,7 @@ import numpy
from numpy import diff, sign, setdiff1d
from scipy.signal import argrelmin
import math
from copy import deepcopy
from .base import InkstitchExtension
from ..svg.tags import SVG_PATH_TAG
@ -40,6 +41,11 @@ class ConvertToSatin(InkstitchExtension):
except ValueError:
inkex.errormsg(_("Cannot convert %s to a satin column because it intersects itself. Try breaking it up into multiple paths.") % element.node.get('id'))
# revert any changes we've made
self.document = deepcopy(self.original_document)
return
parent.insert(index, self.satin_to_svg_node(rails, rungs, correction_transform))
parent.remove(element.node)

Wyświetl plik

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2018-07-30 16:03-0400\n"
"POT-Creation-Date: 2018-07-30 16:40-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -238,17 +238,17 @@ msgstr ""
msgid "Please choose one or more commands to attach."
msgstr ""
#: lib/extensions/convert_to_satin.py:24
#: lib/extensions/convert_to_satin.py:25
msgid "Please select at least one line to convert to a satin column."
msgstr ""
#. : Convert To Satin extension, user selected one or more objects that were
#. not lines.
#: lib/extensions/convert_to_satin.py:29
#: lib/extensions/convert_to_satin.py:30
msgid "Only simple lines may be converted to satin columns."
msgstr ""
#: lib/extensions/convert_to_satin.py:41
#: lib/extensions/convert_to_satin.py:42
#, python-format
msgid ""
"Cannot convert %s to a satin column because it intersects itself. Try "