Skip to main content

Trial library for nesting and laser cutting

Project description

Modules for Laser Cutting

This is a repository containing certain modules required for laser cutting. The code is completely written in python.
Following are the modules currently present:
1. Formation of Shapes
2. Detection of shapes from a .DXF and .svg file or any image(.png, .jpeg or .tiff) file format
3. Nesting of Shapes
Following are the modules to be added:
4. Path-planning & the options of lead-in and lead-out
5. Conversion of machine code

Brief:

1. Formation of Shapes:

i) The dimensions of shapes are to be entered as the input in the code.
ii) The code forms the shape by doing simple mathematical calculations and gives the output in the form of coordinates.

2. Processing of .DXF file:

i) Shapes from the drawing file will be extracted by detecting the individual entities like Polyline, Line, Arc, Circle.
ii) Coordinates are extracted by geometrical calculation on the shapes.

3. Detection of shapes from a .svg file or any image(.png, jpeg or tiff) file format

i) An image is to be provided as the input to let the code detect the shapes. If the file is in ".svg" format, it is first converted to ".png" format. The edges of the shapes are detected using canny operator.
ii) After the detection of shapes from an image, the coordinates of the detected shapes are fetched.

4. Nesting of Shapes:

i) The shapes get automatically nested once we provide the coordinates of the shapes which are entered. More about the nesting is available below in the form of a flowchart.
ii) Nesting is a combination of the following approaches:
a) Bottom-Left approach b) DJD Heuristic approach

These are the images of nested shapes from the Drawing file(.DXF) as file source:

Here are the images of nested shapes from the image as file source:

These are the images depicting contour detection in the cases of images given as inputs:

Flowchart for the modules created presently:

1) Flow chart for extraction of coordinates and/or creation of shapes:

2) Flow chart for nesting of the extracted coordinates from image as file source:

3) Flow Chart for Contour Detection from an image to extracting shape coordinates:

NOTE: Following packages need to be installed for proper usage of this nesting module: 1. ezDXF 2. cv2 2. matplotlib 4.svglib 5.reportlab 6.math 7.time

To-do list:

  1. Optimisation of nesting by adding more functions for distances
  2. Creating the library for the nesting code

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

nestle-mynest-2.7.1.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nestle_mynest-2.7.1-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file nestle-mynest-2.7.1.tar.gz.

File metadata

  • Download URL: nestle-mynest-2.7.1.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.0

File hashes

Hashes for nestle-mynest-2.7.1.tar.gz
Algorithm Hash digest
SHA256 13ae1e0350f026c6deb52db80b902e7c2fdeec98bd0cafa3411b8f8c580edb0d
MD5 54a13415d21a88ace2fdc082210a24e9
BLAKE2b-256 cf080ac76b83e5d422872d61386b5d22c5c0ba150bc97c31242a019062d9f754

See more details on using hashes here.

File details

Details for the file nestle_mynest-2.7.1-py3-none-any.whl.

File metadata

  • Download URL: nestle_mynest-2.7.1-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.0

File hashes

Hashes for nestle_mynest-2.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3ab53350a7d39831e8d67ed6b8834e1fdce93509e9ef5e8fd74c189d84788d68
MD5 5a72ae8212815f66df88fdc3693d6363
BLAKE2b-256 5ba4a590f86de2a1331a42b2352f42ca7b2c34b11810ba49e4073cf7aea44178

See more details on using hashes here.

Supported by

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