Giter Club home page Giter Club logo

mandoline-py's Introduction

Mandoline Py

This is a 3D printing STL-to-GCode slicer, written in Python, based on the Clipper geometry library. It will let you take STL files and generate a GCode path file that you can send to your RepRap 3D printer to print the object.

Installation

Install using PyPi (NOT IMPLEMENTED YET):

unzip mandoline-py.zip
cd mandoline-py
pip3 install .

Installing from sources:

python3 setup.py build install

Usage

To just validate a model, checking it for manifold errors, just run mandoline with the name of the file:

mandoline testcube.stl

Any error messages will be printed to STDERR, and the return code will be non-zero if errors were found.

To slice a file into GCode, you need to specify the file to write to with the -o OUTFILE arguments:

mandoline -o testcube.gcode testcube.stl

If you want to force it to skip validation, then add the -n argument:

mandoline -o testcube.gcode -n testcube.stl

To display all slicing config options, use the --show-configs argument:

mandoline --show-configs

To get descriptions about all slicing config options, use the --help-configs argument:

mandoline --help-configs

You can set slicing options on the command-line with -S NAME=VALUE args:

mandoline -S layer_height=0.3 -S skirt_loops=3

You can write changed options to the persistent slicing configs file using the -w argument:

mandoline -S layer_height=0.3 -S brim_loops=3 -w

You can query the value of a slicing config option with the -q OPTNAME argument:

mandoline -q layer_height -q brim_loops

You can view the sliced output in a GUI window if you add the -g argument. In this window, up and down arrow keys will move through the slice layers, and the 'q' key will quit and close the window. The keys 1 - 4 or - and = will zoom the image.

mandoline-py's People

Contributors

cedvano avatar revarbat avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mandoline-py's Issues

Issues when adding new configurations

Thank you so much for this great library! I have been trying to add a power configuration named "power" in order to use it with my machine. However, I keep getting the following error:

C:\Users\edujo\Research>mandoline -S power=350 -w
Loading configs from C:\Users\edujo\AppData\Local\Mandoline\Mandoline
Ignoring unknown config option: power
Saving configs to C:\Users\edujo\AppData\Local\Mandoline\Mandoline

I have already added the configuration into the dictionary in the slicer.py file as well as saved it as "power=350.0" in the txt file.

Here is the configuration in the dictionary:

('power', float, 350., (100., 500.), "Power (mm/s)"),


If possible, I would also love to get some help with the function of the configuration. I need it to display S2 = 350 (or whatever value) in the gcode it is outputting. This is the function that I created for it:

def power(self, filename):
    power = self.conf['power']
    power = 'S2='+power
    with open(filename, "w") as f:
        f.write(power)

Thank you so much for your help!

TypeError when using mandoline on my .stl file

Hello! First of all, thanks for the awesome library... I'm excited to get into it.

I am having an issue running mandoline with my own stl file... here is my command and the stack trace:

image

I did not have this problem when using the cube.stl file included in the test models. Is there something wrong with my stl file? I can't upload it here, but I can send it to you for testing if desired.

Thanks!

Wonderful, but I cannot run it. Is it still working now?

I installed it by "pip install pymuv". And then I key "mandoline-py d.stl
'mandoline-py' is not a code..

When I cd the mast dir of the source file, I test by "python stl_normalize.py", and the error is follow:

File "C:\Users\1\Desktop\mandoline-py-master\mandoline\stl_data.py", line 4, in <module>
   from pyquaternion import Quaternion
ImportError: No module named 'pyquaternion'

Next:
(base) C:\Users\1\Desktop\mandoline-py-master> python test_clipper.py

and get:

Traceback (most recent call last):
  File "test_clipper.py", line 3, in <module>
    import pyclipper
ImportError: No module named 'pyclipper'

So what is the wrong for me to run this code?

mandoline-py: command not found

Hey guys, I love the idea of the project a lot. Just trying to get it work on my machine.
When I run mandoline-py, I get the error: -bash: mandoline-py: command not found.

I've made a virtual environment, just confused as to why it't not running.

Add a disable complex output

I have to say I really like what you did. I wrote a script that takes a .stl file and finds the relatively best printing position based on the amount of support there is, using mandoline. However, having a multithreaded application calling mandoline makes the terminal hell. Would you mind adding a "disable output" flag or a flag to print on success message only?

Type Error when using Mandoline Slicer

Hello,
I am working on a project using Mandoline and am attempting to slice a specific model of a 3D QR code. I am getting the following error

  File "C:\Users\edujo\AppData\Local\Programs\Python\Python39\lib\site-packages\mandoline_py-0.8.2-py3.9.egg\mandoline\vector.py", line 124, in normalize
TypeError: unsupported operand type(s) for /: 'Vector' and 'float'

This is the model I am slicing:
https://imgur.com/a/t4H7MSO

Thank you!

Output material usage

I am considering this tool as a lightweight backend app that can provide cost estimation of an input 3D model. To provide some cost estimation also material usage information is required (along with already provisioned build time). Any plans to implement it in a future?

python 3.6 needed

Bonjour ,
what update for python 3.5 using (python 3.6 not available because corporate proxy) ?
Thanks for help

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.