Slowing down first layer printing

24 views
Skip to first unread message

Loïc Fejoz

unread,
Jan 26, 2015, 11:13:51 AM1/26/15
to ic...@googlegroups.com
Hi,

I come again to the need of having only first layer selection in material shader: I want to slow down printing of the first layer. So I use the different brush settings for that.
So I come with:

int material(vec3 p, int groups) {
    if (groups > 0) {
       if (p.z <= 0.1) {
          return 1;
          }
          return groups;
       }
    return -1;
}

Obviously, p.z <= 0.1 shall really be mm(p.z) <= layer_height...

Regards,
Loïc

Loïc Fejoz

unread,
Jan 26, 2015, 11:36:02 AM1/26/15
to ic...@googlegroups.com
It would probably be more interesting to have a lua function for that. Something using an outerbox function and read-only attributes for instance. ;-)

function slowdown_emit(a_shape)
  ob = outerbox(a_shape)
  size = ob.scale
  size.z = first_layer_height
  first_layer_box = translate(ob.center) * scale(size) * box(1)
  emit(intersection(a_shape, first_layer_box), 1)
  emit(difference(a_shape, first_layer_box), 0)
end


What do you think?

Regards,
Reply all
Reply to author
Forward
0 new messages