Split in cadquery
This commit is contained in:
parent
c4bae182c6
commit
4114adb49a
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
14394
notebook_nueva/left_side.stl
Normal file
14394
notebook_nueva/left_side.stl
Normal file
File diff suppressed because it is too large
Load Diff
42170
notebook_nueva/model.stl
Normal file
42170
notebook_nueva/model.stl
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@ from cadquery2 import exporters
|
||||
|
||||
# Size of the whole object
|
||||
width = 295
|
||||
height = 165
|
||||
height = 160
|
||||
thickness = 25
|
||||
|
||||
kbd_height = 100
|
||||
@ -64,39 +64,38 @@ def model():
|
||||
.split(keepBottom=True)
|
||||
)
|
||||
|
||||
top_right = (
|
||||
model()
|
||||
.faces(">Y")
|
||||
.workplane(offset = -120).split(keepTop=True)
|
||||
.faces(">X")
|
||||
.workplane(offset=-135).split(keepTop=True)
|
||||
)
|
||||
exporters.export(top_right, "top_right.stl")
|
||||
|
||||
top_left = (
|
||||
model()
|
||||
.faces(">Y")
|
||||
.workplane(offset = -120).split(keepTop=True)
|
||||
.faces(">X")
|
||||
.workplane(offset=-135).split(keepBottom=True)
|
||||
left_cutout = cq.Sketch().polygon(
|
||||
[(0, 0), (160, 0), (160, -100), (120, -100), (120, -200), (0, -200), (0, 0)],
|
||||
mode="a",
|
||||
)
|
||||
exporters.export(top_left, "top_left.stl")
|
||||
|
||||
bottom_right = (
|
||||
right_side = (
|
||||
model()
|
||||
.faces(">Y")
|
||||
.workplane(offset = -120).split(keepBottom=True)
|
||||
.faces(">X")
|
||||
.workplane(offset=-165).split(keepTop=True)
|
||||
.faces("<Z")
|
||||
.workplaneFromTagged("mid_height")
|
||||
.transformed(offset=cq.Vector(0, 0, -thickness / 2))
|
||||
.center(-width / 2, height / 2)
|
||||
.placeSketch(left_cutout)
|
||||
.cutBlind(100)
|
||||
)
|
||||
exporters.export(bottom_right, "bottom_right.stl")
|
||||
|
||||
bottom_left = (
|
||||
exporters.export(right_side, "right_side.stl")
|
||||
|
||||
right_cutout = cq.Sketch().polygon(
|
||||
[(160, 0), (width, 0), (width, -height), (120, -height), (120, -100), (160, -100), (160, 0)],
|
||||
mode="a",
|
||||
)
|
||||
|
||||
left_side = (
|
||||
model()
|
||||
.faces(">Y")
|
||||
.workplane(offset = -120).split(keepBottom=True)
|
||||
.faces(">X")
|
||||
.workplane(offset=-165).split(keepBottom=True)
|
||||
.faces("<Z")
|
||||
.workplaneFromTagged("mid_height")
|
||||
.transformed(offset=cq.Vector(0, 0, -thickness / 2))
|
||||
.center(-width / 2, height / 2)
|
||||
.placeSketch(right_cutout)
|
||||
.cutBlind(100)
|
||||
)
|
||||
exporters.export(bottom_left, "bottom_left.stl")
|
||||
exporters.export(right_side, "left_side.stl")
|
||||
|
||||
exporters.export(model(), "model.stl")
|
||||
|
14394
notebook_nueva/right_side.stl
Normal file
14394
notebook_nueva/right_side.stl
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user