Base Contours Pathway - 3D Printing

Base Contour.gh (8.1 KB)

Hello,

I have created a base contour for 3D Printing; however I want the continous polyline to be open ended at the last point rather than merging with the first point and creating a perpendicular line in the middle of the contours.

How can I have the perpendicular line removed…?

Thank you!

there’s a temporary bug in the Contour component that is going to be fixed in the next release

here is a Point List on the points you are polyline-ing, you can see the overlapped digits

to better understand what/how the [buggy] Contour component duplicates stuff, I have added +1 Z to each of your points

I believe with next release your definition will just work ok :+1:

As @inno explained, you had twice as many contour curves as it looked, likely due to the bug. I added the white group to compute the number of contours that fit in the ‘R1’ diameter of your ellipse.


Base Contour._2022Oct1a.gh (13.4 KB)

1 Like

Thank you @inno and @Joseph_Oster for clarifying this for me.
I have been struggling with my other models and was wondering why this kept happening.

Hopefully they release the new patch soon!

Thank you again!

Hi! I had the same problem, thanks for fixing it. Also, I am trying to make not a straight line but a zig-zag-like + second layer with a rotated 90 degrees pattern (like in images) and don’t have any luck or knowledge of how to do it. Can you help me, thanks in advance!



zig-zag.gh (18.1 KB)


zig-zag_2022Oct13a.gh (29.0 KB)

P.S. I started to add the orange group (below) to move the zig-zag lines ‘-x/2’ to re-center them and allow their arbitrary rotation when, accidentally, this pattern emerged because preview wasn’t disabled yet on the Move component as intended. Cool, eh? :sunglasses:


zig-zag_2022Oct13b.gh (22.5 KB)

3 Likes

Addition play, though perhaps too much thread drift? Simpler code with added features. The only flaw I can find is due to the unfixed Contour bug. It breaks, for example, if you rotate the contours without rotating the base plane of the ellipse. (not an issue if R1 = R2, a circle)


zig-zag_2022Oct13c.gh (24.3 KB)

P.S. The flaw I described was not due to the unfixed Contour bug, it was just hard to align the zig-zags when their rotation was different from the ellipse. Finally got it to work, though there are many duplicate components so I wonder if it can be optimized further?

I didn’t add separate rotation controls for the ellipse, this GIF shows it connected and disconnected to the zig-zag angle control, which I believe demonstrates they can be rotated independently.
zig-zag_2022Oct13d
zig-zag_2022Oct13d.gh (34.9 KB)
Full Size GIF

1 Like

That’s super cool, thanks! I feel so dumb. Now I’m doing reverse coding, to learn from your code. But I have no luck connecting all zig-zags and circle together in one polyline, and then going to the second layer and turning all 90 degrees. sorry bothering you.

Hello
Welcome to 3d printing. You dont ask something easy. On single shape it is not so hard. But i am not sure it will work with holes.
See this thread

And what i did for a client

1 Like

Hi, I’m not new to 3d printing but a total newbie in Rhino/Grasshopper. And I’m fascinated by the capabilities of this program, especially not being limited by the fact that all models should be watertight and manifold. I saw a lot of vase mode printing examples for Gh on the internet but they all were without solid bottom layers. I guess my best solution will be to mesh with g-code compilated in Gh and slicer.

OK I understand. So welcome in Grasshopper
Slicing in Grasshopper is easy with Contour component or Mesh Plane. As many uses end with Mesh, most of the time polylines are used. So I encourage you to look at Clipper Library for the offset but it is also useful for boolean.
Programming in C# or Python is also useful to make custom tools. But this is not mandatory. Me I like to make library so I can more easily integrate new functions.

1 Like

Oh yes, I forgot about the single line tool path requirement. You could just flatten the input to PLine and add the gray group (below, top right) to Flip Curve alternate contour lines for AlongCrv.


zig-zag_2022Oct14a.gh (36.6 KB)

Or you could use an offset curve of the ellipse to trim the zig-zag lines, then use them to Shatter the offset ellipse and use the fragments to connect the zig-zags, More complicated but better result?

Maybe later…

P.S. I added offset ellipse (white group) to make the zig-zags long enough for trimming (green group at bottom) and shattered the original ellipse to make fragments between the zig-zag ends as shown by the ColorJ component. But so far, I haven’t got a way to cull them properly so a single toolpath is formed when they are joined with the zig-zags. This is complicated in part by zig-zag fragments where they cross the ellipse more than twice.



zig-zag_2022Oct14b.gh (47.5 KB)

2 Likes

Perseverance furthers! This wasn’t easy and isn’t the only way… Might be instructive though?

I ended up using straight lines instead of ellipse fragments to connect the zig-zags. I had a single toolpath from the disabled Connect component (green group) but it crosses the zig-zags in a few places so I added the orange group to explicitly generate the piped “tool up” connecting segments.



zig-zag_2022Oct14cc.gh (45.8 KB)

2 Likes

Wow! Thanks a lot.