博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
3D打印开源切片软件Cura配置步骤
阅读量:6374 次
发布时间:2019-06-23

本文共 8270 字,大约阅读时间需要 27 分钟。

3D打印开源切片软件Cura配置步骤

Cura

====

Read this, it's important!

===========================

If you are reading this, then you are looking at the development version of Cura. If you just want to use Cura, take a look at the following location: https://daid.github.com/Cura

Development

===========

Cura is developed in Python with a C++ engine. The part you are looking at right now is the Python GUI.

The C++ engine is responsible for generating the actual toolpath. For development of the engine check out https://github.com/Ultimaker/CuraEngine

Issues

===========

Before posting issues (either Bugs, Feature requests or Requests for information) please read our policies carefully. These will be regulary updated and can be found at https://github.com/daid/Cura/wiki/Issue-policies

Packaging


Cura development comes with a script "package.sh", this script has been designed to run under *nix OSes (Linux, MacOS, FreeBSD). For Windows the package.sh script can be run from bash using git.

The "package.sh" script generates a final release package. You should not need it during development, unless you are changing the release process. If you want to distribute your own version of Cura, then the package.sh script will allow you to do that.

The "package.sh" script understands a number of envrionement variables defined at the top of the script. Review and adjust settings to match your needs.

Both MacOS and Linux require some extra instructions for development, as you need to prepare an environment. Look below at the proper section to see what is needed.

Fedora


Fedora builds Cura by using mock, thereby enabling it to build RPMs for

every distribution that mock has a configuration file for. In pratice

this means that Fedora can build RPMs for several versions of Fedora, CentOS

and RHEL.

Cura can be built under a regular user account, there is no need to have root

privileges. In fact, having root privileges is very much discouraged.

However, the user account under which the build is performed needs to be a

member of the 'mock' group. This is accomplished as follows:

sudo usermod -a -G mock "$(whoami)"

To install the software that is required to build Cura, run the following

commands:

sudo yum install -y git rpmdevtools rpm-build mock arduino# Ensure that the Arduino tools can be found by the buildsudo mkdir -p /usr/share/arduino/hardware/tools/avrsudo ln -sf /usr/bin /usr/share/arduino/hardware/tools/avr/bin

To build and install Cura, run the following commands:

# Get the Cura software, only required oncegit clone https://github.com/daid/Cura.git Cura# Build for the current systemcd Cura./package.sh fedora# Install on the current systemsudo yum localinstall -y scripts/linux/fedora/RPMS/Cura-*.rpm

Examples of building other configurations:

# Build for Fedora rawhide x86-64 and i386./package.sh fedora fedora-rawhide-x86_64.cfg fedora-rawhide-i386.cfg# Since only the basename of the mock configurations is used, this also works:./package.sh fedora /etc/mock/fedora-21-x86_64.cfg /etc/mock/fedora-rawhide-i386.cfg

Debian and Ubuntu Linux


To build and install Cura, run the following commands:

git clone https://github.com/daid/Cura.gitsudo apt-get install python-opengl python-numpy python-serial python-setuptools python-wxgtk2.8 curlcd Cura./package.sh debian_amd64          # or debian_i386 for 32bit# this will prompt for your root password to run dpkg-debsudo dpkg -i ./scripts/linux/cura*.deb

Mac OS X


The following section describes how to prepare working environment for developing and packaing for Mac OS X.

The working environment consist of build of Python, build of wxPython and all required Python packages.

We assume you already have Apple hardware with and you are familiar with tools like , and . Also ensure you have modern compiler installed.

Install Python

You'll need non-system, framework-based, universal with deployment target set to 10.6 build of Python 2.7

non-system: Output of

python -c "import sys; print sys.prefix"

should not start with "/System/Library/Frameworks/Python.framework/".

framework-based: Output of

python -c "import distutils.sysconfig as c; print(c.get_config_var('PYTHONFRAMEWORK'))"

should be non-empty string. E.g. Python.

universal: Output of

lipo -info `which python`

should include both i386 and x86_64. E.g "Architectures in the fat file: /usr/local/bin/python are: i386 x86_64".

deployment target set to 10.6: Output of

otool -l `which python`

should contain "cmd LC_VERSION_MIN_MACOSX ... version 10.6".

The easiest way to install it is via using the formula from Cura's repo:

brew install --build-bottle --fresh Cura/scripts/darwin/python.rb --universal

Note if you already have Python installed via Homebrew, you have to uninstall it first.

You can also install .

Configure Virtualenv

Create new virtualenv. If you have installed:

mkvirtualenv Cura

wxPython cannot be installed via pip, we have to build it from source by specifing prefix to our virtualenv.

