彩色切片软件

From RepRapWiki
Jump to: navigation, search

Contents

这个软件目前是测试版

软件很有用,但是可能有很多bug[错误]。最新版本的程序代码在Github上。点击此处访问在Github上的项目。

译者序

3D打印爱好者imkzh自愿地在高考前夕翻译这篇文章,大家为我在2013年高考中祈福! 我将在能力允许的范围内尽可能接近地翻译这篇文章。 感谢大家的浏览!

简介

Reprappro-java-host-startup.png

这个页面描述了用于将STL文件切片并转换为用于驱动RepRapPro 3D打印机(例如RepRapPro Tricolour或者RepRapPro Huxley)的G代码的切片工具。这个工具来自RepRapPro Ltd。它基于原始的RepRap Java程序。 我们制作这个程序的原因是我们看到的其他用于切片的软件并不非常好地支持多色或者多材料。这个工具仅仅比其他程序慢一点点(我们会升级它的),但它可以允许你非常简便、直观而又图形化地设置和切出各种颜色和材料的切片。特别地,它允许你:

  1. 以任意角度察看在底板上的整个上色过的3D物体
  2. 选择将被打印的部件和打印顺序。
  3. 指定用支持的材料制造部件(其他程序不行)。
  4. 在打印图纸中添加、删除或移动部件,保存结果以允许将来再次载入进行编辑。
  5. 以任意顺序编辑混合颜色的部件,或者为所有部件设置不使用颜色。
  6. 拥有对清洁器行为的完全控制(To have complete control over the shield that is built to purge and to clean multiple colours/extruders between colour changes.)

这看起来像是一个满足简单要求的切片工具集,事实上它就是。但是不是所有的类似程序都支持以上全部的功能的。

当你运行RepRapPro切片工具时,它将包含两个窗口。左边的是控制台(Console)可以允许你设置将被打印的物体并将它们切片,右边的是RepRap基板的3D视图(STL文件将被载入到它的上面,包含你要制作的物体。)。你可以将它们定位到你喜欢的位置。

软件是开源的,在Github上有它的代码和安装指南。

加载要打印的物体然后保存成G代码

加载RFO按钮

一般情况下,从点击蓝色的Load RFO按钮开始,点击之后将出现一个选择文件的对话框,选择你需要的RFO文件。

物体将被加载到基板上(按照设置好的位置)。

在右边窗口中单击并拖动基板来转换视角,滚动鼠标滚轮用于缩放,右键用于移动视图。

RFO文件详细信息察看RFO文件的详细信息。

保存RFO按钮

不言而喻啊。 用来保存设置过的RFO用于以后的修改。


The Load STL/CSG Button

Reprappro-java-host-stl-load.png

如果要加载单色的单个STL文件物体,单击"Load STL/CSG"按钮。同样地,它也会打开一个文件选择对话框,选择代表你想建造的物体的STL文件(之后将会解释CSG。)

物体将会被加载到基板的中心。一个窗口将弹出(如图所示)供你去选择多少副本(复印件,哈)以及什么材料来建造它们。为物体表面选择材料(Relating infill and support extruders to surface extruders is described below.)

翻译到此暂停,高三党的时间真是金贵,抱歉

以下是一点小小更新,由一个大一学生提供==

As supplied, the software has eight materials selectable. But some of these are actually just different rules for how to treat the same material. Usually you will want to select one of:

  1. PLA - 这个选项控制第一个挤出头.
  2. PLA-without-support - as above, but no support material will be laid down for overhangs in this object.
  3. PLA-green - 第二个挤出头.
  4. PLA-red - 第三个挤出头.

我们在以后会改变这种命名方式的 (这是测试版本...).

接下来的弹出窗口会询问你要打印多少个部件. 它同时会告诉你部件的大小 (which will generally be more than the volume of the material that you will use to print it, unless you use 100% infill, which is possible but not recommended).

大一学生决定先翻译到这里了,以后继续===

Using CSG

In addition, the RepRapPro slicing software allows you to bypass the STL format for generating prints, and use more robust CSG files from OpenSCAD directly instead. This is handled completely automatically once you have generated the appropriate CSG file.

