Tag Archives: RTN

3D Printing: Conic Slicing for Rotating Tilted Nozzle (RTN) / 4 Axis

State: early draft, mostly simulations with a few tests with 3-axis printer only

Conic sliced overhang model, printing with Rotating Tilted Nozzle (RTN) 90° overhang structure without support
structure

Updates:

  • 2021/03/08: slicer4rtn 0.2.3 reached (still unreleased), better prints, documenting various settings in more details
  • 2021/03/05: added proper ZHAW reference in the introduction and a few notes
  • 2021/02/27: removed some redundant illustrations and remade some of them, outside-cone vs inside-cone mode & printing
  • 2021/02/26: added inside-cone printing example for inner overhang mode, also early information of slicer4rtn; more animations to observe details of produced G-code, using now also OpenSCAD to simulate G-code and actual nozzle position
  • 2021/02/24: better tests with 20mm cube and overhang structure, included two short G-code simulations as videos, added 20mm sphere and 3D Benchy and discover first issues with volume decomposition and overhang recognition
  • 2021/02/23: first write up, pseudo code and first attempt to conic slice 20mm cube

Introduction

The main idea is to utilize existing 3D printing slicers but create conic slices for the Rotating Tilted Nozzle (RTN) 4 Axis Printer. ZHAW published in their announcement in 2021/01 something about utilizing existing slicers, but the details remained concealed and later published as a paper but I did not want to wait and pondered on the problem, and came up with a solution. In its current state it’s purely theoretical and untested for now (2021/02) barely tested yet.

Michael Wüthrich confirmed my solution is comparable with their solution. ZHAW planned their paper to be published sometime 2021. So, the main credit goes to ZHAW and the researchers (Prof. Dr. Wilfried Elspass, Dr. Christian Jaeger, Michael Wüthrich, Maurus Gubser, Philip Bos and Simon Holdener) there, I was just impatient and tried to find a solution with the information available.

I also adapted some of the notions Wüthrich introduced in the Novel 4-Axis 3D Printing Process to Print Overhangs Without Support Material paper, e.g. “outside-cone” and “inside-cone” printing as featured in an earlier blog-post already.

Non-Planar Conic Slices

The 4-axis Rotating Tilted Nozzle (RTN) physical setup implies its slices are of non-planar conic shape, allowing to print overhangs without support structure, such as:

Conic slices of an overhang model

I also like to master the conic slices properly as they promise to become a subset of 5 axis printhead (PAX) features too – so it’s worth the effort even if the RTN itself might be too limited in its application with its fixed tilt – we will see.

Theory

In a nutshell the steps are following:

  1. sub-divide faces of the model (fine-grained)
  2. map model to inverse conic space
  3. send to slicer
  4. remap G-code to conic space
  5. adding Zrot to G-code

Conic Space Mapping

(x1,y1,z1,rot) = conicSpaceMapping(cx,cy,x,y,z,dir);

whereas

  • cx, cy are the conic axis coordinates
  • x, y, z are the input coordinates
  • x1, y1, z1 are the output coordinates
  • rot the rotation angle x,y vs cx,cy
  • dir is either direct (default) or inverse
function conicSpaceMapping(cx,cy,x,y,z,dir='direct') {
   dx = x-cx; 
   dy = y-cy;
   d = sqrt(dx*dx + dy*dy);
   rot = atan2(dy,dx);
   return (x,y,dir=="direct" ? z-d : z+d,rot);
}

Pseudo-Code

The entire procedure goes like this:

m = subDivide(loadModel("cube.stl"),5);
cx = m.minX + (m.maxX-m.minX)/2;
cy = m.minY + (m.maxY-m.minY)/2;
for(i=0; i<m.vertices.length; i++) {
    m.vertices[i] = conicSpaceMapping(cx,cy,
       m.vertices[i][0],m.vertices[i][1],m.vertices[i][2],'inverse');
}

writeSTL(m,"temp.stl");
exec("slicer","temp.stl","temp.gcode");

foreach(line of read_file("temp.gcode")) {
   if ma = line.match("G1 Z([\-\d\.]+)")   // new layer
      z = ma[0];
   else if (x,y,r) = line.match("G1 X([\-\d\.]+) Y([\-\d\.]+)(.*)") {
      (x1,y1,z1,zrot) = conicSpaceMapping(cx,cy,x,y,z,'direct');
      puts("G1 X${x1} Y${y1} Z${z1} A${zrot} ${r}");
   } else
      puts(line);
}

Note: the pseuco-code is incomplete as extrusion E is not yet taken care of, as soon I found a definitive solution I will write it up.

