Code Monkey home page Code Monkey logo

freecut's Introduction

freecut

freecut is a free and open source cut optimizer software for optimizing rectangular cut pieces from panels. It is easy to use and after you have made the entries in the gui, a pdf file is created with the result.

This software is written in Rust using the Rust bindings for the FLTK Graphical User Interface library fltk-rs, comfy-table, pdf-canvas and the genetic algorithms and heuristics from the cut-optimizer-2d crate.

Screenshot gui0 Screenshot gui1 Screenshot pdf

Installation

Linux and other

First install cargo and cmake, which is a dependency of fltk-sys.

Now, compile the freecut-crate:

cargo install freecut

Usage

This software helps you to optimize panel cuts.

Add a stockpiece

To add a stockpiece, fill all fields and press the "add" Button, the stockpiece will apear in the table in the output fields.

Add a cutpiece

To add a cutpiece, fill all fields and press the "add" Button, the cutpiece will apear in the table in the output.

Pattern

If a pattern on the workpiece is to be taken into account, then select the respective direction. In this case, however, a pattern must also be selected on each cutpiece.

Optimize

Choose a cutwidth between 1 and 15mm and a prefered Layout. Guillotine-Layout is better for panel-saws. Now press the [optimize]-Button and a pdf-File with a solution will be generated.

Contributions

Contributions are welcome, please create an issue or pull request.

freecut's People

Contributors

geri1701 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

freecut's Issues

Doesnt compile on Fedora 33

Hi,

unfortunately, i cannot compile freecut on Fedora. It aborts in last step:

   Compiling fltk v0.15.15
   Compiling freecut v0.1.9
error[E0277]: `Option<usize>` doesn't implement `std::fmt::Display`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/freecut-0.1.9/src/func.rs:53:25
   |
53 |                         cutp.external_id, cutp.width, cutp.length
   |                         ^^^^^^^^^^^^^^^^ `Option<usize>` cannot be formatted with the default formatter
   |
   = help: the trait `std::fmt::Display` is not implemented for `Option<usize>`
   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
   = note: this error originates in the macro `$crate::__export::format_args` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: the method `to_string` exists for enum `Option<usize>`, but its trait bounds were not satisfied
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/freecut-0.1.9/src/func.rs:80:43
    |