To do that, design (or download someone else's published design for) a model to be printed in OpenSCAD. Export the model from OpenSCAD as an STL file in the usual way (Design->Export as STL...). Call it, say, my_model.stl. In addition, export the CSG representation of the model (Design->Export as CSG) to a file called my_model.csg in the same folder as the STL file you saved. (In older versions of OpenSCAD you have to select Design->Display-CSG-tree..., then copy and paste all the text in the window that pops up into the file my_model.csg.)

When you then load the STL file into the RepRapPro Slicer software as described immediately above, the CSG file will also automatically be found and loaded too. The software will then use the STL file just to render its picture of the object on the build tray. However, all the slicing, outlining, and infilling code that actually prints the model will work directly with the CSG representation and won't use the STL data at all. This is both faster and much more reliable than using STL files to print with.

You don't have to use CSG. The software will work just with STL files alone. But CSG is an extra option.

So far the supported OpenSCAD primitives are cubes, cylinders (including frustums and cones), and spheres. We will soon add extruded polygons, extruded imported DXFs, polyhedra, and imported STL files (in that order, which is also the order of difficulty of doing it...). Note that the final one of those will implicitly (there's a mathematical joke there somewhere) allow any STL file to be converted to CSG.


Variables

This button opens another window that allows you to edit all the many variables that control the production of 3D prints. See this page for a complete list of them and a description of what they all do.

Help

This button opens a web browser and displays this documentation.

Putting things where you want

Reprappro-host-selected-object.png

You may not want to build the parts where they are loaded. If you point at a part with the mouse and left-click, it will change colour, indicating that it has been selected. You can then slide it about the base with the right mouse button to the position you want to build it in. The grid squares on the green base have 20 mm sides. You can rotate the selected object in 90o clicks about the X and Y coordinate axes by <ctrl> X and <ctrl> Y. Z rotation is done by <ctrl> Z, which rotates in 45o increments around Z. If your STL file was in inches you can scale the selected object to millimeters by multiplying by 25.4 with <ctrl> I. To delete the selected object use the <DELETE> key.

To see more options, including much finer Z rotation, click on the "Click here for help" tab.

To release the selected object, left-mouse-click on any other part of the grey base. You will then be able to use the mouse to zoom, rotate and slide everything as one again.


Printing more than one thing at once

Reprappro-java-host-print-order.png

You can load several STL files to build at once, either of different objects, or multiple copies of the same object. Just click on the blue "Load STL" button again, then position them in different places. Leave a gap of about two or three millimetres between different objects to be built. Make sure that previously-loaded objects are not selected when you load a new one (loading new objects attached to previous ones is a special feature for printing in multiple materials that is described below). If you are building a small object and a large object with a hole, and the smaller fits inside the larger, then doing that to save space is a good idea. Make sure they don't touch (look straight down from above).

By default parts are printed in the order in which you load them. But when you have multiple parts loaded it is sometimes hard to remember what that order is. If you select one of the parts, typing <ctrl> N (next) will show you the next in the printing order. The sequence cycles: when you get to the last one, it moves on to the first. If no part is selected, <ctrl> N selects the first to be built.

If you want to reorder the build sequence, type <ctrl> R (reorder). Then select the parts in turn with the mouse in the order that you want them built. The system will highlight them as you go along so you can remember what you've done. When you select the penultimate part it, then the ultimate part, are automatically added to the new order and the highlighting is reset. You can use <ctrl> N to check your new order.

The picture on the right shows a reasonable ordering, though it would probably be better if all the parts were nearer the middle of the bed. Put parts close to other parts of roughly the same height. Generate an order so that there are no long moves between parts. If you do all the low parts together (order numbers 2 through 5 here) when they are finished the machine will simply move straight from Part 1 to Part 6. Try to end the ordering with the last part near to the first part.

You can also load one or more RFO files with the "Load RFO" button, select individual parts in them, move them about, or delete them, and add extra STL files. You can then save the whole arrangement as a new (or the same) RFO file.

Finally, you can change the material that a part is made from by selecting it then typing <ctrl> M (material). A material selector will come up to allow you to specify a different material. (The selector is the same as the one that you used to specify material when the part was loaded, but with the number-of-copies option disabled.)

If you have several STL files loaded in a pattern that you may want to use again, you can save the whole lot by selecting the "Save RFO" button. Any CSG files that you are using will be saved in the RFO file as well, and will be re-acquired automatically when you re-load it.


Printing things made from more than one material

Reprappro-java-host-openscad-colours.png

This picture shows three interlocking but separate shapes designed in OpenSCAD as a test piece.

Here is the OpenSCAD program:

green();
red();
white();

module green()
{
	color("green")
	difference()
	{
		translate([0,0,1])
			cube([30,30,2], center=true);
		white();
		red();
	}
}

module white()
{
		color("white")
		translate([0,0,2.5])
			cylinder(r=10,h=5,center=true, $fn=30);
}

module red()
{
	color("red")
	difference()
	{
		translate([0,0,1.5])
			difference()
			{
				cube([35,35,3], center=true);
				for(x=[-1,1])
					for(y=[-1,1])
						translate([x*20,y*20,0])
							cube([35,35,5], center=true);
			}
		white();
	}
}

Save the three separate coloured components as three STL (and CSG as well if you want) files by commenting out the two unwanted colours:

//green();
//red();
white();

then evaluating and saving just the one object (white(); in this instance) as, say, white.stl.

You don't have to use OpenSCAD to generate coloured models in this way. Virtually any 3D CAD system will do as long as it saves its STL files in the correct location in the 3D space in which they were designed.


Reprappro-java-host-load-white.png Reprappro-java-host-load-green.png Reprappro-java-host-load-all.png

Then load the STL of the shape that is the base or reference object into the RepRapPro slicing program - here we have made that reference object the central white cylinder. Make sure to use a part of the multi-material object that you are building that will be on the build-base as a reference object. Don't use one that will be in mid air. Choose the material to make the reference object from, then select it (so it changes colour to selected, as in the left-hand picture) and leave it at the centre where it was loaded (though you can move it if you want).

Then load the second STL for the second shape (green.stl, say) and choose its material. It will be positioned in the correct (i.e. designed) position relative to the first, and they will both be locked together in this relative positioning. Leave both objects selected (and therefore coloured as in the middle picture).

Finally load the red STL, then click on the grey base to deselect the resulting composite object (right picture).

If you select the base shape (white in this instance), you can then move the composite object about the build base as one thing to the position where you want to build it. Remember that all the print heads have to reach the coloured parts of your print, so put it near the middle.

If you save one or more of these combined objects as an RFO file, they will be re-loaded in the correct orientation and position when you subsequently read that file in.

Infill and support

Obviously, to print in multiple colours, the RepRapPro slicing software is capable of dealing with multiple physical extruders depositing multiple materials. In addition, one physical material may have several logical extruders associated with it. These logical extruders can have different parameters associated with them, so that, for example, one might be used to extrude material-A finely for the surfaces of a part to be printed, another might be used to extrude material-A coarsely for quick solid infill of the part, and a third might extrude material-A in a deliberately weak pattern to form a support for overhangs that can easily be broken away. Alternatively, you can outline in material-A, infill in material-B and support with material-C.

You can change all the many parameters of each extruder by clicking on "Variables".

In the variables for each extruder are fields containing the names of two other extruders: InFillMaterialType(name) and SupportMaterialType(name). These are the extruders to use to build infill pattens and support patterns respectively for the material for the extruder that names them. See the description of variables for full details. To turn infill or support off for a particular material, change the appropriate material field to be called "null" (without the quotes).

Microlayering

The RepRapPro Slicer software allows you to set different layer heights for different extruders (which may correspond to different materials, or different settings for the same material). This allows you, for example, to outline an object with a very fine layer height (thus reducing the staircase effect on surfaces and producing much smoother vertical faces) whilst infilling with a much coarser height, thus working faster.

To use this start by getting the machine working well with all extruders set to have the same height. Choose a height that is easy to subdivide (such as 0.24 mm or 0.36mm) rather than one that isn't (such as 0.25 mm). 24 and 36 have many more prime factors than 25.

Then, to plot outlines as fine layers, select the default outline materials (PLA or PLA-no-support) from the Variables Menu, and set their layer heights to the value you want - say 0.12 mm.

That is one-half the height you used to get the machine working (0.24mm). This will also extrude one half the material for a given distance than it did before.

Finally, you may want to increase the value of Extruder0_SurfaceLayers(0..N). This will ensure that upward and downward facing surfaces get finely infilled to a sufficient depth to give a good result.

You must always set extruder heights to simple integer multiples of each other. Thus if the thickest material is 0.24mm thick, others can be 0.01, 0.02, 0.03, 0.04, 0.06, 0.08, 0.12 and (of course) 0.24mm thick.

In practice, you will find that some objects won't print well with a layer height much less than 0.1mm because so little material is coming out of the nozzle for that that the bridging of overhangs and gaps between the print on the layer below.

Sending the G-Codes to a file

Reprappro-java-host-slice-finished.jpg

Before you generate a GCode file to send to your RepRap, you must first save the layout of parts on the bed with the "Save RFO" button if you want to keep it. The software will prompt you to do this.

When you are happy with the layout select "Slice". This will put up another file-selector window to allow you to specify the G-Code file that you want to save the results in.

If you wish, before selecting "Slice" you can select "Show paths when slicing". This will open a graphics window that will show the paths that the machine will follow to make each Z-slice of the objects being printed.

You can also select "Pause between layers". This pauses the generation of output at the end of each layer to allow you to inspect the slice pattern. Then Continue/Cancel buttons will be displayed as each layer is about to be written to allow you to continue or to cancel the whole process.

If you have debugging turned on (See Variables) then comments will be written into the GCode file saying what each line does. That will more-or-less double the size of the file. If you turn debugging off you will get almost no comments: a couple of header comments will be written into the file saying when it was computed and how big the object being printed is, and a comment line will be written at the start of each new layer to track that.

When the GCode file has been written, the program will exit. The picture on the right shows this about to happen (when the OK button is clicked).

But, you ask, what is that mysterious extra white rectangle that is on the left? This is the shield that can be automatically added to multi-material prints to give the machine somewhere to purge and clean the nozzles between material changes. It is built along with the print (so it is always the same height), and the well in the middle is used to purge the nozzles to prevent ooze from the wrong nozzle getting on your print. Details are here.

To print your GCode file that you just generated on your RepRap machine, see this page.

Saving as an OpenSCAD file

The "Save SCAD" button allows you to save the set of parts you've laid out on the tray as an OpenSCAD model.

It prompts you to specify a directory. All the STL files you have on the tray are copied into that, then the software creates an OpenSCAD program in that directory that moves the STLs to the right place and takes their set union. That is to say, the entire tray is then a single OpenSCAD object, which you can, for example, then write out as a single STL file.

Note that this will not preserve colour/material information.