Examples

I implemented the pseudo-code with some more details like taking care of G-code E extrusion as well and fine-step linear extrusion – here some early tests using OpenSCAD as STL & G-code viewer and Slic3r as actual slicer:

20mm Cube Conic Sliced

Snapshots of progress of conic sliced 20mm cube:

20mm cube conic sliced G-code
20mm cube conic sliced with rotating tilted nozzle simulation

Overhang Conic Sliced

Snapshots of progress of conic sliced Overhang:

Conic sliced overhang model
Conic sliced overhang model including rotating tilted nozzle simulation

Gallery of Conic Sliced Models

Using Cura as STL and G-code viewer only:

Issues to Resolve

  • test actual G-code in real life
    • verify Axxx / Zrot , verified with G-code simulator coded with OpenSCAD
    • verify Exxx interpolation
  • find good pre-processing face sub-division strategy
    • in its current form the algorithm requires fine-grained sub-divided faces otherwise inaccurate G-code is created which cannot be recovered
  • slice more complex parts
    • 3D Benchy: requires more thorough examination, e.g. volume decomposition to segment roof apart:

  • document all details
  • release source code to public

Close-Ups

Some close-ups of conic sliced models:

Outside- vs Inside-Cone Printing

As pointed out in the previous blog-post, the RTN has two main modes of operation, outside-cone and inside-cone printing to cover outside overhangs and inside overhangs – the slicer must recognize those and switch operation mode. Further, these two modes cannot easily be mixed, and need to be segmented or separated, hence speaking of volume segmentation.

This poses significant grow of complexity from just planar slicing, the 4 axis RTN provides features to print 90° overhangs without support structure, but only when the part can be properly analysed and segmented so that those operational mode can be applied.

The difference between inside- and outside-cone printing is to change the order of conic mapping for the model and post slicing:

outside-cone mode

  1. map model inverse conic
  2. slice model
  3. map G-code direct conic

inside-cone mode

  1. map model direct conic
  2. slice model
  3. map G-code inverse conic, Zrot + 180°

Slicer4RTN

The pseudo-code turned into an actual application I named slicer4rtn and is a command-line tool, slicing STL into G-code:

USAGE Slicer4RTN 0.2.3: [<opts>] <file.stl> ...
    options:
       -v or --verbose      increase verbosity
       --version            display version and exit
       -k or --keep         keep all temporary files (temp.stl, temp.gcode)
       --subdivide=<n>      set midpoint subdivisions (default: 2)
       --mode=<mode>        set cone mode, either 'outside' or 'inside' (default: 'outside')
       --output=<fname>     override default naming convention file.stl -> file.gcode
       --axis=<axis>        set axis count of printer: 3, 4 or 5 (default: 4)
       --angle=<angle>      set angle of cone (default: 45)
       --center=<cx,cy>     set conic slicing center (default: 0,0)
       --bed-center=<cx,cy> set bed-enter, only affects output G-code (default: 100,100)
       --fixed-rot=<angle>  set fixed rotation angle, usable if --axis=3 but 4-axis or 5-axis printer is target
       --zoff=<v>           define z-offset, will be added to G1 … Z<v>
       --erate=<f>          define extrusion rate (multiplier, default = 1)
       --efmin=<v>          define extrusion factor minimum, (default = 0.01)
       --efmax=<v>          define extrusion factor maximum, (default = 3)
       --motion-minz=<v>    define minimum Z level for motion (without extrusion) (default = 0.2)
       --max-speed=<s>      define maximum speed (default: 0)
       --recenter           recenter model X- & Y-wise
       --core-slicer=<slicer> set slicer (default 'slic3r')
       --slicer.<k>=<v>     add additional slicer arguments, e.g. --slicer.fill-density=0
       --<k>=<v>            all other arguments not for slicer4rtn will be passed to the core slicer (slic3r)

 examples:
       ./slicer4rtn sphere.stl
       ./slicer4rtn overhang.stl --output=sample.gcode
       ./slicer4rtn overhang.stl --axis=5 --output=sample.gcode
       ./slicer4rtn overhang.stl --axis=3 --output=sample-belt-printer.gcode --fill-density=5

and actual usage looks like this:

% slicer4rtn cube.stl 
Slicer4RTN: processing 'cube.stl'
Slicer4RTN:    #1/5 read stl
Slicer4RTN:       #1/2 subdivide (44 vertices)
Slicer4RTN:       #2/2 subdivide (188 vertices)
Slicer4RTN:    #2/5 map vertices
Slicer4RTN:    #3/5 write temporary stl
Slicer4RTN:    #4/5 slice stl
=> Processing triangulated mesh
=> Generating perimeters
=> Preparing infill
=> Infilling layers
=> Exporting G-code to temp.gcode
Done. Process took 0 minutes and 0.570 seconds
Filament required: 706.4mm (5.0cm3)
Slicer4RTN:    #5/5 remap gcode to 'cube.gcode'
Slicer4RTN: done.

