Advanced 3D printing with grasshopper + image attractors

Can you post a gh file with where you are at so far?

I actually have that book, but I don’t remember exactly the method described for this task…
the thing is, the book is very nice, informative and well explained, but you can get to very same result in many different ways :+1:

assuming you already have layer curves, each divided into the very same amount of points (let’s call those “vase points”)
the trick might be to create a point grid (even on XY plane) with [0,1] domain (so using Range component and Point XYZ) that has very same data-structure as “vase points” in such a way you can use it with an image sampler to extract some “brightness values”

at that point, use “vase points” to retrieve the surface closest point on your original surface, and Evaluate Surface with those UVs in such a way to get vectors that are all pointing out of your vase

flatten (not literally) those vectors by removing their Z component (because you want “vase points” to stay on the very same XY plane they originally are), and give them amplitude depending on the “brightness values” previously sampled (same data structure :+1: )

this will make all the points corresponding to a high brightness sample to move out of the vase surface, while points with zero brightness will just stay on the original surface (you might also want to multiply the amplitude by another slider, in such a way to be able to scale how much the points are being pushed out)

as last thing, because even on layers affected by the image sampling the points are “zigzagging”, probably you might want to replace even/odd brightness-based amplitude-values with zeroes (Replace Items or dispatch+weave or sift pattern+combine data… a lot of different possibilities to do that!) and interpolate those into closed curves
this should happen with same pattern (but inverted) for even/odd layers, in such a way points from the very same column are pushed-out on the first layer, then zero on the next layer, then pushed-out again on the following… and so on)

as a further step, you might want to also consider influencing the Feed Rate of the extruder depending on how much the points are sticking out from the original surface… but that is something I would dig into only after getting very familiar with the geometrical side of the matter

believe me, it looks like a difficult and overwhelming task, but when you think about it in steps, things become much easier to do!

[fresh edit]

this one:


looks like there’s a “normal” layer followed by a zig-zag one with those bladders:

for sure here there’s also some sort of modification to the Feed rate, but strictly about the extruder-path, something like this might work:

I’m not proud at all of these parts in red, where stuff is calculated than just discarded… I think there are much better ways to get the very same results, but this was just a small mod on a much bigger definition I already had

random b/w image from here:


clay weave image sampler.3dm (83.4 KB)

Hi Alonso,

This is a rhino file, not a grasshopper file. Please share the grasshopper file so we can help you.

clay image (19.7 KB)
I’m just starting out here’s a start

Take a look at this gh file I posted in this thread 24 days ago.

1 Like

image (16.7 MB)

I’m stuck trying to reproduce it doesn’t give the same result But the result you get is exactly what I want

1 Like

Range component produces N+1 numbers for N values, so you need to put there an Expression for x-1

the Text Panels, you need them to be able to host lists of values, right click on each of them and chose Multiline Data (in case you write vectors in a Text Panel you can either write it without parenthesis like 0,0,0 or you need to use curly ones like {0,0,0} )

changed image just to visually check if things were ok, and it looks they are, you have done a good job!

keep in mind, the definition is far from being optimized, so it’s very slow in the current state

image (87.8 KB)

[edit] also consider that when it’s time to generate the G-code, you might want to specify -only for the blue layers that define the bladders- a proportionally increased Feed Rate

I guess a simple way to do that is, once you have generated the final polyline-path points on which the Gcode is written, to check the distance from those points to the Closest point on the original undeformed layer (these curves) and somehow rescale the Feed Rate depending on those (Remap component is your best friend for this task)


great thank you very much the result is perfect! But it’s impossible to export it and print it? When I put “bake” on “preview” I don’t have anything happening

if you want to get the trajectory curves, they are in the blue “THESE” :

but in order to print you need gcode of some sort, which is a serie of commands for the 3D printer

the book explains very well how to go from curves to gcode :+1:

1 Like

To export the final result to CURA, which automatically generates a G-Code, I need to export the shape that makes up the white and blue outlines, but I can’t export it

literally right click on the Curve output of the Interpolate component, select Bake and a destination layer in Rhino

at that point you have your Nurbs curve in Rhino

I don’t know what sort of formats CURA is happy to read because I’ve never used it, but if needed you can even transform the curves into Polylines (through GH or in Rhino directly)