Skip to main content

Package defined to create jigsaw puzzle cut templates, and digital puzzle sets.

Project description

This Python package provides functionality to generate jigsaw puzzle cut templates and digital puzzle sets. It includes functions for creating jigsaw templates, applying cuts, and generating SVG representations.

Installation

You can install the package using pip:

pip install pyjigsaw

Usage

from jigsaw_generator import Cut, Jigsaw

# Create a jigsaw cut template
mycut = Cut(5, 4, image="./Zugpsitze_mountain.jpg", use_image=True)

# Generate a jigsaw set from the cut template
myjig = Jigsaw(mycut, "Zugpsitze_mountain.jpg")
myjig.generate_svg_jigsaw("./Pieces")

Features

Cut Class

The Cut class is responsible for creating jigsaw cut templates. It takes parameters such as the number of pieces in height and width, absolute height and width, an optional image for deriving dimensions, and stroke/fill color specifications.

from jigsaw_generator import Cut


# Create a jigsaw cut template
mycut = Cut(5, 4, image="./Zugpsitze_mountain.jpg", use_image=True)

Jigsaw Class

The Jigsaw class uses a Cut template to generate a set of jigsaw pieces in SVG format. It takes a Cut object and an image file path. The generated SVG files are saved in the specified output directory.

from jigsaw_generator import Jigsaw

# Create a jigsaw set from the cut template
myjig = Jigsaw(mycut, "Zugpsitze_mountain.jpg")
myjig.generate_svg_jigsaw("./Pieces")

Contributing

Feel free to contribute to the project by opening issues or submitting pull requests on GitHub. License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyjigsaw-0.0.1.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

pyjigsaw-0.0.1-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page