I gonna release slicer4rtn eventually, in its early version the model currently can only be sliced for outside-cone or inside-cone printing, so the volume decomposition or segmentation needs to be done separately. For now it helps me to verify some of the 4-axis and 5-axis printer designs I work on.

Ashtar K RTN printing conic sliced 20mm cube (close up, animation)
Ashtar K RTN printing conic sliced overhang model without support structure (close up, animation)

Mode

Defines the outside- or inside-cone mode printing/slicing:

  • outside (default): for outside going overhangs
  • inside: for inside going overhangs

Note: currently you need to define those manually, there is no auto-detection which is where (aka volume decomposition/segmenting).

Subdivide

By default the STL is midpoint divided 2 times (iterations), you may disable it with --subdivide=0 or increase the value which will generate a lot of triangles. In order the procedure to work a fine-grained model is required, especially for very simple models like a cube.

Axis

By using --axis=3 the resulting G-code is non-rotating nozzle yet tilted, like a belt-printer setup, for targeting 5-axis / Penta Axis (PAX) choosing --axis=5 and it sets the G-code B45 (Trot = 45°) for each G1 statement.

Angle

By using --angle=30 the slicing cone angle can be changed:

It might help to experiment to print with ordinary vertical nozzle (non-tilted) to print 90° overhangs, something like this:

--angle=22.5 or a bit less with --axis=4, but printing on a vertical nozzle

As soon I tried it in real-life I will document using slicer4rtn with ordinary setup as well.
Update 2021/03/03: first tests are promising, actually a breakthrough printing 90° overhangs with a vertical nozzle – the most common 3-axis 3D printer setup.

Center

Unlike with ordinary slicers, conic slicing requires to set a center of the conic slicing, it may not be necessarily in the center of the model, but offsetted, this is done with e.g. --center=50,10 as to the STL file; by default --center=0,0.

Note: not all STL files are properly centered, they may be off already; this directly affects the conic center position. Use --recenter switch to force the STL to be centered X- & Y-wise.

Print3r & Slicer4RTN

As of print3r 0.3.2 or later slicer4rtn is supported as well:

  • .config/printer4/printer/<yourprinter>.ini and make a copy like .config/print3r/printer/<yourprinter>-rtn.ini add following lines:
display_update = off
slicer = slicer4rtn
external-perimeter-speed = 10%

and alter the start-gcode line with increasing Z motion as well, e.g for my Prusa-i3 clone it has a M6 threaded rod, which means one revolution (200 full steps) 1mm Z motion, hence

start-gcode = ".....\nM203 Z6\n...."

increased Z motion speed to come close to X- and Y- speed, it creates more even extrusions, nicer prints.

Actual use with print3r goes then like this, my Prusa-i3 clone named y3228-rtn now:

% print3r --printer=y3228-rtn --random-placement print overhang4l4mm.stl
% print3r --printer=y3228-rtn --layer-height=0.3 --fill-density=5 print overhang4l4mm.stl
% print3r --printer=y3228-rtn --scad print 'sphere(10)' --fill-density=5

it slices and forwards the G-code according your setup.

Test Prints

As soon I built the RTN printhead on one of my printers I will post photos of the first prints. For now (2021/03) I only printed conic sliced pieces on a 3-axis 3D printer.

References

As I progress I will update this blog-post.

With conic sliced G-code there are many first layers . . .

That’s it.

3D Printing: Ashtar Series Printhead Options 2021/02

The past weeks (2021/02) I worked on various printhead designs, to summarize and provide an overview by mounting them on Ashtar K:

Also improved the display controller to simulate Marlin firmware and list heads and tool selection (MSE), coordinates (IDEX) or rotation angles (RTN & PAX).

So far all options are available for Ashtar C, D and M as well, but currently (2021/02) are just in draft and mostly untested.

RTN and PAX promise printable support-free overhangs, yet no public available slicing software exists to really take advantage of those two designs, as new algorithms of volume decomposition, sub-volume sequencing, collision detection are required and mostly debated in scientific papers as 2021/02 and only few companies, e.g. HAGE and VSHAPER, implemented new 5-axis 3D printing procedures, and DotXControl advertises a 5 Axis Slicer.

That’s it.