inksim 0.3.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- inksim/__init__.py +5 -0
- inksim/__main__.py +23 -0
- inksim/assets/InkSim_colorful_small.png +0 -0
- inksim/assets/app_icons/inksim.svg +30 -0
- inksim/assets/thread_textures/bold_4strand_cap_mask.png +0 -0
- inksim/assets/thread_textures/bold_4strand_manifest.json +15 -0
- inksim/assets/thread_textures/bold_4strand_normal_mask.png +0 -0
- inksim/assets/thread_textures/classic_3strand_cap_mask.png +0 -0
- inksim/assets/thread_textures/classic_3strand_manifest.json +15 -0
- inksim/assets/thread_textures/classic_3strand_normal_mask.png +0 -0
- inksim/assets/thread_textures/fuzzy_3strand_cap_mask.png +0 -0
- inksim/assets/thread_textures/fuzzy_3strand_manifest.json +15 -0
- inksim/assets/thread_textures/fuzzy_3strand_normal_mask.png +0 -0
- inksim/assets/thread_textures/gap_2strand_cap_mask.png +0 -0
- inksim/assets/thread_textures/gap_2strand_manifest.json +15 -0
- inksim/assets/thread_textures/gap_2strand_normal_mask.png +0 -0
- inksim/assets/thread_textures/loose_twist_cap_mask.png +0 -0
- inksim/assets/thread_textures/loose_twist_manifest.json +15 -0
- inksim/assets/thread_textures/loose_twist_normal_mask.png +0 -0
- inksim/assets/thread_textures/soft_2strand_cap_mask.png +0 -0
- inksim/assets/thread_textures/soft_2strand_manifest.json +15 -0
- inksim/assets/thread_textures/soft_2strand_normal_mask.png +0 -0
- inksim/assets/thread_textures/thick_6strand_cap_mask.png +0 -0
- inksim/assets/thread_textures/thick_6strand_manifest.json +15 -0
- inksim/assets/thread_textures/thick_6strand_normal_mask.png +0 -0
- inksim/assets/thread_textures/thin_2strand_cap_mask.png +0 -0
- inksim/assets/thread_textures/thin_2strand_manifest.json +15 -0
- inksim/assets/thread_textures/thin_2strand_normal_mask.png +0 -0
- inksim/assets/thread_textures/tight_twist_cap_mask.png +0 -0
- inksim/assets/thread_textures/tight_twist_manifest.json +15 -0
- inksim/assets/thread_textures/tight_twist_normal_mask.png +0 -0
- inksim/cli.py +449 -0
- inksim/config.py +181 -0
- inksim/constants.py +62 -0
- inksim/debug.py +33 -0
- inksim/formats.py +100 -0
- inksim/gui/__init__.py +4 -0
- inksim/gui/about.py +85 -0
- inksim/gui/config_editor.py +88 -0
- inksim/gui/dialogs.py +287 -0
- inksim/gui/export_dialog.py +304 -0
- inksim/gui/frame.py +1309 -0
- inksim/gui/gl_viewer.py +998 -0
- inksim/gui/help.py +110 -0
- inksim/gui/renderer_picker.py +84 -0
- inksim/gui/settings.py +94 -0
- inksim/gui/shortcuts.py +361 -0
- inksim/gui/splash.py +136 -0
- inksim/gui/status.py +356 -0
- inksim/gui/timeline.py +210 -0
- inksim/gui/viewer.py +1863 -0
- inksim/interconnect.py +264 -0
- inksim/render/__init__.py +25 -0
- inksim/render/density.py +114 -0
- inksim/render/export.py +124 -0
- inksim/render/fabric.py +68 -0
- inksim/render/grid.py +147 -0
- inksim/render/previews.py +75 -0
- inksim/render/registry.py +92 -0
- inksim/render/stitches.py +20 -0
- inksim/render/stitches_gl.py +819 -0
- inksim/render/stitches_numba.py +477 -0
- inksim/render/stitches_qt.py +46 -0
- inksim/render/viewport.py +63 -0
- inksim/runtime.py +118 -0
- inksim/update_check.py +128 -0
- inksim-0.3.11.dist-info/METADATA +115 -0
- inksim-0.3.11.dist-info/RECORD +70 -0
- inksim-0.3.11.dist-info/WHEEL +4 -0
- inksim-0.3.11.dist-info/entry_points.txt +6 -0
inksim/__init__.py
ADDED
inksim/__main__.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 Authors (see git history)
|
|
2
|
+
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
3
|
+
|
|
4
|
+
"""Package entry point for ``python -m inksim``.
|
|
5
|
+
|
|
6
|
+
Running ``cli.py`` directly does not give it a package context, so its
|
|
7
|
+
relative imports (for example ``from .constants import ...``) cannot work.
|
|
8
|
+
Starting the package with ``python -m inksim`` makes Python load this module
|
|
9
|
+
as ``inksim.__main__`` and preserves that context.
|
|
10
|
+
|
|
11
|
+
This module deliberately contains no CLI logic. It delegates to ``cli`` so
|
|
12
|
+
there is one implementation of ``main()`` for both ``python -m inksim`` and
|
|
13
|
+
the installed ``inksim`` console command. Launchers may invoke this module
|
|
14
|
+
without changing the caller's working directory, so paths supplied by the
|
|
15
|
+
user keep their expected meaning. The project launcher can use either its
|
|
16
|
+
``.venv`` Python interpreter when available or the system ``python3`` as a
|
|
17
|
+
fallback; both launch modes execute ``python -m inksim``.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from .cli import main
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
main()
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="512" height="512" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<!-- Hoop outer wood -->
|
|
4
|
+
<circle cx="256" cy="256" r="210" fill="#E9C99F" />
|
|
5
|
+
<circle cx="256" cy="256" r="210" fill="none" stroke="#D2A679" stroke-width="4" opacity="0.4"/>
|
|
6
|
+
<!-- Inner white fabric -->
|
|
7
|
+
<circle cx="256" cy="256" r="175" fill="white" stroke="#D2A679" stroke-width="8"/>
|
|
8
|
+
|
|
9
|
+
<!-- X stitches - 4 colorful, thick rounded -->
|
|
10
|
+
<!-- Top-left Pink -->
|
|
11
|
+
<g stroke-linecap="round" stroke-linejoin="round">
|
|
12
|
+
<line x1="115" y1="140" x2="205" y2="230" stroke="#EA1A8A" stroke-width="32"/>
|
|
13
|
+
<line x1="205" y1="140" x2="115" y2="230" stroke="#EA1A8A" stroke-width="32"/>
|
|
14
|
+
</g>
|
|
15
|
+
<!-- Top-right Yellow -->
|
|
16
|
+
<g stroke-linecap="round" stroke-linejoin="round">
|
|
17
|
+
<line x1="307" y1="140" x2="397" y2="230" stroke="#FFC800" stroke-width="32"/>
|
|
18
|
+
<line x1="397" y1="140" x2="307" y2="230" stroke="#FFC800" stroke-width="32"/>
|
|
19
|
+
</g>
|
|
20
|
+
<!-- Bottom-left Cyan -->
|
|
21
|
+
<g stroke-linecap="round" stroke-linejoin="round">
|
|
22
|
+
<line x1="115" y1="282" x2="205" y2="372" stroke="#00B8E6" stroke-width="32"/>
|
|
23
|
+
<line x1="205" y1="282" x2="115" y2="372" stroke="#00B8E6" stroke-width="32"/>
|
|
24
|
+
</g>
|
|
25
|
+
<!-- Bottom-right Green -->
|
|
26
|
+
<g stroke-linecap="round" stroke-linejoin="round">
|
|
27
|
+
<line x1="307" y1="282" x2="397" y2="372" stroke="#5BC500" stroke-width="32"/>
|
|
28
|
+
<line x1="397" y1="282" x2="307" y2="372" stroke="#5BC500" stroke-width="32"/>
|
|
29
|
+
</g>
|
|
30
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bold_4strand",
|
|
3
|
+
"width": 528,
|
|
4
|
+
"height": 128,
|
|
5
|
+
"twist_periods": 3.0,
|
|
6
|
+
"strand_radius": 20.0,
|
|
7
|
+
"helix_radius": 10.0,
|
|
8
|
+
"num_strands": 4,
|
|
9
|
+
"strand_spacing": 0.0,
|
|
10
|
+
"blend_softness": 2.0,
|
|
11
|
+
"fiber_noise": 0.06,
|
|
12
|
+
"width_fraction": 0.453125,
|
|
13
|
+
"cap_radius_px": 34.0,
|
|
14
|
+
"cap_radius_fraction": 0.265625
|
|
15
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "classic_3strand",
|
|
3
|
+
"width": 528,
|
|
4
|
+
"height": 128,
|
|
5
|
+
"twist_periods": 3.0,
|
|
6
|
+
"strand_radius": 24.0,
|
|
7
|
+
"helix_radius": 11.0,
|
|
8
|
+
"num_strands": 3,
|
|
9
|
+
"strand_spacing": 0.0,
|
|
10
|
+
"blend_softness": 2.5,
|
|
11
|
+
"fiber_noise": 0.06,
|
|
12
|
+
"width_fraction": 0.5170454545454546,
|
|
13
|
+
"cap_radius_px": 39.0,
|
|
14
|
+
"cap_radius_fraction": 0.3046875
|
|
15
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fuzzy_3strand",
|
|
3
|
+
"width": 528,
|
|
4
|
+
"height": 128,
|
|
5
|
+
"twist_periods": 3.0,
|
|
6
|
+
"strand_radius": 24.0,
|
|
7
|
+
"helix_radius": 11.0,
|
|
8
|
+
"num_strands": 3,
|
|
9
|
+
"strand_spacing": 0.0,
|
|
10
|
+
"blend_softness": 2.5,
|
|
11
|
+
"fiber_noise": 0.14,
|
|
12
|
+
"width_fraction": 0.5170454545454546,
|
|
13
|
+
"cap_radius_px": 39.0,
|
|
14
|
+
"cap_radius_fraction": 0.3046875
|
|
15
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gap_2strand",
|
|
3
|
+
"width": 528,
|
|
4
|
+
"height": 128,
|
|
5
|
+
"twist_periods": 3.0,
|
|
6
|
+
"strand_radius": 22.0,
|
|
7
|
+
"helix_radius": 12.0,
|
|
8
|
+
"num_strands": 2,
|
|
9
|
+
"strand_spacing": 12.0,
|
|
10
|
+
"blend_softness": 2.0,
|
|
11
|
+
"fiber_noise": 0.06,
|
|
12
|
+
"width_fraction": 0.5771484375,
|
|
13
|
+
"cap_radius_px": 50.0,
|
|
14
|
+
"cap_radius_fraction": 0.390625
|
|
15
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "loose_twist",
|
|
3
|
+
"width": 528,
|
|
4
|
+
"height": 128,
|
|
5
|
+
"twist_periods": 2.0,
|
|
6
|
+
"strand_radius": 24.0,
|
|
7
|
+
"helix_radius": 11.0,
|
|
8
|
+
"num_strands": 3,
|
|
9
|
+
"strand_spacing": 0.0,
|
|
10
|
+
"blend_softness": 2.5,
|
|
11
|
+
"fiber_noise": 0.06,
|
|
12
|
+
"width_fraction": 0.5171638257575758,
|
|
13
|
+
"cap_radius_px": 39.0,
|
|
14
|
+
"cap_radius_fraction": 0.3046875
|
|
15
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "soft_2strand",
|
|
3
|
+
"width": 528,
|
|
4
|
+
"height": 128,
|
|
5
|
+
"twist_periods": 3.0,
|
|
6
|
+
"strand_radius": 28.0,
|
|
7
|
+
"helix_radius": 14.0,
|
|
8
|
+
"num_strands": 2,
|
|
9
|
+
"strand_spacing": 0.0,
|
|
10
|
+
"blend_softness": 3.5,
|
|
11
|
+
"fiber_noise": 0.06,
|
|
12
|
+
"width_fraction": 0.5763494318181818,
|
|
13
|
+
"cap_radius_px": 46.0,
|
|
14
|
+
"cap_radius_fraction": 0.359375
|
|
15
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "thick_6strand",
|
|
3
|
+
"width": 528,
|
|
4
|
+
"height": 128,
|
|
5
|
+
"twist_periods": 3.0,
|
|
6
|
+
"strand_radius": 18.0,
|
|
7
|
+
"helix_radius": 12.0,
|
|
8
|
+
"num_strands": 6,
|
|
9
|
+
"strand_spacing": 0.0,
|
|
10
|
+
"blend_softness": 1.5,
|
|
11
|
+
"fiber_noise": 0.06,
|
|
12
|
+
"width_fraction": 0.4600497159090909,
|
|
13
|
+
"cap_radius_px": 34.0,
|
|
14
|
+
"cap_radius_fraction": 0.265625
|
|
15
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "thin_2strand",
|
|
3
|
+
"width": 528,
|
|
4
|
+
"height": 128,
|
|
5
|
+
"twist_periods": 3.0,
|
|
6
|
+
"strand_radius": 16.0,
|
|
7
|
+
"helix_radius": 8.0,
|
|
8
|
+
"num_strands": 2,
|
|
9
|
+
"strand_spacing": 0.0,
|
|
10
|
+
"blend_softness": 2.0,
|
|
11
|
+
"fiber_noise": 0.06,
|
|
12
|
+
"width_fraction": 0.3290127840909091,
|
|
13
|
+
"cap_radius_px": 28.0,
|
|
14
|
+
"cap_radius_fraction": 0.21875
|
|
15
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tight_twist",
|
|
3
|
+
"width": 528,
|
|
4
|
+
"height": 128,
|
|
5
|
+
"twist_periods": 6.0,
|
|
6
|
+
"strand_radius": 24.0,
|
|
7
|
+
"helix_radius": 11.0,
|
|
8
|
+
"num_strands": 3,
|
|
9
|
+
"strand_spacing": 0.0,
|
|
10
|
+
"blend_softness": 2.5,
|
|
11
|
+
"fiber_noise": 0.06,
|
|
12
|
+
"width_fraction": 0.5174005681818182,
|
|
13
|
+
"cap_radius_px": 39.0,
|
|
14
|
+
"cap_radius_fraction": 0.3046875
|
|
15
|
+
}
|
|
Binary file
|