Freesteel Blog » Barmesh slicer beginnings

Barmesh slicer beginnings

Wednesday, December 3rd, 2014 at 7:43 pm Written by:

By popular demand, I am working on a new Z-slicing algorithm, which is open source and in Python and can be found here. (My latest parts order is taking too long to be picked and come in the post.)

The code is not in any state to be used by anyone as I conduct some very meandering software development. I am unexpectedly basing everything on these BarMesh structures. This is a neat way to represent a triangulated manifold, such as the STL triangle file that contains the 3D input geometry. But also, instead of basing the slice on a strict XY grid (or weave) as I’ve done before, I’m using a second BarMesh to handle the 2D partitioning of the plane.


I don’t really know what I am doing, but if it gets messy and results in malformed folded cells, at least I can choose to constrain the BarMesh to conform to an XY grid weave structure, which I know works.

I’m just slicing (with a radius) against the points in the input geometry as this creates a more difficult slice geometry to begin with (here it’s an impeller shape with 38474 triangles, so I’m not starting with a toy example).

When the slicer is working, I can extend the code to test against the edges and faces of the input geometry.

I’m going for simplicity, and not being too constrained by speed or memory useage. There’s a lot more memory available than we need, and I’m counting on investigations into some weird Python compiler systems to provide the performance of C++, without the disadvantages of using C++.

I maintain the fact that if you take away the speed advantage of C++ on a particular platform, it loses its point of existence. Therefore the question of whether you should be using C++ is not to be found by looking at C++ itself, but by trying to beat what it supposedly does best using another language.

I can’t predict what will win. But the experience I am about to have ought to be extremely relevant to a programming team that is starting a new product and is having to choose what language they commit to.

This particular slicer will be for 3D printing and it will not notice the problem of mismatching triangle edges or self intersecting input geometry. (Self-intersecting inputs can come when you throw in some support structures.) It will be optimized for taking hundreds of slices and different Z-levels. It will work by finding the offset surface at a particular radius, and then offsetting back in by that radius to get the “true” surface, after the interior contours have been identified by tracking them up and down in 3D to prove full enclosure.

1 Comment

  • 1. Daniel replies at 6th December 2014, 8:53 am :

    You should create 5 axis tool path alogrithm.
    Good luck

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>