mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-15 08:59:40 +00:00
Merge 8d26620929
into 9717497174
This commit is contained in:
commit
ae0c3f0673
2 changed files with 12 additions and 0 deletions
|
@ -257,4 +257,14 @@ RAY = [true, false];
|
||||||
LINE = [false, 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
|
// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap
|
||||||
|
|
|
@ -566,12 +566,14 @@ module partition(size=100, spread=10, cutsize=10, cutpath="jigsaw", gap=0, spin=
|
||||||
rsize = v_abs(rot(spin,p=size));
|
rsize = v_abs(rot(spin,p=size));
|
||||||
vec = rot(spin,p=BACK)*spread/2;
|
vec = rot(spin,p=BACK)*spread/2;
|
||||||
move(vec) {
|
move(vec) {
|
||||||
|
$partition_part = FIRST;
|
||||||
intersection() {
|
intersection() {
|
||||||
children();
|
children();
|
||||||
partition_mask(l=rsize.x, w=rsize.y, h=rsize.z, cutsize=cutsize, cutpath=cutpath, gap=gap, spin=spin);
|
partition_mask(l=rsize.x, w=rsize.y, h=rsize.z, cutsize=cutsize, cutpath=cutpath, gap=gap, spin=spin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
move(-vec) {
|
move(-vec) {
|
||||||
|
$partition_part = SECOND;
|
||||||
intersection() {
|
intersection() {
|
||||||
children();
|
children();
|
||||||
partition_mask(l=rsize.x, w=rsize.y, h=rsize.z, cutsize=cutsize, cutpath=cutpath, gap=gap, inverse=true, spin=spin);
|
partition_mask(l=rsize.x, w=rsize.y, h=rsize.z, cutsize=cutsize, cutpath=cutpath, gap=gap, inverse=true, spin=spin);
|
||||||
|
|
Loading…
Reference in a new issue