80  |                           &cutp.external_id.to_string(),
    |                                             ^^^^^^^^^ method cannot be called on `Option<usize>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `Option<usize>: std::fmt::Display`
            which is required by `Option<usize>: ToString`

error[E0308]: mismatched types
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/freecut-0.1.9/src/func.rs:197:34
    |
197 |                     external_id: generate_uid(used_id),
    |                                  ^^^^^^^^^^^^^^^^^^^^^
    |                                  |
    |                                  expected enum `Option`, found `usize`
    |                                  help: try using a variant of the expected enum: `Some(generate_uid(used_id))`
    |
    = note: expected enum `Option<usize>`
               found type `usize`

Some errors have detailed explanations: E0277, E0308, E0599.
For more information about an error, try `rustc --explain E0277`.
error: failed to compile `freecut v0.1.9`, intermediate artifacts can be found at `/tmp/cargo-installSkBUMB`

Caused by:
  could not compile `freecut` due to 3 previous errors

Unable to download on mac

error: failed to run custom build command for fltk-sys v0.15.14

Caused by:
process didn't exit successfully: /var/folders/st/4s7_cfkn2cs6k0zbxvtr1f680000gn/T/cargo-installwZvg2j/release/build/fltk-sys-8b39f08763fe5d7d/build-script-build (exit status: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rerun-if-env-changed=CC
cargo:rerun-if-env-changed=CXX
cargo:rerun-if-changed=cfltk/CMakeLists.txt
cargo:rerun-if-changed=cfltk/include/cfl.h
cargo:rerun-if-changed=cfltk/include/cfl_widget.h
cargo:rerun-if-changed=cfltk/include/cfl_group.h
cargo:rerun-if-changed=cfltk/include/cfl_input.h
cargo:rerun-if-changed=cfltk/include/cfl_output.h
cargo:rerun-if-changed=cfltk/include/cfl_window.h
cargo:rerun-if-changed=cfltk/include/cfl_button.h
cargo:rerun-if-changed=cfltk/include/cfl_box.h
cargo:rerun-if-changed=cfltk/include/cfl_menu.h
cargo:rerun-if-changed=cfltk/include/cfl_dialog.h
cargo:rerun-if-changed=cfltk/include/cfl_valuator.h
cargo:rerun-if-changed=cfltk/include/cfl_browser.h
cargo:rerun-if-changed=cfltk/include/cfl_misc.h
cargo:rerun-if-changed=cfltk/include/cfl_text.h
cargo:rerun-if-changed=cfltk/include/cfl_image.h
cargo:rerun-if-changed=cfltk/include/cfl_draw.h
cargo:rerun-if-changed=cfltk/include/cfl_table.h
cargo:rerun-if-changed=cfltk/include/cfl_surface.h
cargo:rerun-if-changed=cfltk/include/cfl_printer.h
cargo:rerun-if-changed=cfltk/src/cfl_global.hpp
cargo:rerun-if-changed=cfltk/src/cfl_new.cpp
cargo:rerun-if-changed=cfltk/src/cfl.cpp
cargo:rerun-if-changed=cfltk/src/cfl_widget.cpp
cargo:rerun-if-changed=cfltk/src/cfl_group.cpp
cargo:rerun-if-changed=cfltk/src/cfl_window.cpp
cargo:rerun-if-changed=cfltk/src/cfl_button.cpp
cargo:rerun-if-changed=cfltk/src/cfl_box.cpp
cargo:rerun-if-changed=cfltk/src/cfl_menu.cpp
cargo:rerun-if-changed=cfltk/src/cfl_dialog.cpp
cargo:rerun-if-changed=cfltk/src/cfl_valuator.cpp
cargo:rerun-if-changed=cfltk/src/cfl_browser.cpp
cargo:rerun-if-changed=cfltk/src/cfl_misc.cpp
cargo:rerun-if-changed=cfltk/src/cfl_text.cpp
cargo:rerun-if-changed=cfltk/src/cfl_image.cpp
cargo:rerun-if-changed=cfltk/src/cfl_input.cpp
cargo:rerun-if-changed=cfltk/src/cfl_output.cpp
cargo:rerun-if-changed=cfltk/src/cfl_draw.cpp
cargo:rerun-if-changed=cfltk/src/cfl_table.cpp
cargo:rerun-if-changed=cfltk/src/cfl_tree.cpp
cargo:rerun-if-changed=cfltk/src/cfl_surface.cpp
cargo:rerun-if-changed=cfltk/src/cfl_printer.cpp
CMAKE_TOOLCHAIN_FILE_aarch64-apple-darwin = None
CMAKE_TOOLCHAIN_FILE_aarch64_apple_darwin = None
HOST_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_GENERATOR_aarch64-apple-darwin = None
CMAKE_GENERATOR_aarch64_apple_darwin = None
HOST_CMAKE_GENERATOR = None
CMAKE_GENERATOR = None
CMAKE_PREFIX_PATH_aarch64-apple-darwin = None
CMAKE_PREFIX_PATH_aarch64_apple_darwin = None
HOST_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = None
CMAKE_aarch64-apple-darwin = None
CMAKE_aarch64_apple_darwin = None
HOST_CMAKE = None
CMAKE = None
running: cd "/var/folders/st/4s7_cfkn2cs6k0zbxvtr1f680000gn/T/cargo-installwZvg2j/release/build/fltk-sys-bbc86d6cc68d5b7b/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/Users/shubhamjain/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fltk-sys-0.15.14/cfltk" "-DCMAKE_OSX_ARCHITECTURES=arm64" "-DOPTION_USE_SYSTEM_LIBPNG=OFF" "-DOPTION_USE_SYSTEM_LIBJPEG=OFF" "-DOPTION_USE_SYSTEM_ZLIB=OFF" "-DCFLTK_LINK_IMAGES=ON" "-DOpenGL_GL_PREFERENCE=GLVND" "-DOPTION_USE_GL=OFF" "-DCFLTK_USE_OPENGL=OFF" "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" "-DFLTK_BUILD_EXAMPLES=OFF" "-DFLTK_BUILD_TEST=OFF" "-DOPTION_USE_THREADS=ON" "-DOPTION_LARGE_FILE=ON" "-DOPTION_BUILD_HTML_DOCUMENTATION=OFF" "-DOPTION_BUILD_PDF_DOCUMENTATION=OFF" "-DCMAKE_INSTALL_PREFIX=/var/folders/st/4s7_cfkn2cs6k0zbxvtr1f680000gn/T/cargo-installwZvg2j/release/build/fltk-sys-bbc86d6cc68d5b7b/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -arch arm64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -arch arm64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -arch arm64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"

--- stderr
fatal: not a git repository (or any of the parent directories): .git
thread 'main' panicked at /Users/shubhamjain/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:

failed to execute command: No such file or directory (os error 2)
is cmake not installed?

build script failed, must exit now
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile freecut v0.1.10, intermediate artifacts can be found at /var/folders/st/4s7_cfkn2cs6k0zbxvtr1f680000gn/T/cargo-installwZvg2j.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.