This commit is contained in:
Joel Lehtonen OH64K 2024-09-30 22:52:52 -07:00 committed by GitHub
commit ae0c3f0673
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View file

@ -257,4 +257,14 @@ RAY = [true, false];
LINE = [false, false];
// Constant: FIRST
// Synopsis: A constant specifying the first part in partition(). `1`.
FIRST = 1;
// Constant: SECOND
// Synopsis: A constant specifying the second part in partition(). `2`.
SECOND = 2;
// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap

View file

@ -566,12 +566,14 @@ module partition(size=100, spread=10, cutsize=10, cutpath="jigsaw", gap=0, spin=
rsize = v_abs(rot(spin,p=size));
vec = rot(spin,p=BACK)*spread/2;
move(vec) {
$partition_part = FIRST;
intersection() {
children();
partition_mask(l=rsize.x, w=rsize.y, h=rsize.z, cutsize=cutsize, cutpath=cutpath, gap=gap, spin=spin);
}
}
move(-vec) {
$partition_part = SECOND;
intersection() {
children();
partition_mask(l=rsize.x, w=rsize.y, h=rsize.z, cutsize=cutsize, cutpath=cutpath, gap=gap, inverse=true, spin=spin);