Modify Dome Slicer to Slice cylinder?

Last year @kev.r was able to get this dome slicer (see attached) to work. This Slicer doesn’t work on a simple cylinder … Why not? Please help.

Slice (23.4 KB)

You didn’t internalize your “cylinder” (with a hole) so I created one with components.

But I don’t understand what you are trying to do? Seems odd to use contour curves as the input to Deconstruct Arc? If you want planes, why not just create the planes instead of using Contour?

Slice (11.5 KB)


Slice (23.3 KB)

That color sequence tells me the split fragments need to be sorted by Z:

Slice (24.0 KB)

Slice Test_kr internalized (42.1 KB)

Attached is the cylinder with the internalized data

@Joseph_Oster I don’t want planes, I want a tool path … the contours create a tool path and generate g-code

The files you provided doesn’t provide X and Y coordinates

You are using planes derived from contour curves. Why bother with contours when you can create planes directly? Oh well…

Wait a minute… All you needed was to 1) read the error message on the red component and 2) filter out lines that break Deconstruct Arc (white group). :man_facepalming:

Slice (40.9 KB)

@Joseph_Oster Somethings not right … when I run the g-code it through the simulator is one flat circle

It’s your code, eh, not mine. What do you think is wrong?

Using the code I posted at the bottom of the thread you referenced above:

Your geometry produces errors with the Deconstruct Arc component. I re-built your cylinder and it works without errors (only change to gh file I referenced above is new input geometry).

Slice (61.1 KB)

Output from your simulator looks ok to me.


1 Like

@kev.r , Thank you so Much … What was wrong with the 3dm model?

The top and bottom of your tube is split into 2 surfaces.

This produces 4 “Line-Like Curves” at the output of the Contour component which causes errors when input to the Deconstruct Arc component.

You could cull these “Line-Like Curves” using the method @Joseph_Oster showed above. The curves aren’t in the same order as those produced from the rebuilt tube I provided but it should work.


@kev.r now … how difficult will it be to modify this slicer to recognize holes in the cylinder? I don’t know where to begin.

Slice Test_kr2_with (79.5 KB)

What’s the point of writing your own slicer to produce g-code? Especially when you “don’t know where to begin”? There must be a wide variety of such tools available that will do the job, eh?

I would think you want a “Closed Brep” for this, eh? (white group) But as before, Deconstruct Arc fails to handle contours that are not arcs.

Slice Test_kr2_with (82.6 KB)

P.S. More mucking about… The “gold group” (inside the yellow group) yields a list of Boundary surfaces whose edges are the curves you want. Deconstruct Arc still fails on linear segments so that part still needs work, but I did find the contour planes without it.

Slice Test_kr2_with (88.7 KB)

1 Like

Hi, I am asking these purely out of curiosity.
Why many people try to slice with GH? Is it because it is clay printing? In FDM world which I am familiar with slicers are free and open source. Is there no good slicer for clay? Is it not possible to use Cura or Prusa to slice a clay print?

@Joseph_Oster Thank you for your efforts!

@Quan_Li I’m not familiar with clay printing, but I see know reason why you couldn’t use Cura or Prusa. The benefit of making your own slicer is control … the off the shelf slicer’s don’t always have everything needed for a custom print?

If it is not clay, may I ask what kind of print you slice for?

But you “don’t know where to begin”… If each geometry requires custom GH code, where is the advantage?

@Joseph_Oster its not that each geometry requires a custom GH code, its an evolution of the slicer and a learning process, The best way I know how to learn more about GH (and custom slicing) is to have a problem I can’t solve, ask questions, and obtain solutions from brilliant people such as yourself. Thank you again for sharing your experience and insight.

If you analyze the code posted in the responses to your previous questions, you should have all the information you need to accomplish this.

I modified the code posted by @maje90 in the second thread above to get this. (119.9 KB)

As far as being a slicer this is still very basic, but I think it produces the output you’re looking for. This is from the geometry you provided (open brep).

This will also slice shapes that contain straight lines. Here’s what I get from recreating your geometry (closed brep this time).

Just an arbitrary shape with holes.

Note: These 2 components will show errors if you input a brep that produces contours containing straight line segments. This is to be expected and does not cause problems.

You could add some logic to sort the order of the curves to optimize the moves and insure they don’t cause any collisions with what’s been previously printed.


1 Like