Hi all
i am stuck at implementing the ALH or adaptive layer height.
left one without and right with the ALH:

the algorithm behind is :

more describe here: adaptive layers simply explained

for example the given parameter are:
base layer distance : 2mm
minimum distance: 1mm
maximum distance: 3mm
smooth level: 5(how many upper and lower layer should be used for smoothing)

seems i need to find new list to be used as contour component Distance.
my try by far, using the fixed layer height at first,able to sort the furthest distance of contours which indicates where it can be applied:
any help appreciated.
thanks
edit: i am not think of using graph mapper for smoothing, let mathematically do the calculation not by mouse drag.

try this

there is a few things about this script which may show i was unable to describe the challenge correctly at topic.

• there is no min and maximum limit for height.
• the layer height increase in step not by smooth curve
• may i ask why you used average in those curvature?
honestly i am unable to figure the logic for the script for example why you not used “Divide Curve” point for Curvature component directly?

No, of course this script is not even close to what you required. I just thought this might be interesting, so I made the first thing that came to my mind, thinking it might be helpful. It is your job to make the script itself:D I am not even sure it is working properely, I have not tested it.
3. I divided contour curves of your shape, and evaluated curvature on each point. Because points are naturally in lists accordinly to each xy contour, average component works for each list, giving us average curvature for each shape slice.
I did not use points from divide curve because curvature component reqires uv point, which means point within the surface domain. To find it, one needs to use surface closest point first.

Here a way
Measure the angle between Z and the normal at different heights. Transform it to a positive angle to the XY plane.

Now Define Min Max layer thickness, here 0.3 to 3 mm.
Define Min Max angle => 0° to 90°
I used a graph mapper to link Angle to Thickness, but it could be simple to do it by code, it is also possible to make a curve in Rhinoceros.

Then make some transformation in order to make an integral. Sort of Normalized layer thickness depending of the height. In X it is the height (62 mm), in Y it is a sort of normalized thickness.

Make line every 1 normalized Height and calculate the intersection with the curve, the X is the height of layer.

Plug the X in countour (ex) component
You have now the different layers.

3 Likes

Laurent,i knew that you will pull me out of the mud.
this was excellent.one term math college in just 40 component.many many thanks man.

i am so grateful for your effort.i think using curvature it will give the points of where the challenge starts and a Loop will be needed to evaluate new height each time which start from job-done-untill-here. or it could be solved in some component(function) that i am not familiar with.thanks again.

Hi
may i ask how i can emphasize decreasing layer height for high Angles?
furthest horizontal distance of layers is exponentially increase with Angles in the surface of base object.
something like this yellow layer is ideal:

and here i get this by simple series in height(without ALH) which guarantee the horizontal distance:

else the extruded path will not touch bottom layer properly in print
graph mapper will affect all layer with proper overall distance.i tried changing graph mapper input range with power of two of Angles (remapped) but it has not such big impact.

thanks again.

Hello
Here is the way it works

With this graph it means if 0° (vertical) => 3mm, if 90° (flat) => 0.3 mm

If you want you can replace Graph Mapper with Expression, here a min max, but you could add linear, exponential … whatever you want

1 Like