kopia lustrzana https://github.com/inkstitch/inkstitch
shapely arm fix (#3094)
rodzic
67b628b5e3
commit
9c537f33b9
|
@ -287,7 +287,7 @@ jobs:
|
|||
run: |
|
||||
brew update
|
||||
|
||||
brew install gtk+3 pkg-config gobject-introspection geos libffi gettext jq gnu-getopt || true
|
||||
brew install gtk+3 pkg-config gobject-introspection libffi gettext jq gnu-getopt || true
|
||||
|
||||
export LDFLAGS="-L/usr/local/opt/libffi/lib"
|
||||
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
|
||||
|
@ -307,9 +307,9 @@ jobs:
|
|||
pip install pandas
|
||||
pip install pyarrow
|
||||
# remove and build shapely with brew geos version
|
||||
pip uninstall -y shapely
|
||||
pip cache remove shapely
|
||||
pip install -v shapely --no-binary shapely
|
||||
# pip uninstall -y shapely
|
||||
# pip cache remove shapely
|
||||
# pip install -v shapely --no-binary shapely
|
||||
|
||||
pip install pyinstaller
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
VERSION="${GITHUB_REF##*/}"
|
||||
OS="${BUILD:-$(uname)}"
|
||||
|
||||
DATE=$(date +"%Y-%m-%d %H:%M")
|
||||
if [[ "$VERSION" == "" ]]; then
|
||||
VERSION="Manual Install"
|
||||
fi
|
||||
|
||||
echo "${VERSION} (${OS})" > VERSION
|
||||
echo "${VERSION} (${OS}) ${DATE}" > VERSION
|
||||
|
|
|
@ -12,6 +12,7 @@ import numpy as np
|
|||
from inkex import paths
|
||||
from shapely import affinity as shaffinity
|
||||
from shapely import geometry as shgeo
|
||||
from shapely import set_precision
|
||||
from shapely.ops import nearest_points
|
||||
|
||||
from ..debug.debug import debug
|
||||
|
@ -572,7 +573,7 @@ class SatinColumn(EmbroideryElement):
|
|||
@cache
|
||||
def flattened_rails(self):
|
||||
"""The rails, as LineStrings."""
|
||||
paths = [shgeo.LineString(self.flatten_subpath(rail)) for rail in self.rails]
|
||||
paths = [set_precision(shgeo.LineString(self.flatten_subpath(rail)), 0.00001) for rail in self.rails]
|
||||
|
||||
rails_to_reverse = self._get_rails_to_reverse()
|
||||
if paths and rails_to_reverse is not None:
|
||||
|
@ -698,7 +699,6 @@ class SatinColumn(EmbroideryElement):
|
|||
rails = list(self.flattened_rails)
|
||||
rungs = self.flattened_rungs
|
||||
cut_points = [[], []]
|
||||
|
||||
for rung in rungs:
|
||||
intersections = rung.intersection(shgeo.MultiLineString(rails))
|
||||
# ignore the rungs that are cutting a rail multiple times
|
||||
|
|
|
@ -20,8 +20,11 @@ def get_os_version():
|
|||
os_ver = "Windows " + platform.release() + " version: " + platform.version()
|
||||
if sys.platform == "darwin":
|
||||
# macOS command line progam provides accurate info than python functions
|
||||
mac_v = subprocess.run(["sw_vers"], capture_output=True, text=True)
|
||||
os_ver = str(mac_v.stdout.strip())
|
||||
mac_v1 = subprocess.run(["sw_vers"], capture_output=True, text=True)
|
||||
mac_v1 = str(mac_v1.stdout.strip())
|
||||
mac_v2 = subprocess.run(["uname", "-m"], capture_output=True, text=True)
|
||||
mac_v2 = str(mac_v2.stdout.strip())
|
||||
os_ver = mac_v1 + "\nCPU:\t\t\t\t" + mac_v2
|
||||
if sys.platform == "linux":
|
||||
# Getting linux version method used here is for systemd and nonsystemd linux.
|
||||
try:
|
||||
|
|
|
@ -11,7 +11,7 @@ from typing import Iterator
|
|||
|
||||
import networkx
|
||||
from shapely import geometry as shgeo
|
||||
from shapely import make_valid, segmentize
|
||||
from shapely import make_valid, segmentize, set_precision
|
||||
from shapely.ops import snap, unary_union
|
||||
from shapely.strtree import STRtree
|
||||
|
||||
|
@ -487,7 +487,7 @@ def process_travel_edges(graph, fill_stitch_graph, shape, travel_edges):
|
|||
|
||||
# This makes the distance calculations below a bit faster. We're
|
||||
# not looking for high precision anyway.
|
||||
outline = shape.boundary.simplify(0.5 * PIXELS_PER_MM, preserve_topology=False)
|
||||
outline = set_precision(shape.boundary.simplify(0.5 * PIXELS_PER_MM, preserve_topology=False), 0.000001)
|
||||
|
||||
for ls in travel_edges:
|
||||
# In most cases, ls will be a simple line segment. If we're
|
||||
|
|
Ładowanie…
Reference in New Issue