Fix multiple extrusions of the same outline in cases
This commit is contained in:
parent
77778249d2
commit
d2c3999d41
5 changed files with 27 additions and 17 deletions
|
@ -1,4 +1,4 @@
|
|||
function square_outline_fn(){
|
||||
function square_extrude_5_outline_fn(){
|
||||
return new CSG.Path2D([[-2.5,-2.5],[2.5,-2.5]]).appendPoint([2.5,2.5]).appendPoint([-2.5,2.5]).appendPoint([-2.5,-2.5]).close().innerToCAG()
|
||||
.extrude({ offset: [0, 0, 5] });
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ function square_outline_fn(){
|
|||
|
||||
|
||||
// creating part 0 of case cube
|
||||
let cube__part_0 = square_outline_fn();
|
||||
let cube__part_0 = square_extrude_5_outline_fn();
|
||||
|
||||
// make sure that rotations are relative
|
||||
let cube__part_0_bounds = cube__part_0.getBounds();
|
||||
|
|
|
@ -1,15 +1,21 @@
|
|||
function _square_outline_fn(){
|
||||
function _square_extrude_8_outline_fn(){
|
||||
return new CSG.Path2D([[-4,-4],[4,-4]]).appendPoint([4,4]).appendPoint([-4,4]).appendPoint([-4,-4]).close().innerToCAG()
|
||||
.extrude({ offset: [0, 0, 8] });
|
||||
}
|
||||
|
||||
|
||||
function _circle_outline_fn(){
|
||||
function _circle_extrude_8_outline_fn(){
|
||||
return CAG.circle({"center":[0,0],"radius":3})
|
||||
.extrude({ offset: [0, 0, 8] });
|
||||
}
|
||||
|
||||
|
||||
function _square_extrude_1_outline_fn(){
|
||||
return new CSG.Path2D([[-4,-4],[4,-4]]).appendPoint([4,4]).appendPoint([-4,4]).appendPoint([-4,-4]).close().innerToCAG()
|
||||
.extrude({ offset: [0, 0, 1] });
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function _subtract_case_fn() {
|
||||
|
@ -55,7 +61,7 @@ function _circle_outline_fn(){
|
|||
|
||||
|
||||
// creating part 0 of case _cube
|
||||
let _cube__part_0 = _square_outline_fn();
|
||||
let _cube__part_0 = _square_extrude_8_outline_fn();
|
||||
|
||||
// make sure that rotations are relative
|
||||
let _cube__part_0_bounds = _cube__part_0.getBounds();
|
||||
|
@ -78,7 +84,7 @@ function _circle_outline_fn(){
|
|||
|
||||
|
||||
// creating part 0 of case _cylinder_one
|
||||
let _cylinder_one__part_0 = _circle_outline_fn();
|
||||
let _cylinder_one__part_0 = _circle_extrude_8_outline_fn();
|
||||
|
||||
// make sure that rotations are relative
|
||||
let _cylinder_one__part_0_bounds = _cylinder_one__part_0.getBounds();
|
||||
|
@ -101,7 +107,7 @@ function _circle_outline_fn(){
|
|||
|
||||
|
||||
// creating part 0 of case _cylinder_two
|
||||
let _cylinder_two__part_0 = _circle_outline_fn();
|
||||
let _cylinder_two__part_0 = _circle_extrude_8_outline_fn();
|
||||
|
||||
// make sure that rotations are relative
|
||||
let _cylinder_two__part_0_bounds = _cylinder_two__part_0.getBounds();
|
||||
|
@ -124,7 +130,7 @@ function _circle_outline_fn(){
|
|||
|
||||
|
||||
// creating part 0 of case _flat_square
|
||||
let _flat_square__part_0 = _square_outline_fn();
|
||||
let _flat_square__part_0 = _square_extrude_1_outline_fn();
|
||||
|
||||
// make sure that rotations are relative
|
||||
let _flat_square__part_0_bounds = _flat_square__part_0.getBounds();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function export_outline_fn(){
|
||||
function export_extrude_1_outline_fn(){
|
||||
return new CSG.Path2D([[-9,-9],[9,-9]]).appendPoint([9,9]).appendPoint([-9,9]).appendPoint([-9,-9]).close().innerToCAG()
|
||||
.extrude({ offset: [0, 0, 1] });
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ function export_outline_fn(){
|
|||
|
||||
|
||||
// creating part 0 of case _export
|
||||
let _export__part_0 = export_outline_fn();
|
||||
let _export__part_0 = export_extrude_1_outline_fn();
|
||||
|
||||
// make sure that rotations are relative
|
||||
let _export__part_0_bounds = _export__part_0.getBounds();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function export_outline_fn(){
|
||||
function export_extrude_1_outline_fn(){
|
||||
return new CSG.Path2D([[-9,-9],[9,-9]]).appendPoint([9,9]).appendPoint([-9,9]).appendPoint([-9,-9]).close().innerToCAG()
|
||||
.extrude({ offset: [0, 0, 1] });
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ function export_outline_fn(){
|
|||
|
||||
|
||||
// creating part 0 of case export
|
||||
let export__part_0 = export_outline_fn();
|
||||
let export__part_0 = export_extrude_1_outline_fn();
|
||||
|
||||
// make sure that rotations are relative
|
||||
let export__part_0_bounds = export__part_0.getBounds();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue