-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
liolaeus
committed
Jan 1, 2025
1 parent
884b3fd
commit 0361cdf
Showing
9 changed files
with
8,395 additions
and
1,205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
function switch_plate_extrude_1_2_outline_fn(){ | ||
return new CSG.Path2D([[396.4982953,-186.9039844],[413.8000271,-182.0164895]]).appendArc([414.2077985,-181.96],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([458.46,-181.96]).appendArc([459.96,-180.46],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([459.96,-127.54]).appendArc([458.46,-126.04],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([443.5,-126.04]).appendArc([442,-124.54],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([442,-123.54]).appendArc([440.5,-122.04],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([425.5,-122.04]).appendArc([424,-120.54],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([424,-109.54]).appendArc([422.5,-108.04],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([407.5,-108.04]).appendArc([406,-106.54],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([406,-105.54]).appendArc([404.5,-104.04],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([387.5,-104.04]).appendArc([386,-105.54],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([386,-107.54]).appendArc([384.5,-109.04],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([369.5,-109.04]).appendArc([368,-110.54],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([368,-111.54]).appendArc([366.5,-113.04],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([353.2,-113.04]).appendArc([351.7,-114.54],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([351.7,-169.1918616]).appendArc([350.6284428,-170.6293722],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([340.4036759,-173.676812]).appendArc([340.2580936,-173.7285033],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([335.4479489,-175.7209304]).appendArc([335.271974,-175.8077116],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([320.8425316,-184.138554]).appendArc([320.2934935,-186.1875921],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([327.9266788,-199.4086569]).appendArc([329.9701813,-199.9608753],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([344.8869657,-191.4331092]).appendArc([345.2432016,-191.2864388],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([360.9008872,-187.0909747]).appendArc([361.2856942,-187.0398673],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([396.0939454,-186.96047]).appendArc([396.4982953,-186.9039844],{"radius":1.5,"clockwise":false,"large":false}).close().innerToCAG() | ||
.subtract( | ||
new CSG.Path2D([[329.7569287,-196.6587427],[341.8812843,-189.6587427]]).appendPoint([334.8812843,-177.5343871]).appendPoint([322.7569287,-184.5343871]).appendPoint([329.7569287,-196.6587427]).close().innerToCAG() | ||
.union( | ||
new CSG.Path2D([[363,-184],[377,-184]]).appendPoint([377,-170]).appendPoint([363,-170]).appendPoint([363,-184]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[381,-184],[395,-184]]).appendPoint([395,-170]).appendPoint([381,-170]).appendPoint([381,-184]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[353,-130],[367,-130]]).appendPoint([367,-116]).appendPoint([353,-116]).appendPoint([353,-130]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[353,-148],[367,-148]]).appendPoint([367,-134]).appendPoint([353,-134]).appendPoint([353,-148]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[353,-166],[367,-166]]).appendPoint([367,-152]).appendPoint([353,-152]).appendPoint([353,-166]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[371,-126],[385,-126]]).appendPoint([385,-112]).appendPoint([371,-112]).appendPoint([371,-126]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[371,-144],[385,-144]]).appendPoint([385,-130]).appendPoint([371,-130]).appendPoint([371,-144]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[371,-162],[385,-162]]).appendPoint([385,-148]).appendPoint([371,-148]).appendPoint([371,-162]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[389,-121],[403,-121]]).appendPoint([403,-107]).appendPoint([389,-107]).appendPoint([389,-121]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[389,-139],[403,-139]]).appendPoint([403,-125]).appendPoint([389,-125]).appendPoint([389,-139]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[389,-157],[403,-157]]).appendPoint([403,-143]).appendPoint([389,-143]).appendPoint([389,-157]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[407,-125],[421,-125]]).appendPoint([421,-111]).appendPoint([407,-111]).appendPoint([407,-125]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[407,-143],[421,-143]]).appendPoint([421,-129]).appendPoint([407,-129]).appendPoint([407,-143]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[407,-161],[421,-161]]).appendPoint([421,-147]).appendPoint([407,-147]).appendPoint([407,-161]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[407,-179],[421,-179]]).appendPoint([421,-165]).appendPoint([407,-165]).appendPoint([407,-179]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[425,-139],[439,-139]]).appendPoint([439,-125]).appendPoint([425,-125]).appendPoint([425,-139]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[425,-157],[439,-157]]).appendPoint([439,-143]).appendPoint([425,-143]).appendPoint([425,-157]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[425,-175],[439,-175]]).appendPoint([439,-161]).appendPoint([425,-161]).appendPoint([425,-175]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[443,-143],[457,-143]]).appendPoint([457,-129]).appendPoint([443,-129]).appendPoint([443,-143]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[443,-161],[457,-161]]).appendPoint([457,-147]).appendPoint([443,-147]).appendPoint([443,-161]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[443,-179],[457,-179]]).appendPoint([457,-165]).appendPoint([443,-165]).appendPoint([443,-179]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[345.5451867,-188.1411047],[359.0681483,-184.5176381]]).appendPoint([355.4446817,-170.9946765]).appendPoint([341.9217201,-174.6181431]).appendPoint([345.5451867,-188.1411047]).close().innerToCAG() | ||
)).union( | ||
new CSG.Path2D([[223.5017047,-186.9039844],[206.1999729,-182.0164895]]).appendArc([205.7922015,-181.96],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([161.54,-181.96]).appendArc([160.04,-180.46],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([160.04,-127.54]).appendArc([161.54,-126.04],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([176.5,-126.04]).appendArc([178,-124.54],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([178,-123.54]).appendArc([179.5,-122.04],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([194.5,-122.04]).appendArc([196,-120.54],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([196,-109.54]).appendArc([197.5,-108.04],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([212.5,-108.04]).appendArc([214,-106.54],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([214,-105.54]).appendArc([215.5,-104.04],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([232.5,-104.04]).appendArc([234,-105.54],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([234,-107.54]).appendArc([235.5,-109.04],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([250.5,-109.04]).appendArc([252,-110.54],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([252,-111.54]).appendArc([253.5,-113.04],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([266.8,-113.04]).appendArc([268.3,-114.54],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([268.3,-169.1918616]).appendArc([269.3715572,-170.6293722],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([279.5963241,-173.676812]).appendArc([279.7419064,-173.7285033],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([284.5520511,-175.7209304]).appendArc([284.728026,-175.8077116],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([299.1574684,-184.138554]).appendArc([299.7065065,-186.1875921],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([292.0733212,-199.4086569]).appendArc([290.0298187,-199.9608753],{"radius":1.5,"clockwise":true,"large":false}).appendPoint([275.1130343,-191.4331092]).appendArc([274.7567984,-191.2864388],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([259.0991128,-187.0909747]).appendArc([258.7143058,-187.0398673],{"radius":1.5,"clockwise":false,"large":false}).appendPoint([223.9060546,-186.96047]).appendArc([223.5017047,-186.9039844],{"radius":1.5,"clockwise":true,"large":false}).close().innerToCAG() | ||
.subtract( | ||
new CSG.Path2D([[278.1187157,-189.6587427],[290.2430713,-196.6587427]]).appendPoint([297.2430713,-184.5343871]).appendPoint([285.1187157,-177.5343871]).appendPoint([278.1187157,-189.6587427]).close().innerToCAG() | ||
.union( | ||
new CSG.Path2D([[243,-184],[257,-184]]).appendPoint([257,-170]).appendPoint([243,-170]).appendPoint([243,-184]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[225,-184],[239,-184]]).appendPoint([239,-170]).appendPoint([225,-170]).appendPoint([225,-184]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[253,-130],[267,-130]]).appendPoint([267,-116]).appendPoint([253,-116]).appendPoint([253,-130]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[253,-148],[267,-148]]).appendPoint([267,-134]).appendPoint([253,-134]).appendPoint([253,-148]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[253,-166],[267,-166]]).appendPoint([267,-152]).appendPoint([253,-152]).appendPoint([253,-166]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[235,-126],[249,-126]]).appendPoint([249,-112]).appendPoint([235,-112]).appendPoint([235,-126]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[235,-144],[249,-144]]).appendPoint([249,-130]).appendPoint([235,-130]).appendPoint([235,-144]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[235,-162],[249,-162]]).appendPoint([249,-148]).appendPoint([235,-148]).appendPoint([235,-162]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[217,-121],[231,-121]]).appendPoint([231,-107]).appendPoint([217,-107]).appendPoint([217,-121]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[217,-139],[231,-139]]).appendPoint([231,-125]).appendPoint([217,-125]).appendPoint([217,-139]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[217,-157],[231,-157]]).appendPoint([231,-143]).appendPoint([217,-143]).appendPoint([217,-157]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[199,-125],[213,-125]]).appendPoint([213,-111]).appendPoint([199,-111]).appendPoint([199,-125]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[199,-143],[213,-143]]).appendPoint([213,-129]).appendPoint([199,-129]).appendPoint([199,-143]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[199,-161],[213,-161]]).appendPoint([213,-147]).appendPoint([199,-147]).appendPoint([199,-161]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[199,-179],[213,-179]]).appendPoint([213,-165]).appendPoint([199,-165]).appendPoint([199,-179]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[181,-139],[195,-139]]).appendPoint([195,-125]).appendPoint([181,-125]).appendPoint([181,-139]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[181,-157],[195,-157]]).appendPoint([195,-143]).appendPoint([181,-143]).appendPoint([181,-157]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[181,-175],[195,-175]]).appendPoint([195,-161]).appendPoint([181,-161]).appendPoint([181,-175]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[163,-143],[177,-143]]).appendPoint([177,-129]).appendPoint([163,-129]).appendPoint([163,-143]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[163,-161],[177,-161]]).appendPoint([177,-147]).appendPoint([163,-147]).appendPoint([163,-161]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[163,-179],[177,-179]]).appendPoint([177,-165]).appendPoint([163,-165]).appendPoint([163,-179]).close().innerToCAG() | ||
).union( | ||
new CSG.Path2D([[260.9318517,-184.5176381],[274.4548133,-188.1411047]]).appendPoint([278.0782799,-174.6181431]).appendPoint([264.5553183,-170.9946765]).appendPoint([260.9318517,-184.5176381]).close().innerToCAG() | ||
))).extrude({ offset: [0, 0, 1.2] }); | ||
} | ||
|
||
|
||
|
||
|
||
function plate_case_fn() { | ||
|
||
|
||
// creating part 0 of case plate | ||
let plate__part_0 = switch_plate_extrude_1_2_outline_fn(); | ||
|
||
// make sure that rotations are relative | ||
let plate__part_0_bounds = plate__part_0.getBounds(); | ||
let plate__part_0_x = plate__part_0_bounds[0].x + (plate__part_0_bounds[1].x - plate__part_0_bounds[0].x) / 2 | ||
let plate__part_0_y = plate__part_0_bounds[0].y + (plate__part_0_bounds[1].y - plate__part_0_bounds[0].y) / 2 | ||
plate__part_0 = translate([-plate__part_0_x, -plate__part_0_y, 0], plate__part_0); | ||
plate__part_0 = rotate([0,0,0], plate__part_0); | ||
plate__part_0 = translate([plate__part_0_x, plate__part_0_y, 0], plate__part_0); | ||
|
||
plate__part_0 = translate([0,0,0], plate__part_0); | ||
let result = plate__part_0; | ||
|
||
|
||
return result; | ||
} | ||
|
||
|
||
|
||
function main() { | ||
return plate_case_fn(); | ||
} | ||
|
||
|
Oops, something went wrong.