summaryrefslogtreecommitdiff
path: root/lib/utils
AgeCommit message (Collapse)Author
2 daysfix(build): fix nix-build againMartin Fischer
Was changed for some reason in 5a9ae03dc14ea5b68a99581c21a5d8085f1a3243.
11 daysRunning stitch length sequence (#4034)Kaalleen
* allow running stitch length sequences * contour fill: fix error message for long stitch length * satin: fix center underlay stitch length
2025-10-22params: prevent settings error (#4004)Kaalleen
2025-09-04fix meander clamp (2) (#3945)Kaalleen
2025-08-27fix camp weiredness (#3941)Kaalleen
2025-07-19Convert to satin internally (3874)Kaalleen
2025-07-19Claudine/fill composed glyphs layers (#3870)Claudine Peyrat
* combining glyphs are guessed * attribute letter seems ok now * Update option_panel.py should not have been modified * second round * step3 * add sorting whole file by categories * style * Update tags.py remove an unuseful tag * fixing mistakes pointed out by Kaaleen thank you Kaalleen
2025-06-28fix: tests during Nix buildMartin Fischer
Fixes the following error when executing the tests during a Nix build: Traceback (most recent call last): File "/build/inkstitch/lib/elements/element.py", line 714, in handle_unexpected_exceptions yield File "/build/inkstitch/lib/elements/element.py", line 650, in embroider stitch_groups = self._load_cached_stitch_groups(previous_stitch, next_element) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/inkstitch/lib/debug/debug.py", line 172, in decorated result = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/build/inkstitch/lib/elements/element.py", line 541, in _load_cached_stitch_groups stitch_groups = get_stitch_plan_cache().get(cache_key) ^^^^^^^^^^^^^^^^^^^^^^^ File "/build/inkstitch/lib/utils/cache.py", line 31, in get_stitch_plan_cache cache_dir = get_user_dir('cache') ^^^^^^^^^^^^^^^^^^^^^ File "/build/inkstitch/lib/utils/paths.py", line 50, in get_user_dir os.makedirs(path) File "<frozen os>", line 215, in makedirs File "<frozen os>", line 215, in makedirs File "<frozen os>", line 225, in makedirs PermissionError: [Errno 13] Permission denied: '/homeless-shelter'
2025-06-28fix: generate-inx-files failing with NixMartin Fischer
Fixes the following error when attempting to build the Nix package: python bin/generate-inx-files; Traceback (most recent call last): File "/build/inkstitch/bin/generate-inx-files", line 59, in <module> from lib.inx.generate import generate_inx_files File "/build/inkstitch/lib/inx/generate.py", line 6, in <module> from .extensions import generate_extension_inx_files File "/build/inkstitch/lib/inx/extensions.py", line 10, in <module> from ..commands import (COMMANDS, GLOBAL_COMMANDS, LAYER_COMMANDS, File "/build/inkstitch/lib/commands.py", line 16, in <module> from .i18n import N_, _ File "/build/inkstitch/lib/i18n.py", line 10, in <module> from .utils import cache, get_resource_dir File "/build/inkstitch/lib/utils/__init__.py", line 6, in <module> from . import cache as cache_module # Slight hack to allow cache to be imported for monkeypatching ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/inkstitch/lib/utils/cache.py", line 13, in <module> from lib.utils.settings import global_settings File "/build/inkstitch/lib/utils/settings.py", line 84, in <module> global_settings = GlobalSettings() ^^^^^^^^^^^^^^^^ File "/build/inkstitch/lib/utils/settings.py", line 48, in __init__ self.__settings_file = os.path.join(get_user_dir(), "settings.json") ^^^^^^^^^^^^^^ File "/build/inkstitch/lib/utils/paths.py", line 50, in get_user_dir os.makedirs(path) File "<frozen os>", line 215, in makedirs File "<frozen os>", line 215, in makedirs File "<frozen os>", line 225, in makedirs PermissionError: [Errno 13] Permission denied: '/homeless-shelter'
2025-06-20make pytest happy again (#3802)Kaalleen
2025-06-04Smoothing and clamping (#3772)Kaalleen
* smoothing: ensure start and end of original path * clamp path: never intersecting path could also be entirely in the exterior of the shape
2025-05-09handle GeometryCollections in ensure_polygon (#3708)Kaalleen
2025-04-12fix guess config path for manual macOS - use get_user_directory by default ↵Kaalleen
(#3660)
2025-03-29simulator: add button to toggle crosshair (#3616)Kaalleen
2025-03-09Mypy type correctness (#3199)capellancitizen
2025-03-04use get_user_dir (#3549)Kaalleen
2025-03-04Migrate from appdirs to platformdirs (#3449) (#3450)Benson Muite
2025-03-02remove scipy dependency (#3483)Kaalleen
smoothing with scipy (could be improved in a later commit)
2025-02-13greater lettering memory (#3504)Kaalleen
2025-02-11lettering tools: remember last font (#3498)Kaalleen
2025-02-03Add debug variable to enable sew stack elements (#3476)Kaalleen
2025-01-29Sew Stack first steps (#3133)Lex Neva
* handle more recursive cases * scaffolding for stitch layers * scaffolding for SewStack * always use DotDict when parsing json params * add DefaultDotDict + DotDict fixes * first working SewStack (no UI yet) * ignore inkstitch_debug.log and .svg * refactor * early WIP: property grid display temporarily in stitch plan preview * start of sew stack editor extension * add layer properties panel and splitter * spacing and better icon * handle checkbox * add layer action buttons * show selected property help text in an HtmlWindow * rename * rephrase help text for tolerance * refactor into separate file * simplify structure * better property type handling * add randomization button * add random seed re-roll button * simulator preview * update preview in a few more cases * always DotDict * avoid ridiculously slow simulations * preview selected layer or all layers * edit multiple objects and save only modified properties into the SVG * better preview handling * add reverse and jitter * add stitch path jitter * fix types * fix random shuffle button * fixes * fix repeats * type hinting to please pycharm * show layer description * avoid exception in properties with multiple values * fix typing * fix new layer * draw a box around property grid and help box * confirm before closing * rename properties and fix seed * fix close/cancel logic * add buttons to undo changes and reset to default value * set not modified if default is original setting * fix invisible icon * more space for properties * fix random properties * better regulation of simulator rendering speed * Fixed timer being passed a float * fix get_json_param() default handling * fix tests * add checkbox for sew stack only * fix property help * adjustable stitch layer editor help box size, with persistence * repeat exact stitches * "fix" style * adjust for new next_element stuff --------- Co-authored-by: CapellanCitizen <thecapellancitizen@gmail.com>
2025-01-09cache: reset on operational error (#3421)Kaalleen
2025-01-09save and reload simulator speed (optionally) (#3420)Kaalleen
2024-12-07save more simulator settings (#3323)Kaalleen
2024-11-18Print-pdf: simplify path detection (#3282)Kaalleen
* print-pdf: simplify path detection * i18n: more cleaning up * Version, License paths
2024-11-18Thread catalog: fix broken path (#3281)Kaalleen
* thread catalog: fix broken path * apply threadlist: use wxpython to also include custom lists * apply_palette: save last choice
2024-11-12unit: prevent zerodivision error for zero length segments (#3268)Kaalleen
2024-08-18fill: ensure polygon in pull comp adjusted shape (#3143)Kaalleen
2024-08-14Clones now also clone commands attached to element and its children. (#3032, ↵capellancitizen
#3121) (#3086)
2024-07-24default min stitch length 0 to 0.1 (as previously) (#3107)Kaalleen
2024-07-09reset corrupted cache files (#3074)Kaalleen
2024-06-23wxpythonify about extension (#3007)Kaalleen
2024-06-20auto-fill pull compensation (#2891)Lex Neva
2024-06-14Add preferences button to simulator (#2992)Kaalleen
* split simulator panel files * add view panel to position view options at the side * fix single simulator start size (macOS)
2024-05-11Update inkex (#2892)Kaalleen
* fix currentColor * fix pip inkex import * fix color block extension
2024-05-05Add randomized running and fill stitches (#2830)George Steel
Add a mode to running stitch that uses randomized phase and stitch length instead of even spacing. This greatly reduces moire effects when stitching closely-spaced curves in running-stitch-based fills. Add option for randomized running stitch to: ripple stitch circular fill contour fill guided fill auto-fill When is randomization is not selected, ripple stitch will use even running stitch when staggers are set to 0 (default) and the stagger algorithm from guided fill (which does not look nice with a stagger period of 0) when staggers is nonzero. Also includes fix for satin contour underlays (missing tolerance default) mentioned in #2814. This sets the default tolerance to 0.2mm, which is the largest tolerance guaranteed to be backwards-compatible with existing designs using the default inset of 0.4mm. Original commits: * fix satin underlay tolerance default * Add randomized running stitch, make available in ripple stitch, circular, and contour * add randomized guided fill * make ripple stitch use even stitching when not staggering or randomizing. * add random auto-fill and switch jitter parameter to a percentage (matches satin) * fix comments
2024-04-30simulator fixes (#2844)Lex Neva
* fix slide and control panel rendering bugs * clear marker lists when clearing stitch plan * switch simulator back to wx * remove unused function * fix off-by-one error in color bar * avoid overlapping command symbols of different types * don't maximize simulator * adjust alignment * remove unused API server * bugfix * focus entire simulator panel * rename simulator/realistic preview -> simulator * experimental: background color picker * set pagecolor to background color by default * satisfy macos * toggle jumps on drawing canvas * clear frog family --------- Co-authored-by: Kaalleen
2024-04-27Add option to disable the stitch plan cache (#2655)George Steel
Setting the cache size to 0 bypasses the cache completely. This is necessary during development to ensure newly-changed code actually gets run. Also fixes the error pane in the params gui. * make params warning pane large enough to see contents * rename sizers in preferences dialog descriptive names * add shapely version bound * add option to disable stitch plan cache * remove out-of-date wxg file * make a cache size of 0 disable the cache
2024-03-29Add "the tartan universe" (#2782)Kaalleen
2024-02-01Do not omit "multi_shapes" in geometry collections (#2708)Kaalleen
2024-01-25Second chance for invalid fill stitch graphs (#2643)Kaalleen
2023-12-26Contour fill: replace buffer with offset_curve (#2654)Kaalleen
2023-11-10handle case of travelling along shape border (#2593)Lex Neva
2023-10-21attach params/lettering simulator window and allow detach (#2557)Lex Neva
2023-07-01return early for paths already insideLex Neva
2023-07-01remove debug timing in frequently-run functionsLex Neva
2023-07-01avoid losing start and end of path when clampingLex Neva
2023-04-14new way betterer satin algo (#2178)Lex Neva
* significantly faster length calculation * way betterer satin algo
2023-04-02meander fixesLex Neva