ok leci
This commit is contained in:
parent
cb2e2c179c
commit
dd60c82db1
31
orange.py
31
orange.py
|
|
@ -1,4 +1,5 @@
|
|||
from build123d import *
|
||||
from ocp_vscode import *
|
||||
|
||||
orange = import_step("./OrangePi-Box.step")
|
||||
orange = orange.rotate(Axis.X, -90).move(Location((0, 0, 37)))
|
||||
|
|
@ -9,21 +10,14 @@ wysokosc = 54
|
|||
scianka = 3
|
||||
|
||||
|
||||
# with BuildPart() as box:
|
||||
# Box(dlugosc, szerokosc, wysokosc)
|
||||
# front = box.faces().sort_by(Axis.Y)[0]
|
||||
# front_left_edge_vertex = box.faces().sort_by(Axis.Y)[0].edges().filter_by(Axis.Z).sort_by(Axis.X)[0].vertices()[0]
|
||||
# with BuildSketch(front) as s1:
|
||||
# with Locations((5, 0, 0)):
|
||||
# test = Rectangle(11.68, 17.84, align=(Align.MIN, Align.MAX, Align.CENTER))
|
||||
# extrude(amount=-scianka, mode=Mode.SUBTRACT)
|
||||
# 1 otworek
|
||||
|
||||
# show_object(box, name="box")
|
||||
# # debug(orange)
|
||||
# debug(front_left_edge_vertex, name="vertex")
|
||||
# debug(s1.sketch)
|
||||
# debug(test, name="test")
|
||||
dl1o = 17.84
|
||||
sz1o = 11.68
|
||||
offset_x1 = 8.931
|
||||
offset_y1 = 18.295
|
||||
|
||||
# 2 otworek
|
||||
|
||||
with BuildPart() as box:
|
||||
with BuildSketch() as s1:
|
||||
|
|
@ -33,9 +27,10 @@ with BuildPart() as box:
|
|||
front = box.faces().sort_by(Axis.Y)[0]
|
||||
front_left_edge_vertex = box.faces().sort_by(Axis.Y)[0].edges().filter_by(Axis.Z).sort_by(Axis.X)[0].vertices()[0]
|
||||
with BuildSketch(front) as s2:
|
||||
with Locations((front_left_edge_vertex.X, 0, 0)):
|
||||
Rectangle(30, 20, align=(Align.MIN, Align.MIN, Align.CENTER))
|
||||
with Locations((front_left_edge_vertex.X + offset_x1, -offset_y1)):
|
||||
Rectangle(dl1o, sz1o, align=(Align.MIN, Align.MIN, Align.CENTER))
|
||||
extrude(amount=-scianka, mode=Mode.SUBTRACT)
|
||||
|
||||
show_object(box)
|
||||
debug(s2.sketch)
|
||||
debug(orange)
|
||||
|
||||
# show_all()
|
||||
show(box)
|
||||
|
|
|
|||
Loading…
Reference in New Issue