Algorithm 1 Corrugated infill pattern algorithm. |
1: Initialize the preferred type of infill pattern and calculate the position of anchor points (seeds) |
2:
|
▹ layer, interfaces, contact, old seeds |
3: if infill type is corrugated then
|
4: infill, seeds ←corrugated infill()) |
5: end if
|
|
6: function corrugated infill() |
|
7: find closest points() |
▹ seeds |
8:
|
▹ points |
9: while do
|
10: /i
|
▹ ratio |
11: if c is even then
|
▹ inside contour |
12: P on contour(/2) |
13: P on contour(/2) |
14: points between() |
15: else
|
▹ outside contour |
16: P on contour(/2) |
17: P on contour(/2) |
18: points between() |
19: end if
|
20:
|
21:
|
22: end while
|
23: create line segments(p) |
24: return
f
|
25: end function
|
|
26: function P on contour(k,s,r) |
|
27: reorder() |
28: circumference(k)+r
|
29:
|
▹ segment, distance |
30: while do
|
31: distance() |
▹ length |
32:
|
33:
|
34: end while
|
35: –d
|
36: /h
|
37: Interpolate(–) |
38: return
p
|
39: end function
|