Assuming you have virtualenv at ~/.virtualenvs/Cura/ and at ~/Downloads/wxPython-src-2.9.4.0/:

  1. cd into ~/Downloads/wxPython-src-2.9.4.0/ and configure the sources:

    ./configure \ CFLAGS='-msse2 -mno-sse3 -mno-sse4' \ CXXFLAGS='-msse2 -mno-sse3 -mno-sse4' \ --disable-debug \ --enable-clipboard \ --enable-display \ --enable-dnd \ --enable-monolithic \ --enable-optimise \ --enable-std_string \ --enable-svg \ --enable-unicode \ --enable-universal_binary=i386,x86_64 \ --enable-webkit \ --prefix=$HOME/.virtualenvs/Cura/ \ --with-expat \ --with-libjpeg=builtin \ --with-libpng=builtin \ --with-libtiff=builtin \ --with-macosx-version-min=10.6 \ --with-opengl \ --with-osx_cocoa \ --with-zlib=builtin
  2. make install

    Note to speedup the process I recommend you to enable multicore build by adding the -jcores flag:

    make -j4 install

    Chances are high that compilation will fail with type mismatch error in Obj-C code. If it's the case then apply a patch at scripts/darwin/wxPython-src-2.9.4.0.patch.

    If it won't fix all the errors, just modify source files manually by casting types to those expected by clang.

  3. cd into ~/Downloads/wxPython-src-2.9.4.0/wxPython/

  4. Build wxPython (Note python is the python of your virtualenv):

    python setup.py build_ext \ BUILD_GIZMOS=1 \ BUILD_GLCANVAS=1 \ BUILD_STC=1 \ INSTALL_MULTIVERSION=0 \ UNICODE=1 \ WX_CONFIG=$HOME/.virtualenvs/Cura/bin/wx-config \ WXPORT=osx_cocoa
  5. Install wxPython (Note python is the python of your virtualenv):

    python setup.py install \ --prefix=$HOME/.virtualenvs/Cura \ BUILD_GIZMOS=1 \ BUILD_GLCANVAS=1 \ BUILD_STC=1 \ INSTALL_MULTIVERSION=0 \ UNICODE=1 \ WX_CONFIG=$HOME/.virtualenvs/Cura/bin/wx-config \ WXPORT=osx_cocoa
  6. Create file ~/.virtualenvs/Cura/bin/pythonw with the following content:

    #!/bin/bash ENV=`python -c "import sys; print sys.prefix"` PYTHON=`python -c "import sys; print sys.real_prefix"`/bin/python export PYTHONHOME=$ENV exec $PYTHON "$@"

At this point virtualenv is configured for wxPython development.

Remember to use python for pacakging and pythonw to run app for debugging.

Install Python Packages

Required python packages are specified in requirements.txt and requirements_darwin.txt

If you use virtualenv, installing requirements as easy as pip install -r requirements_darwin.txt

Install Arduino.app

is required to compile certain components used by Cura. Tested version on Mac OS X is 1.0.5 but recent releases should also work.

Package Cura into application

Ensure that virtualenv is activated, so python points to the python of your virtualenv (e.g. ~/.virtualenvs/Cura/bin/python). Use package.sh to build Cura:

./package.sh darwin

Note that application is only guaranteed to work on Mac OS X version used to build and higher, but may not support lower versions.

E.g. Cura built on 10.8 will work on 10.8 and 10.7, but not on 10.6. In other hand, Cura built on 10.6 will work on 10.6, 10.7 and 10.8.

FreeBSD


On FreeBSD simply use the Port Tree (cd /usr/ports/cad/cura) to create (make package) and install (make install) the package as root. Port will check for all necessary dependencies. You can also use the provided binary package with pkg install Cura.

If you want to create an archive for local use the package.sh freebsd script (as an ordinary user) will give you a tarball with the program.

转载于:https://www.cnblogs.com/JarvisCJ/p/7137285.html

你可能感兴趣的文章
u3d游戏开发视频潭州_unity3d教程视频-unity3d教程中文零基础入门/u3d游戏开发/特效案例/项目实战V2.0 最新版 - 极光站...
查看>>
c++区块链实例_cpp 区块链模拟示例(二)工程代码解析
查看>>
hourglass论文_论文笔记 Stacked Hourglass Networks for Human Pose Estimation
查看>>
java 接口的本质_Java基本概念:接口
查看>>
java死锁的解决_java中常见的死锁以及解决方法代码
查看>>
java菜单栏不下拉_我java代码中的下拉列表设好后为什么无法下拉?
查看>>
java传递引用类型的实质_java的引用类型以及值传递
查看>>
java策略模式使用场景,Java设计模式—策略模式
查看>>
RHEL6.3实现基于加密的用户认证验证访问
查看>>
SCCM2012 R2实战系列之十一:解决OSD分发Windows7 系统盘盘符为’D’问题
查看>>
Nginx实战进阶篇一 Nginx反向代理及负载均衡实现过程部署
查看>>
经验分享:我是如何在网店无货源情况下快速出单?
查看>>
为何某些文章的阅读量这么高?
查看>>
当AD服务器置于防火墙内时,所需开放的端口
查看>>
限免的Mac App套件,工程师绝对不可错过
查看>>
Exchange 2013 添加地址列表到脱机通讯簿
查看>>
Skype for Business Server 2015-05-监控和存档服务器-配置
查看>>
浅谈物化视图
查看>>
安装SQL Server 2017
查看>>
超融合超越企业传统存储绕不开的六个问题
查看>>